/**
 * 《山贼模拟器》· Reply UI · v2.4
 * os-* 角色面板 · 悬停 os-tip · 绢纸古风
 * wt-compact 紧凑首栏 · qs 任务卷宗 · dc 掷骰框 · suggested_questions
 * MUFY：裸选择器 + .mufy_ai_message_bubble 兜底
 */

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

.mufy_ai_message_bubble {
  color: #3a3228 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  font-family: "PingFang SC", "Microsoft YaHei", "STKaiti", "KaiTi", "SimSun", serif !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  overflow: visible !important;
}

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

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

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

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

/* ========== 思维链 ========== */
redacted_thinking,
.mufy_ai_message_bubble redacted_thinking {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.tkb,
redacted_thinking .tkb,
.mufy_ai_message_bubble redacted_thinking .tkb {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

redacted_thinking:not(:has(.tkb)),
.mufy_ai_message_bubble redacted_thinking:not(:has(.tkb)) {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ========== 通用容器 os-body ========== */
.os-body,
div.os-body,
.mufy_ai_message_bubble .os-body {
  display: block !important;
  padding: 10px 12px 12px !important;
  background: #faf8f3 !important;
  border: 1px solid #e8e0d0 !important;
  border-radius: 8px !important;
}

.wt .os-body,
.mufy_ai_message_bubble .wt .os-body {
  border: none !important;
  border-radius: 0 !important;
  padding: 8px 10px 10px !important;
}

.wt-compact,
.mufy_ai_message_bubble .wt-compact {
  padding: 6px 10px 8px !important;
}

.wt-meta,
div.wt-meta,
.mufy_ai_message_bubble .wt-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 0 6px !important;
}

.wt-chip,
span.wt-chip,
.mufy_ai_message_bubble .wt-chip {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  color: #3a3228 !important;
  background: #fffef9 !important;
  border: 1px solid #ebe4da !important;
  border-radius: 4px !important;
  line-height: 1.4 !important;
}

.wt-chip em,
.mufy_ai_message_bubble .wt-chip em {
  font-style: normal !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #9c2c2c !important;
  flex-shrink: 0 !important;
}

.wt-chip.wt-wide,
.mufy_ai_message_bubble .wt-chip.wt-wide {
  flex: 1 1 100% !important;
}

.wt-kpi,
div.wt-kpi,
.mufy_ai_message_bubble .wt-kpi {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 4px !important;
  margin: 0 0 6px !important;
  padding: 6px !important;
  background: #4a3228 !important;
  border-radius: 4px !important;
}

.wt-kpi-i,
div.wt-kpi-i,
.mufy_ai_message_bubble .wt-kpi-i {
  position: relative !important;
  display: block !important;
  padding: 4px 2px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #faf4e8 !important;
  line-height: 1.35 !important;
  cursor: default !important;
}

.wt-kpi-i:hover .os-tip,
.mufy_ai_message_bubble .wt-kpi-i:hover .os-tip {
  display: block !important;
}

.wt-kpi-i em,
.mufy_ai_message_bubble .wt-kpi-i em {
  display: block !important;
  font-style: normal !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  color: #e8c878 !important;
  margin-bottom: 2px !important;
  letter-spacing: 0.08em !important;
}

.wt-ev,
div.wt-ev,
.mufy_ai_message_bubble .wt-ev {
  margin: 0 0 4px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: #3a3228 !important;
  background: rgba(255, 254, 249, 0.8) !important;
  border-left: 2px solid #c4a035 !important;
  border-radius: 0 3px 3px 0 !important;
}

.wt-ev b,
.mufy_ai_message_bubble .wt-ev b {
  display: inline-block !important;
  min-width: 2.2em !important;
  margin-right: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #9c2c2c !important;
}

.wt-ev:last-child,
.mufy_ai_message_bubble .wt-ev:last-child {
  margin-bottom: 0 !important;
}

.wt-head,
.mufy_ai_message_bubble .wt-head {
  position: relative !important;
  justify-content: center !important;
  padding: 4px 36px 6px !important;
  margin-bottom: 6px !important;
}

.wt,
div.wt,
.mufy_ai_message_bubble .wt {
  display: block !important;
  position: relative !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  background: #faf8f3 !important;
  border: 1px solid #e8e0d0 !important;
  border-left: 3px solid #9c2c2c !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(58, 50, 40, 0.06) !important;
  overflow: visible !important;
}

/* ========== 标题区 os-head ========== */
.os-head,
div.os-head,
.mufy_ai_message_bubble .os-head {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 10px !important;
  padding: 0 0 8px !important;
  border-bottom: 1px solid #ebe4da !important;
}

.os-name,
span.os-name,
.mufy_ai_message_bubble .os-name {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #2a2218 !important;
  letter-spacing: 0.06em !important;
}

.os-title,
span.os-title,
.mufy_ai_message_bubble .os-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em !important;
  color: #2a2218 !important;
}

.wsl,
span.wsl,
.mufy_ai_message_bubble .wsl {
  position: absolute !important;
  top: 6px !important;
  right: 10px !important;
  padding: 2px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #faf8f3 !important;
  background: #9c2c2c !important;
  border-radius: 3px !important;
  letter-spacing: 0.1em !important;
}

.m-tag,
span.m-tag,
.mufy_ai_message_bubble .m-tag {
  display: inline-block !important;
  padding: 2px 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #4a6088 !important;
  background: #eaf0fa !important;
  border: 1px solid #c8d4ea !important;
  border-radius: 10px !important;
  line-height: 1.4 !important;
}

/* ========== 信息行 os-row ========== */
.os-row,
div.os-row,
.mufy_ai_message_bubble .os-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 10px !important;
  margin: 0 !important;
  padding: 8px 4px !important;
  font-size: 13.5px !important;
  color: #3a3228 !important;
  border-bottom: 1px dashed #ebe4da !important;
  position: relative !important;
}

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

