/* ============================================================
   咒术回战 · 咒术纸本（明亮版，无深色）
   底 #F7F3EA / 面 #FBF8F1 / 分隔 #D9CFBE / 弱面 #F0EBE0
   咒力紫 #8B6FC4 · 浅咒紫 #C9B8E8 · 紫底 #F0EBFA
   五条蓝 #5B9BD5 · 浅蓝 #A8CCEA · 蓝底 #EAF2FA
   宿傩朱 #C45B5B · 特等金 #C9A24B · 淡珊瑚 #D48A8A
   墨 #3D3A44 · 正文 #5E5A66 · 弱字 #9A95A3
   ------------------------------------------------------------
   创新点：咒力流动顶边 / 呪字御札纹章 / 式神纹折叠指示
           领域展开加载 / 无量空处代码块 / 结界引用 / 术式录表格
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Serif+JP:wght@400;500;600;700&family=Ma+Shan+Zheng&display=swap');

/* ---------- 动画池 ---------- */
@keyframes jjk-curse-flow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes jjk-talisman-sway {
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(4deg); }
}
@keyframes jjk-domain-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(139,111,196,0.25); }
  60%  { box-shadow: 0 0 0 10px rgba(139,111,196,0); }
  100% { box-shadow: 0 2px 12px rgba(139,111,196,0.08), 0 1px 3px rgba(0,0,0,0.03); }
}
@keyframes jjk-domain-spin {
  to { transform: rotate(360deg); }
}
@keyframes jjk-text-fade {
  0%   { opacity: 0; letter-spacing: 6px; }
  30%  { opacity: 1; letter-spacing: 3px; }
  70%  { opacity: 1; letter-spacing: 3px; }
  100% { opacity: 0; letter-spacing: 0px; }
}
@keyframes jjk-sky-drift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ===================== 全局盒模型 ===================== */
details, details * { box-sizing: border-box !important; }