.os-row::before,
.mufy_ai_message_bubble .os-row::before {
  content: attr(data-t) !important;
  flex-shrink: 0 !important;
  min-width: 4.5em !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #8a7a68 !important;
}

.os-row:not([data-t])::before,
.mufy_ai_message_bubble .os-row:not([data-t])::before {
  content: none !important;
  display: none !important;
}

.os-sep,
div.os-sep,
.mufy_ai_message_bubble .os-sep {
  margin: 8px 0 4px !important;
  padding: 4px 0 4px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  color: #9c2c2c !important;
  border-left: 3px solid #c4a035 !important;
}

.os-quote,
div.os-quote,
.mufy_ai_message_bubble .os-quote {
  margin: 8px 4px 4px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-style: italic !important;
  color: #5c4a38 !important;
  background: #fffef9 !important;
  border-left: 3px solid #9c2c2c !important;
  border-radius: 0 4px 4px 0 !important;
}

/* ========== 进度条 os-bars / bar ========== */
.os-bars,
div.os-bars,
.mufy_ai_message_bubble .os-bars {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 0 8px !important;
}

.bar,
div.bar,
.mufy_ai_message_bubble .bar {
  position: relative !important;
  height: 32px !important;
  background: #f0ebe3 !important;
  border: 1px solid #ddd5c5 !important;
  border-radius: 4px !important;
  overflow: visible !important;
}

.bar .fill,
.mufy_ai_message_bubble .bar .fill {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 0 !important;
  border-radius: 3px 0 0 3px !important;
  transition: width 0.25s ease !important;
  z-index: 0 !important;
}

.bar-red .fill,
.bar.bar-red .fill,
.mufy_ai_message_bubble .bar-red .fill {
  background: linear-gradient(90deg, #e87878, #c44) !important;
}

.bar-blue .fill,
.bar.bar-blue .fill,
.mufy_ai_message_bubble .bar-blue .fill {
  background: linear-gradient(90deg, #78a8e8, #4a78c4) !important;
}

.bar-gold .fill,
.bar.bar-gold .fill,
.mufy_ai_message_bubble .bar-gold .fill {
  background: linear-gradient(90deg, #e8c878, #c4a035) !important;
}

.bar .text,
.mufy_ai_message_bubble .bar .text {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #2a2218 !important;
  text-align: center !important;
  line-height: 1.25 !important;
  text-shadow: 0 0 3px rgba(255, 252, 245, 0.8) !important;
}

/* ========== 六维 os-attrs / attr ========== */
.os-panel,
div.os-panel,
.mufy_ai_message_bubble .os-panel {
  margin: 6px 0 !important;
  padding: 8px !important;
  background: #f5f0e8 !important;
  border: 1px solid #ebe4da !important;
  border-radius: 6px !important;
}

.os-attrs,
div.os-attrs,
.mufy_ai_message_bubble .os-attrs {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.attr,
div.attr,
.mufy_ai_message_bubble .attr {
  position: relative !important;
  padding: 8px 4px !important;
  text-align: center !important;
  background: #fffef9 !important;
  border: 1px solid #e8e0d0 !important;
  border-radius: 4px !important;
  cursor: default !important;
}

.attr::before,
.mufy_ai_message_bubble .attr::before {
  content: attr(data-l) !important;
  display: block !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #8a7a68 !important;
  margin-bottom: 4px !important;
}

.attr::after,
.mufy_ai_message_bubble .attr::after {
  content: attr(data-v) !important;
  display: block !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #2a2218 !important;
  line-height: 1.2 !important;
}

/* ========== 胶囊 pill ========== */
.pill,
div.pill,
.mufy_ai_message_bubble .pill {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 10px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #3a3228 !important;
  background: #f5f0e8 !important;
  border: 1px solid #ddd5c5 !important;
  border-radius: 12px !important;
  line-height: 1.4 !important;
  cursor: default !important;
}

.pill.红,
.pill.红,
div.pill.红,
.mufy_ai_message_bubble .pill.红 {
  color: #8b3030 !important;
  background: #fff0f0 !important;
  border-color: #e8a8a8 !important;
}

.pill.金,
div.pill.金,
.mufy_ai_message_bubble .pill.金 {
  color: #7a5a20 !important;
  background: #fff8e8 !important;
  border-color: #e8d090 !important;
}

.pill.蓝,
div.pill.蓝,
.mufy_ai_message_bubble .pill.蓝 {
  color: #305880 !important;
  background: #eef4ff !important;
  border-color: #a8c8e8 !important;
}

.pill.紫,
div.pill.紫,
.mufy_ai_message_bubble .pill.紫 {
  color: #5a4088 !important;
  background: #f3eeff !important;
  border-color: #c8b8e8 !important;
}

/* ========== 悬停提示 os-tip ========== */
.os-body,
div.os-body,
.mufy_ai_message_bubble .os-body,
.wt-compact,
.mufy_ai_message_bubble .wt-compact,
.wt-kpi,
div.wt-kpi,
.mufy_ai_message_bubble .wt-kpi,
details.aci,
.mufy_ai_message_bubble details.aci,
details.asi,
.mufy_ai_message_bubble details.asi,
.asp,
div.asp,
.mufy_ai_message_bubble .asp,
.os-panel,
div.os-panel,
.mufy_ai_message_bubble .os-panel,
details.im,
.mufy_ai_message_bubble details.im {
  overflow: visible !important;
}

.os-tip,
div.os-tip,
.mufy_ai_message_bubble .os-tip {
  display: none !important;
  position: absolute !important;
  bottom: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 2147483647 !important;
  min-width: 140px !important;
  max-width: 260px !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: #f5f0e8 !important;
  background: #1a1410 !important;
  border: 1px solid #c4a035 !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  pointer-events: none !important;
  white-space: normal !important;
  text-align: left !important;
}

.os-tip b,
.mufy_ai_message_bubble .os-tip b {
  display: block !important;
  margin: 0 0 4px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #e8c878 !important;
}

.os-tip em,
.mufy_ai_message_bubble .os-tip em {
  display: block !important;
  font-style: normal !important;
  font-size: 11px !important;
  color: #d8d0c8 !important;
}

.os-tip::after,
.mufy_ai_message_bubble .os-tip::after {
  content: "" !important;
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  border: 6px solid transparent !important;
  border-top-color: #c4a035 !important;
}

.bar:hover,
.attr:hover,
.pill:hover,
.wt-kpi-i:hover,
.slot:hover,
.mufy_ai_message_bubble .bar:hover,
.mufy_ai_message_bubble .attr:hover,
.mufy_ai_message_bubble .pill:hover,
.mufy_ai_message_bubble .wt-kpi-i:hover,
.mufy_ai_message_bubble .slot:hover {
  z-index: 100001 !important;
}

.wt:has(.wt-kpi-i:hover),
details.aci:has(.bar:hover),
details.aci:has(.attr:hover),
details.aci:has(.pill:hover),
details.aci:has(.slot:hover),
details.asi:has(.bar:hover),
details.asi:has(.attr:hover),
details.asi:has(.pill:hover),
.mufy_ai_message_bubble .wt:has(.wt-kpi-i:hover),
.mufy_ai_message_bubble details.aci:has(.bar:hover),
.mufy_ai_message_bubble details.aci:has(.attr:hover),
.mufy_ai_message_bubble details.aci:has(.pill:hover),
.mufy_ai_message_bubble details.aci:has(.slot:hover),
.mufy_ai_message_bubble details.asi:has(.bar:hover),
.mufy_ai_message_bubble details.asi:has(.attr:hover),
.mufy_ai_message_bubble details.asi:has(.pill:hover) {
  z-index: 100000 !important;
}

.acp:has(.bar:hover),
.acp:has(.attr:hover),
.acp:has(.pill:hover),
.acp:has(.slot:hover),
.mufy_ai_message_bubble .acp:has(.bar:hover),
.mufy_ai_message_bubble .acp:has(.attr:hover),
.mufy_ai_message_bubble .acp:has(.pill:hover),
.mufy_ai_message_bubble .acp:has(.slot:hover) {
  z-index: 99999 !important;
  position: relative !important;
}

.bar:hover .os-tip,
.attr:hover .os-tip,
.pill:hover .os-tip,
.os-row:hover > .os-tip,
.wt-kpi-i:hover .os-tip,
.slot:hover .os-tip,
.mufy_ai_message_bubble .bar:hover .os-tip,
.mufy_ai_message_bubble .attr:hover .os-tip,
.mufy_ai_message_bubble .pill:hover .os-tip,
.mufy_ai_message_bubble .wt-kpi-i:hover .os-tip,
.mufy_ai_message_bubble .slot:hover .os-tip {
  display: block !important;
}

.pill:not(:hover) .os-tip,
.mufy_ai_message_bubble .pill:not(:hover) .os-tip {
  display: none !important;
}

/* 任务/下一步：直出内容，禁用悬停 tooltip */
details.aci.qs .pill:hover .os-tip,
details.aci.sg .pill:hover .os-tip,
.mufy_ai_message_bubble details.aci.qs .pill:hover .os-tip,
.mufy_ai_message_bubble details.aci.sg .pill:hover .os-tip {
  display: none !important;
}

/* ========== 下一步 suggested_questions ========== */
details.aci.sg suggested_questions,
.mufy_ai_message_bubble details.aci.sg suggested_questions {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  white-space: normal !important;
}

details.aci.sg suggested_questions p,
details.aci.sg suggested_questions li,
details.aci.sg suggested_questions span,
.mufy_ai_message_bubble details.aci.sg suggested_questions p,
.mufy_ai_message_bubble details.aci.sg suggested_questions li,
.mufy_ai_message_bubble details.aci.sg suggested_questions span {
  display: block !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
  color: #3a3228 !important;
  background: #fffef9 !important;
  border: 1px solid #ebe4da !important;
  border-left: 3px solid #c4a035 !important;
  border-radius: 0 6px 6px 0 !important;
  box-shadow: 0 1px 4px rgba(58, 50, 40, 0.04) !important;
}

details.aci.sg suggested_questions p::first-line,
details.aci.sg suggested_questions li::first-line,
details.aci.sg suggested_questions span::first-line,
.mufy_ai_message_bubble details.aci.sg suggested_questions p::first-line,
.mufy_ai_message_bubble details.aci.sg suggested_questions li::first-line,
.mufy_ai_message_bubble details.aci.sg suggested_questions span::first-line {
  font-weight: 700 !important;
  color: #2a2218 !important;
}

details.aci.sg suggested_questions p:last-child,
details.aci.sg suggested_questions li:last-child,
details.aci.sg suggested_questions span:last-child,
.mufy_ai_message_bubble details.aci.sg suggested_questions p:last-child,
.mufy_ai_message_bubble details.aci.sg suggested_questions li:last-child,
.mufy_ai_message_bubble details.aci.sg suggested_questions span:last-child {
  margin-bottom: 0 !important;
}

.sg-body,
div.sg-body,
.mufy_ai_message_bubble .sg-body {
  padding: 10px 12px !important;
}

details.aci.sg .os-body,
.mufy_ai_message_bubble details.aci.sg .os-body {
  padding: 0 !important;
}

details.aci.sg .sg-body,
.mufy_ai_message_bubble details.aci.sg .sg-body {
  padding: 10px 12px !important;
}

@media (max-width: 560px) {
  details.aci.sg suggested_questions p,
  details.aci.sg suggested_questions li,
  details.aci.sg suggested_questions span,
  .mufy_ai_message_bubble details.aci.sg suggested_questions p,
  .mufy_ai_message_bubble details.aci.sg suggested_questions li,
  .mufy_ai_message_bubble details.aci.sg suggested_questions span {
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
}

/* ========== 任务卷宗 qs ========== */
.qs-body,
.mufy_ai_message_bubble .qs-body {
  padding: 10px 12px !important;
}

.qs-sum,
div.qs-sum,
.mufy_ai_message_bubble .qs-sum {
  display: block !important;
  margin: 0 0 10px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #5c4220 !important;
  text-align: center !important;
  background: #fffef9 !important;
  border: 1px solid #ebe4da !important;
  border-radius: 20px !important;
}

.qs-sec,
div.qs-sec,
.mufy_ai_message_bubble .qs-sec {
  margin: 0 0 4px !important;
}

.qs-sh,
div.qs-sh,
.mufy_ai_message_bubble .qs-sh {
  margin: 0 0 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #2a2218 !important;
}

.qs-sep,
div.qs-sep,
.mufy_ai_message_bubble .qs-sep {
  margin: 10px 0 !important;
  border: none !important;
  border-top: 1px dashed #d8cfc0 !important;
}

.qsc,
div.qsc,
.mufy_ai_message_bubble .qsc {
  position: relative !important;
  margin: 0 0 8px !important;
  padding: 10px 12px 8px !important;
  background: #f5f0e6 !important;
  border: 1px solid #e0d8c8 !important;
  border-radius: 6px !important;
}

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

.qsc-ph,
span.qsc-ph,
.mufy_ai_message_bubble .qsc-ph {
  position: absolute !important;
  top: 8px !important;
  right: 10px !important;
  padding: 2px 8px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #9c2c2c !important;
  background: #fff0f0 !important;
  border: 1px solid #e8c0c0 !important;
  border-radius: 10px !important;
}

.qsc-time .qsc-ph,
.mufy_ai_message_bubble .qsc-time .qsc-ph {
  color: #3d5c8a !important;
  background: #eef4ff !important;
  border-color: #b8cce8 !important;
}

.qsc-side .qsc-ph,
.mufy_ai_message_bubble .qsc-side .qsc-ph {
  color: #8a6820 !important;
  background: #fff8e8 !important;
  border-color: #e8d8a8 !important;
}

.qsc-t,
div.qsc-t,
.mufy_ai_message_bubble .qsc-t {
  margin: 0 56px 6px 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #b86820 !important;
  line-height: 1.4 !important;
}

.qsc-d,
div.qsc-d,
.mufy_ai_message_bubble .qsc-d {
  margin: 0 0 8px !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: #3a3228 !important;
}

.qsc-f,
div.qsc-f,
.mufy_ai_message_bubble .qsc-f {
  padding-top: 6px !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
  color: #8a7a68 !important;
  border-top: 1px dashed #ddd4c4 !important;
}

.qsc-f em,
.mufy_ai_message_bubble .qsc-f em {
  font-style: normal !important;
  font-weight: 700 !important;
  color: #9c7a30 !important;
  margin-right: 2px !important;
}

.qs-empty,
div.qs-empty,
.mufy_ai_message_bubble .qs-empty {
  padding: 4px 0 2px !important;
  font-size: 12px !important;
  color: #8a7a68 !important;
}

details.aci.qs .os-body,
.mufy_ai_message_bubble details.aci.qs .os-body {
  padding: 0 !important;
}

/* ========== 正文 tx ========== */
.tx,
div.tx,
.mufy_ai_message_bubble .tx {
  display: block !important;
  margin: 0 0 12px !important;
  padding: 16px 18px 18px 24px !important;
  background: #faf8f3 !important;
  border: 1px solid #e8e0d0 !important;
  border-left: 3px solid #9c2c2c !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(58, 50, 40, 0.05) !important;
}

.tx p,
.mufy_ai_message_bubble .tx p {
  margin: 0 0 10px !important;
  font-size: 15px !important;
  line-height: 1.85 !important;
  color: #2a2218 !important;
  text-indent: 2em !important;
}

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

/* ========== 正文掷骰 dc ========== */
.tx .dc,
div.tx .dc,
.mufy_ai_message_bubble .tx .dc {
  margin: 14px 0 !important;
  padding: 10px 14px !important;
  background: linear-gradient(180deg, #fffef9, #f8f2e8) !important;
  border: 1px solid #d8cfc0 !important;
  border-left: 4px solid #c4a035 !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(58, 50, 40, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  text-indent: 0 !important;
}

.dc-h,
div.dc-h,
.mufy_ai_message_bubble .dc-h {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 6px !important;
}

.dc-i,
span.dc-i,
.mufy_ai_message_bubble .dc-i {
  flex-shrink: 0 !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

.dc-n,
span.dc-n,
.mufy_ai_message_bubble .dc-n {
  flex: 1 1 auto !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #5c4220 !important;
  letter-spacing: 0.04em !important;
}

.dc-o,
span.dc-o,
.mufy_ai_message_bubble .dc-o {
  flex-shrink: 0 !important;
  padding: 2px 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  letter-spacing: 0.06em !important;
}

.dc-o.win,
.mufy_ai_message_bubble .dc-o.win {
  color: #8a6820 !important;
  background: #fff8e0 !important;
  border: 1px solid #e8d080 !important;
}

.dc-o.ok,
.mufy_ai_message_bubble .dc-o.ok {
  color: #3d6a3a !important;
  background: #eef8ee !important;
  border: 1px solid #b8d8b8 !important;
}

.dc-o.mid,
.mufy_ai_message_bubble .dc-o.mid {
  color: #5c5040 !important;
  background: #f5f0e8 !important;
  border: 1px solid #d8cfc0 !important;
}

.dc-o.fail,
.mufy_ai_message_bubble .dc-o.fail {
  color: #9c2c2c !important;
  background: #fff0f0 !important;
  border: 1px solid #e8c0c0 !important;
}

.dc-o.miss,
.mufy_ai_message_bubble .dc-o.miss {
  color: #fff !important;
  background: #7a2020 !important;
  border: 1px solid #5c1818 !important;
}

.dc-b,
div.dc-b,
.mufy_ai_message_bubble .dc-b {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  color: #3a3228 !important;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace !important;
  letter-spacing: 0.02em !important;
}

.dc-v,
span.dc-v,
.mufy_ai_message_bubble .dc-v {
  font-weight: 700 !important;
  color: #9c2c2c !important;
}

dv,
.mufy_ai_message_bubble dv {
  display: block !important;
  height: 1px !important;
  margin: 0 0 12px !important;
  background: linear-gradient(90deg, transparent, #c4a035 50%, transparent) !important;
  border: none !important;
}

/* ========== 底栏折叠 aci ========== */
sb,
.mufy_ai_message_bubble sb {
  display: block !important;
}

details.aci,
.mufy_ai_message_bubble details.aci {
  position: relative !important;
  margin: 0 0 8px !important;
}

.act,
summary.act,
.mufy_ai_message_bubble summary.act {
  padding: 9px 14px 9px 32px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  color: #faf8f3 !important;
  background: linear-gradient(180deg, #5c4033, #4a3228) !important;
  border: 1px solid #3d2b1f !important;
  border-radius: 6px 6px 0 0 !important;
  cursor: pointer !important;
  position: relative !important;
}

.act::before,
summary.act::before,
.mufy_ai_message_bubble summary.act::before {
  content: "▸" !important;
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #e8c878 !important;
  font-size: 11px !important;
}

details.aci[open] > .act::before,
.mufy_ai_message_bubble details.aci[open] > summary.act::before {
  transform: translateY(-50%) rotate(90deg) !important;
}

.acp,
div.acp,
.mufy_ai_message_bubble .acp {
  padding: 0 !important;
  background: transparent !important;
  border: 1px solid #e8e0d0 !important;
  border-top: none !important;
  border-radius: 0 0 8px 8px !important;
  overflow: visible !important;
}

.acp > .os-body,
.mufy_ai_message_bubble .acp > .os-body {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

details.aci.pl > .act,
.mufy_ai_message_bubble details.aci.pl > summary.act {
  background: linear-gradient(180deg, #7a5a28, #5c4220) !important;
}

details.aci.fc > .act,
.mufy_ai_message_bubble details.aci.fc > summary.act {
  background: linear-gradient(180deg, #9c2c2c, #7a2020) !important;
}

details.aci.hr > .act,
.mufy_ai_message_bubble details.aci.hr > summary.act {
  background: linear-gradient(180deg, #8b4a5a, #6b3848) !important;
}

details.aci.qs > .act,
.mufy_ai_message_bubble details.aci.qs > summary.act {
  background: linear-gradient(180deg, #3d5c3a, #2d4428) !important;
}

details.aci.mm > .act,
.mufy_ai_message_bubble details.aci.mm > summary.act {
  background: linear-gradient(180deg, #4a3d68, #362a50) !important;
}

details.aci.sg > .act,
.mufy_ai_message_bubble details.aci.sg > summary.act {
  background: linear-gradient(180deg, #6b5030, #4a3820) !important;
}

details.aci.bu > .act,
.mufy_ai_message_bubble details.aci.bu > summary.act {
  background: linear-gradient(180deg, #6b5a38, #504428) !important;
}

details.aci.ml > .act,
.mufy_ai_message_bubble details.aci.ml > summary.act {
  background: linear-gradient(180deg, #4a4a50, #363640) !important;
}

details.aci.rs > .act,
.mufy_ai_message_bubble details.aci.rs > summary.act {
  background: linear-gradient(180deg, #505848, #3a4032) !important;
}

details.aci.sc > .act,
.mufy_ai_message_bubble details.aci.sc > summary.act {
  background: linear-gradient(180deg, #5c5040, #4a4030) !important;
}

details.aci.sc .asi.bu > .ast,
.mufy_ai_message_bubble details.aci.sc .asi.bu > summary.ast {
  color: #7a5a28 !important;
}

details.aci.sc .asi.ml > .ast,
.mufy_ai_message_bubble details.aci.sc .asi.ml > summary.ast {
  color: #4a4a50 !important;
}

details.aci.sc .asi.rs > .ast,
.mufy_ai_message_bubble details.aci.sc .asi.rs > summary.ast {
  color: #5c4220 !important;
}

/* ========== 子折叠 asi ========== */
details.asi,
.mufy_ai_message_bubble details.asi {
  border-top: 1px dashed #ebe4da !important;
}

.ast,
summary.ast,
.mufy_ai_message_bubble summary.ast {
  padding: 7px 12px 7px 24px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #5c4220 !important;
  background: #f5f0e8 !important;
  cursor: pointer !important;
}

.asp,
div.asp,
.mufy_ai_message_bubble .asp {
  padding: 0 !important;
  background: #fffef9 !important;
}

.asp > .os-body,
.mufy_ai_message_bubble .asp > .os-body {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* ========== 私密 im ========== */
details.im,
.mufy_ai_message_bubble details.im {
  margin: 6px 4px !important;
  border: 1px solid #e8c0c8 !important;
  border-radius: 4px !important;
}

.imh,
summary.imh,
.mufy_ai_message_bubble summary.imh {
  padding: 6px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #8b4a5a !important;
  background: #fff5f7 !important;
  cursor: pointer !important;
}

.imb,
span.imb,
.mufy_ai_message_bubble .imb {
  margin-left: 6px !important;
  padding: 1px 5px !important;
  font-size: 10px !important;
  color: #fff !important;
  background: #8b4a5a !important;
  border-radius: 2px !important;
}

.imd,
div.imd,
.mufy_ai_message_bubble .imd {
  padding: 0 !important;
}

/* ========== 记忆表 mt ========== */
details.msi,
.mufy_ai_message_bubble details.msi {
  border-top: 1px dashed #ebe4da !important;
}

.mst,
summary.mst,
.mufy_ai_message_bubble summary.mst {
  padding: 7px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #4a3d68 !important;
  background: #f0ecf8 !important;
  cursor: pointer !important;
}

.msp,
div.msp,
.mufy_ai_message_bubble .msp {
  padding: 8px !important;
}

table.mt,
.mufy_ai_message_bubble table.mt {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 12px !important;
  margin: 0 0 8px !important;
  background: #fffef9 !important;
  border: 1px solid #e8e0d0 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
}

table.mt th,
.mufy_ai_message_bubble table.mt th {
  padding: 6px 8px !important;
  font-weight: 700 !important;
  color: #faf8f3 !important;
  background: #4a3d68 !important;
  border: 1px solid #362a50 !important;
  text-align: center !important;
}

table.mt td,
.mufy_ai_message_bubble table.mt td {
  padding: 6px 8px !important;
  color: #3a3228 !important;
  border: 1px solid #ebe4da !important;
  vertical-align: top !important;
  line-height: 1.5 !important;
}

table.mt tbody tr:nth-child(even) td,
.mufy_ai_message_bubble table.mt tbody tr:nth-child(even) td {
  background: #faf8f3 !important;
}

/* ========== 装备槽 slot（场景扩展） ========== */
.os-eq-mini,
div.os-eq-mini,
.mufy_ai_message_bubble .os-eq-mini {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.slot,
div.slot,
.mufy_ai_message_bubble .slot {
  position: relative !important;
  padding: 10px 4px 6px !important;
  text-align: center !important;
  font-size: 18px !important;
  background: #fffef9 !important;
  border: 1px solid #e8e0d0 !important;
  border-radius: 4px !important;
}

.slot::after,
.mufy_ai_message_bubble .slot::after {
  content: attr(data-s) !important;
  display: block !important;
  margin-top: 4px !important;
  font-size: 10px !important;
  color: #8a7a68 !important;
}

/* ========== 移动端 ========== */
@media (max-width: 560px) {
  .os-attrs,
  .mufy_ai_message_bubble .os-attrs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .os-bars,
  .mufy_ai_message_bubble .os-bars {
    grid-template-columns: 1fr !important;
  }

  .os-title,
  .mufy_ai_message_bubble .os-title {
    font-size: 14px !important;
    letter-spacing: 0.12em !important;
  }

  .wt-kpi,
  .mufy_ai_message_bubble .wt-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .os-tip,
  .mufy_ai_message_bubble .os-tip {
    max-width: 200px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 400px) {
  .os-attrs,
  .mufy_ai_message_bubble .os-attrs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* 触控设备：点击 pill/attr/bar 也能显示 tip */
@media (hover: none) {
  .pill:focus .os-tip,
  .attr:focus .os-tip,
  .bar:focus .os-tip,
  .pill:active .os-tip,
  .attr:active .os-tip,
  .bar:active .os-tip {
    display: block !important;
  }

  .pill,
  .attr,
  .bar,
  .slot {
    cursor: pointer !important;
  }
}