/* ===================== 状态栏 · 咒术卡片 ===================== */
details {
  position: relative !important;
  max-width: 100% !important;
  margin: 16px 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 1px solid #D9CFBE !important;
  border-top: 3px solid transparent !important;
  border-radius: 14px !important;
  background: #F7F3EA !important;
  box-shadow: 0 2px 12px rgba(139,111,196,0.08), 0 1px 3px rgba(0,0,0,0.03) !important;
  color: #3D3A44 !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "思源宋体", serif !important;
  overflow-wrap: break-word !important;
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(139,111,196,0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 80%, rgba(91,155,213,0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(139,111,196,0.02) 0%, transparent 60%) !important;
}
/* 顶部咒力流动光带 */
details::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  border-radius: 14px 14px 0 0 !important;
  background: linear-gradient(90deg, #8B6FC4, #5B9BD5, #A8CCEA, #C9B8E8, #8B6FC4) !important;
  background-size: 300% 100% !important;
  animation: jjk-curse-flow 5s linear infinite !important;
  z-index: 1 !important;
  pointer-events: none !important;
}
details::after { content: none !important; display: none !important; }

/* ===== 标题栏 · 呪字御札 ===== */
details > summary {
  position: relative !important;
  padding: 12px 16px 12px 40px !important;
  cursor: pointer !important;
  list-style: none !important;
  user-select: none !important;
  overflow: hidden !important;
  border-radius: 12px 12px 0 0 !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
  color: #3D3A44 !important;
  background: linear-gradient(135deg, #FBF8F1 0%, #F0EBE0 100%) !important;
  border-bottom: 1px dashed #C9B89A !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  transition: background 0.25s ease, color 0.25s ease !important;
  text-shadow: 0 0 1px rgba(139,111,196,0.15) !important;
}
/* 左侧呪字御札 */
details > summary::after {
  content: "" !important;
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  width: 16px !important;
  height: 20px !important;
  margin-top: -10px !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Crect x='5.5' y='3' width='13' height='22' rx='1.2' fill='%23FBF8F1' stroke='%238B6FC4' stroke-width='1'/%3E%3Cpath d='M7.5 3 L12 0.8 L16.5 3' stroke='%23C45B5B' stroke-width='1' fill='none' stroke-linecap='round'/%3E%3Ctext x='12' y='17' text-anchor='middle' font-size='9' font-weight='700' fill='%238B6FC4' font-family='Noto Serif JP, serif'%3E%E5%91%AA%3C/text%3E%3C/svg%3E") no-repeat center / contain !important;
  pointer-events: none !important;
  animation: jjk-talisman-sway 3.5s ease-in-out infinite !important;
  transform-origin: top center !important;
}
details > summary:hover {
  background: linear-gradient(135deg, #F0EBE0 0%, #F0EBFA 100%) !important;
  color: #2D2A35 !important;
}
details > summary::-webkit-details-marker { display: none !important; }
details > summary::marker { content: "" !important; }
/* 折叠指示 · 式神纹三角 */
details > summary::before {
  content: "" !important;
  position: absolute !important;
  right: 16px !important;
  top: 50% !important;
  width: 0 !important;
  height: 0 !important;
  margin-top: -5px !important;
  border-top: 5px solid transparent !important;
  border-bottom: 5px solid transparent !important;
  border-left: 8px solid #8B6FC4 !important;
  transition: transform 0.3s ease, border-left-color 0.3s ease !important;
}
details[open] > summary::before {
  transform: rotate(90deg) !important;
  border-left-color: #5B9BD5 !important;
}

/* ===== 卡片内容 ===== */
details > *:not(summary):not(table) {
  padding: 0 16px !important;
  margin: 8px 0 !important;
  line-height: 1.85 !important;
  color: #5E5A66 !important;
}
details > p { font-size: 14px !important; }
details[open] {
  padding-bottom: 12px !important;
  animation: jjk-domain-pulse 0.6s ease-out !important;
}
details strong, details b {
  color: #3D3A44 !important;
  font-weight: 600 !important;
  background: linear-gradient(transparent 60%, rgba(139,111,196,0.18) 60%) !important;
  padding: 0 2px !important;
}
details em, details i {
  color: #5B9BD5 !important;
  font-style: italic !important;
}
details code {
  background: #F0EBFA !important;
  color: #6B4FA8 !important;
  border: 1px solid #C9B8E8 !important;
  border-radius: 6px !important;
  padding: 1px 7px !important;
  font-size: 12.5px !important;
}
details blockquote {
  margin: 10px 16px !important;
  padding: 10px 16px !important;
  border: none !important;
  border-left: 3px double #8B6FC4 !important;
  border-radius: 0 10px 10px 0 !important;
  background: linear-gradient(90deg, #F0EBFA 0%, #F7F3EA 100%) !important;
  color: #5E5A66 !important;
  font-style: italic !important;
}
details hr {
  border: none !important;
  height: 1px !important;
  margin: 14px 16px !important;
  background: linear-gradient(90deg, transparent 0%, #C9B89A 20%, #8B6FC4 50%, #5B9BD5 80%, transparent 100%) !important;
}
details ul, details ol { padding-left: 28px !important; margin: 6px 0 !important; }
details li { margin: 3px 0 !important; color: #5E5A66 !important; line-height: 1.75 !important; }
details ul li::marker { color: #8B6FC4 !important; content: "◈ " !important; }
details ol li::marker { color: #5B9BD5 !important; font-weight: 600 !important; }

/* ===================== 表格 · 术式录 ===================== */
details table,
.markdown-body table {
  display: block !important;
  width: max-content !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  border: 1px solid #D9CFBE !important;
  border-radius: 12px !important;
  background: #F7F3EA !important;
  box-shadow: 0 2px 8px rgba(139,111,196,0.06) !important;
  font-size: 13px !important;
}
details table { max-width: calc(100% - 32px) !important; margin: 14px 16px !important; }
.markdown-body table { margin: 12px 0 !important; }
details th, details td,
.markdown-body th, .markdown-body td {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  max-width: none !important;
  vertical-align: middle !important;
  text-align: left !important;
}
details th, .markdown-body th {
  padding: 9px 14px !important;
  background: linear-gradient(135deg, #F0EBFA 0%, #EAF2FA 100%) !important;
  color: #5B4580 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
  border-bottom: 2px solid #C9B8E8 !important;
}
details td, .markdown-body td {
  padding: 8px 14px !important;
  color: #5E5A66 !important;
  line-height: 1.65 !important;
  border-bottom: 1px solid #E8E0D0 !important;
}
details td:first-child, .markdown-body td:first-child {
  color: #3D3A44 !important;
  font-weight: 600 !important;
}
details tbody tr { transition: background 0.2s ease !important; }
details tbody tr:nth-child(even) { background: #FBF8F1 !important; }
details tbody tr:nth-child(odd) { background: #F7F3EA !important; }
details tbody tr:last-child td { border-bottom: none !important; }
details tbody tr:hover { background: #F0EBFA !important; }
details tbody tr:hover td { color: #3D3A44 !important; }
details table::-webkit-scrollbar,
.markdown-body table::-webkit-scrollbar { height: 6px !important; }
details table::-webkit-scrollbar-track,
.markdown-body table::-webkit-scrollbar-track { background: #F0EBE0 !important; border-radius: 999px !important; }
details table::-webkit-scrollbar-thumb,
.markdown-body table::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #C9B8E8, #A8CCEA) !important;
  border-radius: 999px !important;
}

/* ===================== 嵌套卡片 ===================== */
details details {
  overflow: visible !important;
  margin: 12px 16px !important;
  border: 1px solid #D9CFBE !important;
  border-top: 2px solid transparent !important;
  border-radius: 12px !important;
  background: #FBF8F1 !important;
  box-shadow: 0 1px 6px rgba(91,155,213,0.08) !important;
  background-image: none !important;
}
details details::before {
  background: linear-gradient(90deg, #5B9BD5, #C9A24B, #A8CCEA, #5B9BD5) !important;
  background-size: 300% 100% !important;
  animation: jjk-curse-flow 6s linear infinite !important;
}
details details > summary {
  padding: 9px 14px 9px 36px !important;
  font-size: 13.5px !important;
  color: #4A5568 !important;
  background: linear-gradient(135deg, #F0EBE0 0%, #F7F3EA 100%) !important;
  border-radius: 10px 10px 0 0 !important;
  letter-spacing: 0.8px !important;
}
details details > summary::after {
  left: 12px !important;
  width: 14px !important;
  height: 18px !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Crect x='5.5' y='3' width='13' height='22' rx='1.2' fill='%23FBF8F1' stroke='%235B9BD5' stroke-width='1'/%3E%3Cpath d='M7.5 3 L12 0.8 L16.5 3' stroke='%23C9A24B' stroke-width='1' fill='none' stroke-linecap='round'/%3E%3Ctext x='12' y='17' text-anchor='middle' font-size='9' font-weight='700' fill='%235B9BD5' font-family='Noto Serif JP, serif'%3E%E5%91%AA%3C/text%3E%3C/svg%3E") no-repeat center / contain !important;
}
details details > summary::before { right: 14px !important; }
details details table { max-width: calc(100% - 28px) !important; margin: 10px 14px !important; }

/* ==================== 移动端适配 ==================== */
@media (max-width: 640px) {
  details { margin: 12px 0 !important; border-radius: 12px !important; }
  details > summary { padding: 10px 14px 10px 36px !important; font-size: 14px !important; letter-spacing: 0.6px !important; }
  details > summary::after { left: 12px !important; width: 14px !important; height: 18px !important; }
  details > summary::before { right: 14px !important; }
  details table { max-width: calc(100% - 20px) !important; margin: 10px 10px !important; font-size: 12.5px !important; }
  details th, details td { padding: 7px 10px !important; }
  details > *:not(summary):not(table) { padding: 0 12px !important; }
  details blockquote { margin: 8px 12px !important; }
  details hr { margin: 10px 12px !important; }
  details ul, details ol { padding-left: 24px !important; }
  details details { margin: 8px 12px !important; }
  details details > summary { padding-left: 32px !important; font-size: 13px !important; }
  details details table { max-width: calc(100% - 16px) !important; margin: 8px 8px !important; }
}

/* ===================== 顶部栏 ===================== */
.sticky.w-full.top-0.flex.items-center {
  background: #F7F3EA !important;
  border-bottom: 1px solid #D9CFBE !important;
  box-shadow: 0 1px 4px rgba(139,111,196,0.05) !important;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}
.sticky.w-full.top-0.flex.items-center::after { content: none !important; display: none !important; }
#ai-model-selector .group.flex.items-center {
  padding: 2px 10px !important;
  background: #FBF8F1 !important;
  border: 1px solid #D9CFBE !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  transition: all 0.25s ease !important;
}
#ai-model-selector .group.flex.items-center:hover {
  border-color: #C9B8E8 !important;
  background: #F0EBFA !important;
}
#ai-model-selector .truncate.text-\[13px\] {
  color: #3D3A44 !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
}
#ai-model-selector .shrink-0.flex.items-center svg { color: #8B6FC4 !important; stroke-width: 2 !important; }
.sticky.w-full.top-0 svg.lucide-clock-8 {
  color: #8B8595 !important;
  stroke-width: 2 !important;
  transition: color 0.2s ease !important;
}
.sticky.w-full.top-0 svg.lucide-clock-8:hover { color: #8B6FC4 !important; }
.sticky.w-full.top-0 span.MuiBadge-dot.md\:hidden {
  background: #C45B5B !important;
  border: none !important;
  box-shadow: 0 0 0 2px #F7F3EA !important;
}
.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2 {
  color: #8B8595 !important;
  stroke-width: 2 !important;
  transition: color 0.2s ease !important;
}
.sticky.w-full.top-0 button.MuiIconButton-root:hover svg.lucide-music-2 { color: #5B9BD5 !important; }
#header-setting-button {
  background: #FBF8F1 !important;
  border: 1px solid #D9CFBE !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  transition: all 0.25s ease !important;
}
#header-setting-button:hover { border-color: #A8CCEA !important; background: #EAF2FA !important; }
#header-setting-button svg { color: #8B8595 !important; stroke-width: 2 !important; transition: color 0.2s ease !important; }
#header-setting-button:hover svg { color: #5B9BD5 !important; }

/* ===================== 开场白选择器 ===================== */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
  background: #F7F3EA !important;
  border: 1px solid #D9CFBE !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  transition: all 0.25s ease !important;
}
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
  border-color: #C9B8E8 !important;
  background: #F0EBFA !important;
}
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="SlidersH"] { color: #8B6FC4 !important; }
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="ChevronDown"] {
  color: #9A95A3 !important;
  transition: transform 0.2s ease, color 0.2s ease !important;
}
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover svg[data-icon="ChevronDown"] {
  transform: translateY(1px) !important;
  color: #8B6FC4 !important;
}

/* ===================== 按钮栏 ===================== */
#ai-mod-button2 button.MuiButton-root {
  color: #3D3A44 !important;
  background: #F7F3EA !important;
  border: 1px solid #D9CFBE !important;
  border-radius: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
  box-shadow: none !important;
  transition: all 0.25s ease !important;
}
#ai-mod-button2 button.MuiButton-root:hover {
  color: #6B4FA8 !important;
  background: #F0EBFA !important;
  border-color: #C9B8E8 !important;
}
#ai-mod-button2 button.MuiButton-root:active { background: #C9B8E8 !important; }
#ai-mod-button2 button.MuiButton-root svg { color: #8B6FC4 !important; stroke-width: 2 !important; }

/* ===================== 底部输入区 ===================== */
.bg-gradient-to-t {
  background: #F7F3EA !important;
  border-top: 1px solid #D9CFBE !important;
  box-shadow: none !important;
}
#ai-chat-bottom-input {
  border: 1px solid #C9B89A !important;
  border-radius: 14px !important;
  background: #FBF8F1 !important;
  box-shadow: 0 2px 8px rgba(139,111,196,0.05) !important;
  transition: all 0.25s ease !important;
}
#ai-chat-bottom-input:focus-within {
  border-color: #C9B8E8 !important;
  background: #F7F3EA !important;
  box-shadow: 0 2px 12px rgba(139,111,196,0.12) !important;
}
#ai-chat-input {
  color: #3D3A44 !important;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  letter-spacing: 0.2px !important;
}
#ai-chat-input::placeholder { color: #A8A3B0 !important; font-style: normal !important; letter-spacing: 0.4px !important; }
#ai-chat-input::selection { background: #C9B8E8 !important; color: #3D3A44 !important; }

/* ===================== 分页 ===================== */
.MuiPaginationItem-root {
  color: #5E5A66 !important;
  background: #F7F3EA !important;
  border: 1px solid #D9CFBE !important;
  border-radius: 10px !important;
  font-weight: 500 !important;
  transition: all 0.25s ease !important;
}
.MuiPaginationItem-root:hover {
  color: #6B4FA8 !important;
  border-color: #C9B8E8 !important;
  background: #F0EBFA !important;
}
.MuiPaginationItem-root.Mui-selected {
  color: #FBF8F1 !important;
  background: linear-gradient(135deg, #8B6FC4 0%, #5B9BD5 100%) !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(139,111,196,0.25) !important;
}
.MuiPaginationItem-root.Mui-disabled { color: #C5C0CC !important; }
.MuiPaginationItem-icon { color: #9A95A3 !important; }
.MuiStack-root.css-1uwir8f .MuiBox-root { color: #5E5A66 !important; }
.MuiInputBase-input { color: #3D3A44 !important; }

/* ===================== 评论区 ===================== */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
  background: #F7F3EA !important;
  border-top: 1px solid #D9CFBE !important;
}
div.text-lg.font-bold {
  color: #3D3A44 !important;
  font-weight: 600 !important;
  letter-spacing: 0.6px !important;
}
p.MuiTypography-body1.text-grey-600 { color: #5E5A66 !important; }
span.MuiRating-iconEmpty svg { color: #D9CFBE !important; }
span.MuiRating-iconFilled svg { color: #C9A24B !important; }
span.text-orange-500 { color: #8B6FC4 !important; font-weight: 600 !important; }
div.flex.flex-col.border-gray-200 {
  background: #F7F3EA !important;
  border: 1px solid #D9CFBE !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px rgba(139,111,196,0.06) !important;
}
textarea.rc-textarea {
  color: #3D3A44 !important;
  background: #F7F3EA !important;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}
div.bg-gray-100.text-gray-500 {
  background: #F0EBE0 !important;
  color: #5E5A66 !important;
  border-radius: 999px !important;
}
div.cursor-pointer.group.flex.items-center.justify-center {
  background: linear-gradient(135deg, #8B6FC4 0%, #5B9BD5 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(139,111,196,0.2) !important;
  transition: all 0.25s ease !important;
}
div.cursor-pointer.group.flex.items-center.justify-center:hover {
  box-shadow: 0 3px 12px rgba(139,111,196,0.35) !important;
  transform: translateY(-1px) !important;
}
div[data-state="closed"] svg[data-icon="Send03"] { color: #FBF8F1 !important; }
div.style_divider__mW0YX {
  border: none !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, #D9CFBE, transparent) !important;
}
button.MuiButton-containedPrimary {
  color: #FBF8F1 !important;
  background: linear-gradient(135deg, #8B6FC4 0%, #5B9BD5 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 2px 8px rgba(139,111,196,0.2) !important;
  transition: all 0.25s ease !important;
}
button.MuiButton-containedPrimary:hover {
  box-shadow: 0 3px 12px rgba(139,111,196,0.3) !important;
  transform: translateY(-1px) !important;
}
button.MuiButton-outlinedPrimary {
  color: #6B4FA8 !important;
  background: #F7F3EA !important;
  border: 1px solid #C9B8E8 !important;
  border-radius: 10px !important;
  font-weight: 500 !important;
  transition: all 0.25s ease !important;
}
button.MuiButton-outlinedPrimary:hover {
  color: #8B6FC4 !important;
  border-color: #8B6FC4 !important;
  background: #F0EBFA !important;
}
div.group.ml-0 { transition: none !important; }
div.group img.rounded-full {
  border: 2px solid #C9B8E8 !important;
  box-shadow: 0 1px 4px rgba(139,111,196,0.1) !important;
}
div.text-sm.text-grey-600 span.font-bold { color: #3D3A44 !important; font-weight: 600 !important; }
span.text-\[10px\] {
  padding: 2px 10px !important;
  border-radius: 999px !important;
  color: #6B4FA8 !important;
  background: #F0EBFA !important;
  border: 1px solid #C9B8E8 !important;
  font-weight: 500 !important;
}
div.break-all { color: #5E5A66 !important; }
div.text-xs.text-grey-600 { color: #9A95A3 !important; }
button.text-gray-400 svg { color: #A8A3B0 !important; transition: color 0.2s ease !important; }
button.text-gray-400:hover svg { color: #8B6FC4 !important; }
span.cursor-pointer { color: #8B6FC4 !important; font-weight: 500 !important; }
div.ml-8.border-l { border-left: 1px solid #D9CFBE !important; }

/* ===================== 聊天气泡 ===================== */
.bg-gray-100\/90.relative.inline-block {
  border: 1px solid #D9CFBE !important;
  border-radius: 14px !important;
  background: #F7F3EA !important;
  box-shadow: 0 2px 10px rgba(139,111,196,0.06) !important;
  transition: all 0.25s ease !important;
}
.bg-gray-100\/90.relative.inline-block:hover {
  border-color: #C9B8E8 !important;
  box-shadow: 0 4px 16px rgba(139,111,196,0.1) !important;
}
/* 用户侧气泡（咒力紫左边框） */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
  background: linear-gradient(135deg, #FBF8F1 0%, #F0EBFA 100%) !important;
  border: 1px solid #D8CCE8 !important;
  border-left: 3px solid #8B6FC4 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px rgba(139,111,196,0.08) !important;
}

/* ===== 气泡内文本 ===== */
.markdown-body {
  color: #5E5A66 !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "思源宋体", serif !important;
  line-height: 1.9 !important;
  font-size: 14.5px !important;
  letter-spacing: 0.3px !important;
}
.markdown-body p { margin: 8px 0 !important; }
.markdown-body strong, .markdown-body b {
  color: #3D3A44 !important;
  font-weight: 600 !important;
  background: linear-gradient(transparent 60%, rgba(139,111,196,0.18) 60%) !important;
  padding: 0 2px !important;
}
.markdown-body em, .markdown-body i { color: #5B9BD5 !important; font-style: italic !important; }
.markdown-body a {
  color: #8B6FC4 !important;
  text-decoration: none !important;
  border-bottom: 1px dashed #C9B8E8 !important;
  transition: all 0.2s ease !important;
}
.markdown-body a:hover { color: #6B4FA8 !important; border-bottom-color: #8B6FC4 !important; }
.markdown-body blockquote {
  border: none !important;
  border-left: 3px double #8B6FC4 !important;
  background: linear-gradient(90deg, #F0EBFA 0%, #F7F3EA 100%) !important;
  border-radius: 0 10px 10px 0 !important;
  padding: 8px 16px !important;
  margin: 10px 0 !important;
  color: #5E5A66 !important;
  font-style: italic !important;
}
.markdown-body code {
  background: #F0EBFA !important;
  color: #6B4FA8 !important;
  border: 1px solid #C9B8E8 !important;
  border-radius: 6px !important;
  padding: 1px 7px !important;
}

/* ===================== 代码块 · 无量空处 ===================== */
.markdown-body pre {
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #F7F3EA !important;
}
.markdown-body pre > div {
  border: 1px solid #D9CFBE !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #FBF8F1 !important;
  box-shadow: 0 2px 8px rgba(139,111,196,0.06) !important;
}
/* 无量空处天空头部（缓慢呼吸流动） */
.markdown-body pre > div > div.flex.justify-between.h-8,
.markdown-body pre > div > div.border-b {
  background: linear-gradient(135deg, #B8A4E0 0%, #8BB8E0 50%, #B8A4E0 100%) !important;
  background-size: 200% 200% !important;
  animation: jjk-sky-drift 8s ease-in-out infinite !important;
  border-color: transparent !important;
}
.markdown-body pre > div > div.flex.justify-between > div.text-\[13px\],
.markdown-body pre > div > div.flex.justify-between > div:first-child {
  color: #FBF8F1 !important;
  letter-spacing: 1px !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
}
.markdown-body pre svg.lucide-copy,
.markdown-body pre div[data-tooltip-id^="copy-tooltip"] > svg { color: rgba(251,248,241,0.7) !important; }
.markdown-body pre .group:hover svg.lucide-copy,
.markdown-body pre div[data-tooltip-id^="copy-tooltip"]:hover > svg { color: #FBF8F1 !important; }
/* 代码区 · 漂浮信息粒子 */
.markdown-body pre > div > div[node] {
  background:
    radial-gradient(1px 1px at 15% 25%, rgba(139,111,196,0.12), transparent 50%),
    radial-gradient(1px 1px at 45% 65%, rgba(91,155,213,0.10), transparent 50%),
    radial-gradient(1px 1px at 75% 35%, rgba(139,111,196,0.08), transparent 50%),
    radial-gradient(1px 1px at 90% 80%, rgba(91,155,213,0.10), transparent 50%),
    #FBF8F1 !important;
  background-size: 100% 100% !important;
  color: #5E5A66 !important;
  padding: 14px 16px !important;
}
.markdown-body pre code[class^="language-"] {
  color: #5E5A66 !important;
  font-size: 12.8px !important;
  line-height: 1.75 !important;
}
.markdown-body pre > code[node] {
  display: block !important;
  padding: 14px 16px !important;
  border: 1px solid #D9CFBE !important;
  border-radius: 12px !important;
  background: #FBF8F1 !important;
  color: #5E5A66 !important;
  font-size: 12.8px !important;
  line-height: 1.75 !important;
}

/* ===================== 底部附加元素 ===================== */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
  color: #8B8595 !important;
  border-radius: 10px !important;
  transition: all 0.25s ease !important;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
  color: #6B4FA8 !important;
  background: #F0EBFA !important;
}
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 { color: #9A95A3 !important; letter-spacing: 0.3px !important; }
.text-orange-500 { color: #8B6FC4 !important; }

/* ===================== 加载动画 · 领域展开 ===================== */
.style-module__AtdJSq__dot-flashing.style-module__AtdJSq__text { display: none !important; }
.flex.items-center.justify-center.w-6.h-5 {
  position: relative !important;
  width: 100% !important;
  min-width: 260px !important;
  max-width: 340px !important;
  height: 46px !important;
  min-height: 46px !important;
  margin-left: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #FBF8F1 0%, #F0EBE0 100%) !important;
  border: 1px solid #D9CFBE !important;
  box-shadow: 0 2px 10px rgba(139,111,196,0.08) !important;
}
/* 文字：领域展开中… */
.flex.items-center.justify-center.w-6.h-5::after {
  content: "领域展开中…" !important;
  position: absolute !important;
  display: block !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  font-family: "Ma Shan Zheng", "Noto Serif JP", "Noto Serif SC", cursive !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  color: #8B6FC4 !important;
  white-space: nowrap !important;
  letter-spacing: 3px !important;
  line-height: 1 !important;
  animation: jjk-text-fade 3s ease-in-out infinite !important;
  pointer-events: none !important;
  z-index: 2 !important;
}
/* 双环结界（左侧旋转） */
.flex.items-center.justify-center.w-6.h-5::before {
  content: "" !important;
  position: absolute !important;
  left: 24px !important;
  top: 50% !important;
  z-index: 1 !important;
  width: 30px !important;
  height: 30px !important;
  margin-top: -15px !important;
  border-radius: 50% !important;
  border: 2px solid #E8E0F0 !important;
  border-top-color: #8B6FC4 !important;
  border-right-color: #5B9BD5 !important;
  box-shadow: inset 0 0 0 3px #FBF8F1, inset 0 0 0 4px #C9B8E8 !important;
  pointer-events: none !important;
  animation: jjk-domain-spin 1.8s linear infinite !important;
}
@media (max-width: 480px) {
  .flex.items-center.justify-center.w-6.h-5 {
    min-width: 220px !important;
    max-width: 260px !important;
    height: 40px !important;
    min-height: 40px !important;
  }
  .flex.items-center.justify-center.w-6.h-5::after { font-size: 15px !important; letter-spacing: 2px !important; }
  .flex.items-center.justify-center.w-6.h-5::before { left: 18px !important; width: 26px !important; height: 26px !important; margin-top: -13px !important; }
}

/* ===================== 角色对话 ===================== */
p.role-danlan,
p.role-danlan-thought,
p.role-lan,
p.role-zon,
p.role-qianhon,
p.role-hui {
  position: relative !important;
  margin: 12px 0 !important;
  padding: 12px 16px !important;
  border: 1px solid #D9CFBE !important;
  border-left-width: 3px !important;
  border-left-style: solid !important;
  border-radius: 12px !important;
  background: #F7F3EA !important;
  font-family: "Noto Serif SC", "思源宋体", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: 14.5px !important;
  line-height: 1.85 !important;
  letter-spacing: 0.3px !important;
  box-shadow: 0 1px 4px rgba(139,111,196,0.05) !important;
  transition: all 0.25s ease !important;
}
p.role-danlan::before,
p.role-danlan-thought::before,
p.role-lan::before,
p.role-zon::before,
p.role-qianhon::before,
p.role-hui::before {
  display: block !important;
  width: fit-content !important;
  margin: 0 0 7px !important;
  padding: 2px 10px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  font-style: normal !important;
  letter-spacing: 1.5px !important;
  line-height: 1.6 !important;
  border-radius: 999px !important;
  background: #F7F3EA !important;
}
p.role-danlan::after,
p.role-danlan-thought::after,
p.role-lan::after,
p.role-zon::after,
p.role-qianhon::after,
p.role-hui::after { content: none !important; display: none !important; }

/* 玩家 · 咒力紫 */
p.role-danlan {
  border-left-color: #8B6FC4 !important;
  color: #3D2D55 !important;
  background: linear-gradient(135deg, #FBF8F1 0%, #F0EBFA 100%) !important;
}
p.role-danlan::before {
  content: "玩家" !important;
  color: #6B4FA8 !important;
  background: #F0EBFA !important;
  border: 1px solid #C9B8E8 !important;
}
p.role-danlan:hover { border-color: #C9B8E8 !important; box-shadow: 0 2px 8px rgba(139,111,196,0.12) !important; }

/* 玩家心声 · 宿傩朱 */
p.role-danlan-thought {
  border-left-color: #C45B5B !important;
  color: #552D2D !important;
  background: linear-gradient(135deg, #FBF8F1 0%, #FAEBEB 100%) !important;
}
p.role-danlan-thought::before {
  content: "玩家心声" !important;
  color: #A84545 !important;
  background: #FAEBEB !important;
  border: 1px solid #E8C0C0 !important;
}
p.role-danlan-thought:hover { border-color: #E8C0C0 !important; box-shadow: 0 2px 8px rgba(196,91,91,0.12) !important; }

/* 心声 · 五条蓝 */
p.role-lan {
  border-left-color: #5B9BD5 !important;
  color: #2D4555 !important;
  background: linear-gradient(135deg, #FBF8F1 0%, #EAF2FA 100%) !important;
}
p.role-lan::before {
  content: "心声" !important;
  color: #4580B0 !important;
  background: #EAF2FA !important;
  border: 1px solid #B8D4E8 !important;
}
p.role-lan:hover { border-color: #B8D4E8 !important; }

/* 男 · 特等金 */
p.role-zon {
  border-left-color: #C9A24B !important;
  color: #55452D !important;
  background: linear-gradient(135deg, #FBF8F1 0%, #FAF5E8 100%) !important;
}
p.role-zon::before {
  content: "男" !important;
  color: #A88035 !important;
  background: #FAF5E8 !important;
  border: 1px solid #E8D5A8 !important;
}
p.role-zon:hover { border-color: #E8D5A8 !important; }

/* 女 · 淡珊瑚 */
p.role-qianhon {
  border-left-color: #D48A8A !important;
  color: #553535 !important;
  background: linear-gradient(135deg, #FBF8F1 0%, #FAF0F0 100%) !important;
}
p.role-qianhon::before {
  content: "女" !important;
  color: #B06565 !important;
  background: #FAF0F0 !important;
  border: 1px solid #ECC8C8 !important;
}
p.role-qianhon:hover { border-color: #ECC8C8 !important; }

/* 职业角色 · 深咒紫 */
p.role-hui {
  border-left-color: #6B4FA8 !important;
  color: #2D2045 !important;
  background: linear-gradient(135deg, #FBF8F1 0%, #E8E0F5 100%) !important;
}
p.role-hui::before {
  content: "职业角色" !important;
  color: #553D85 !important;
  background: #E8E0F5 !important;
  border: 1px solid #C0B0DD !important;
}
p.role-hui:hover { border-color: #C0B0DD !important; }

p.role-danlan strong, p.role-danlan-thought strong,
p.role-lan strong, p.role-zon strong,
p.role-qianhon strong, p.role-hui strong {
  color: #3D3A44 !important;
  font-weight: 600 !important;
}
p.role-danlan code, p.role-danlan-thought code,
p.role-lan code, p.role-zon code,
p.role-qianhon code, p.role-hui code {
  background: #F0EBFA !important;
  color: #6B4FA8 !important;
  border: 1px solid #C9B8E8 !important;
  border-radius: 6px !important;
  padding: 1px 7px !important;
}
@media (max-width: 640px) {
  .markdown-body { font-size: 14px !important; line-height: 1.85 !important; }
  p.role-danlan, p.role-danlan-thought, p.role-lan,
  p.role-zon, p.role-qianhon, p.role-hui {
    padding: 10px 12px !important;
    margin: 10px 0 !important;
    font-size: 14px !important;
  }
}

/* ===================== 低动效偏好 ===================== */
@media (prefers-reduced-motion: reduce) {
  details::before { animation: none !important; }
  .flex.items-center.justify-center.w-6.h-5::before { animation: none !important; opacity: 0.6 !important; }
  .flex.items-center.justify-center.w-6.h-5::after { animation: none !important; opacity: 1 !important; }
  details > summary::after { animation: none !important; }
  details > summary::before,
  details[open] > summary::before { transition: none !important; }
  details tbody tr { transition: none !important; }
  details[open] { animation: none !important; }
  .markdown-body pre > div > div.flex.justify-between.h-8,
  .markdown-body pre > div > div.border-b { animation: none !important; }
}
/* ═══════════════════════════════════════
   咒术回战 · 墨与咒力  |  Light Theme
   ═══════════════════════════════════════ */

/* ── 通用气泡基底 ── */
.group.is-user > div:first-child,
.group.is-assistant > div:first-child {
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  border: 1px solid rgba(28, 26, 46, 0.07) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(2px) !important;
  transition: box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ── 用户气泡：靛蓝 · 影 ── */
.group.is-user > div:first-child {
  background: linear-gradient(158deg, #fcfdff 0%, #f0f3fb 55%, #e8ecf9 100%) !important;
  box-shadow:
    inset -3px 0 0 0 #4338ca,
    inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(28, 26, 46, 0.04),
    0 10px 28px -16px rgba(67, 56, 202, 0.35) !important;
}

.group.is-user > div:first-child:hover {
  box-shadow:
    inset -3px 0 0 0 #4338ca,
    inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(28, 26, 46, 0.04),
    0 14px 34px -14px rgba(67, 56, 202, 0.45) !important;
}

/* ── AI气泡：咒紫 · 六眼 ── */
.group.is-assistant > div:first-child {
  background: linear-gradient(158deg, #ffffff 0%, #faf7fe 50%, #f4eefc 100%) !important;
  box-shadow:
    inset 3px 0 0 0 #6d28d9,
    inset 0 1px 0 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(28, 26, 46, 0.04),
    0 10px 28px -16px rgba(109, 40, 217, 0.32) !important;
}

.group.is-assistant > div:first-child:hover {
  box-shadow:
    inset 3px 0 0 0 #6d28d9,
    inset 0 1px 0 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(28, 26, 46, 0.04),
    0 14px 34px -14px rgba(109, 40, 217, 0.42) !important;
}

/* ── 术式暗纹层（极淡，不干扰阅读） ── */
.group.is-user > div:first-child::before,
.group.is-assistant > div:first-child::before {
  content: '' !important;
  position: absolute !important;
  inset: -20% !important;
  z-index: -1 !important;
  pointer-events: none !important;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(67, 56, 202, 0.035) 0px,
      rgba(67, 56, 202, 0.035) 1px,
      transparent 1px,
      transparent 9px
    ),
    radial-gradient(
      ellipse 55% 70% at 88% 8%,
      rgba(139, 92, 246, 0.16) 0%,
      transparent 65%
    );
  animation: jjkVeilDrift 18s ease-in-out infinite alternate !important;
}

.group.is-assistant > div:first-child::before {
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(109, 40, 217, 0.035) 0px,
      rgba(109, 40, 217, 0.035) 1px,
      transparent 1px,
      transparent 9px
    ),
    radial-gradient(
      ellipse 55% 70% at 10% 6%,
      rgba(168, 85, 247, 0.18) 0%,
      transparent 65%
    );
}

@keyframes jjkVeilDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2.5%, 1.5%, 0) scale(1.06); }
}

/* ═══ 正文：纯净高对比，无任何模糊阴影 ═══ */
.rili-markdown-renderer,
.rili-markdown-renderer * {
  color: #1c1a2e !important;
  text-shadow: none !important;
}

.rili-markdown-renderer h1,
.rili-markdown-renderer h2,
.rili-markdown-renderer h3,
.rili-markdown-renderer strong,
.rili-markdown-renderer b {
  color: #3730a3 !important;
}

.rili-markdown-renderer em,
.rili-markdown-renderer i {
  color: #6d28d9 !important;
}

.rili-markdown-renderer a {
  color: #4f46e5 !important;
  text-decoration-color: rgba(79, 70, 229, 0.4) !important;
}

.rili-markdown-renderer blockquote {
  border-left: 2px solid rgba(109, 40, 217, 0.55) !important;
  background: rgba(109, 40, 217, 0.045) !important;
  border-radius: 0 6px 6px 0 !important;
}

.rili-markdown-renderer pre,
.rili-markdown-renderer code {
  background: rgba(240, 240, 252, 0.92) !important;
  border: 1px solid rgba(67, 56, 202, 0.14) !important;
  border-radius: 8px !important;
  color: #312e81 !important;
}

.rili-markdown-renderer hr {
  border-color: rgba(28, 26, 46, 0.1) !important;
}

/* ═══ 底部信息条 ═══ */
.text-xs.font-mono.text-muted-foreground {
  color: rgba(55, 48, 163, 0.65) !important;
  letter-spacing: 0.02em !important;
}

/* ═══ 操作按钮区 ═══ */
.bg-muted.rounded.flex {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(10px) saturate(1.4) !important;
  border: 1px solid rgba(67, 56, 202, 0.16) !important;
  border-radius: 10px !important;
  box-shadow: 0 3px 12px -6px rgba(67, 56, 202, 0.3) !important;
}

.bg-muted.rounded.flex button {
  background: transparent !important;
  border-radius: 7px !important;
  transition: background 0.25s ease, transform 0.25s ease !important;
}

.bg-muted.rounded.flex button:hover {
  background: rgba(109, 40, 217, 0.1) !important;
  transform: translateY(-1px) !important;
}

.bg-muted.rounded.flex button svg.lucide {
  stroke: rgba(67, 56, 202, 0.72) !important;
  transition: stroke 0.25s ease, filter 0.25s ease !important;
}

.bg-muted.rounded.flex button:hover svg.lucide {
  stroke: #6d28d9 !important;
  filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.55)) !important;
}

/* 按钮常驻显示 */
.group .md\:opacity-0 {
  opacity: 1 !important;
}

/* ═══════════════════════════════════════
   加载动画 · 領域展開
   （静态流内定位，永不被容器裁切）
   ═══════════════════════════════════════ */

/* 隐藏原生跳动点 */
.flex.gap-2.w-full.h-full.items-center.justify-center > span {
  display: none !important;
}

.flex.gap-2.w-full.h-full.items-center.justify-center {
  position: relative !important;
  overflow: visible !important;
  gap: 0.55rem !important;
  min-height: 2.1em !important;
  padding: 0.15em 0 !important;
}

/* 咒力涟漪核心：参与布局，因此不会溢出被切 */
.flex.gap-2.w-full.h-full.items-center.justify-center::before {
  content: '' !important;
  position: static !important;
  display: block !important;
  flex: 0 0 auto !important;
  width: 1.05em !important;
  height: 1.05em !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 38% 34%, #ffffff 0%, #a78bfa 42%, #5b21b6 100%) !important;
  box-shadow:
    0 0 0 0 rgba(139, 92, 246, 0.55),
    0 0 10px rgba(139, 92, 246, 0.5) !important;
  animation: jjkDomainCore 2.2s cubic-bezier(0.34, 0.01, 0.36, 1) infinite !important;
}

/* 「領域展開」文字：流光 + 悬浮 */
.flex.gap-2.w-full.h-full.items-center.justify-center::after {
  content: '領域展開' !important;
  position: static !important;
  display: block !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  font-family: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN',
               'Songti SC', serif !important;
  font-size: 0.95em !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  letter-spacing: 0.22em !important;
  padding-right: 0.22em !important;
  background: linear-gradient(
    100deg,
    #3730a3 0%,
    #4f46e5 26%,
    #c4b5fd 44%,
    #ffffff 50%,
    #c4b5fd 56%,
    #6d28d9 74%,
    #3730a3 100%
  ) !important;
  background-size: 260% 100% !important;
  background-position: 100% 50% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  filter: drop-shadow(0 1px 4px rgba(91, 33, 182, 0.28)) !important;
  animation:
    jjkShimmer 2.6s linear infinite,
    jjkFloat 3.4s ease-in-out infinite !important;
}

/* 咒力核心：脉冲扩散 */
@keyframes jjkDomainCore {
  0% {
    transform: scale(0.82);
    box-shadow:
      0 0 0 0 rgba(139, 92, 246, 0.5),
      0 0 8px rgba(139, 92, 246, 0.4);
  }
  55% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 0.62em rgba(139, 92, 246, 0),
      0 0 16px rgba(139, 92, 246, 0.7);
  }
  100% {
    transform: scale(0.82);
    box-shadow:
      0 0 0 0 rgba(139, 92, 246, 0),
      0 0 8px rgba(139, 92, 246, 0.4);
  }
}

/* 流光扫过 */
@keyframes jjkShimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 悬浮呼吸 */
@keyframes jjkFloat {
  0%, 100% { transform: translateY(0) scale(1); letter-spacing: 0.22em; }
  50%      { transform: translateY(-2.5px) scale(1.015); letter-spacing: 0.26em; }
}

/* 减动效偏好兼容 */
@media (prefers-reduced-motion: reduce) {
  .flex.gap-2.w-full.h-full.items-center.justify-center::after,
  .flex.gap-2.w-full.h-full.items-center.justify-center::before,
  .group.is-user > div:first-child::before,
  .group.is-assistant > div:first-child::before {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
  }
}