/* =============================================
   水墨 (浅色·中性)
   base-hue:30  base-sat:15%  is-dark:0  accent-hue:30  accent-sat:35%

   bg-deep:#faf7f2        bg-default:#faf7f2     bg-paper:rgba(250,246,240,0.96)
   bg-raised:rgba(255,255,255,0.70)              text-main:#3d2b1f
   text-sub:#5c3d2a       text-muted:rgba(120,87,60,0.40)
   border:rgba(120,87,60,0.18)                   accent:#8b6e50
   accent-dim:rgba(120,87,60,0.10)               accent-text:#5c3d2a

   亮点① blockquote → 浅棕色微透背景 + 粗侧边框 + 斜体批注风格
   亮点② 加载动画  → 纯CSS绘制的优雅旋转光环
   亮点③ 评论区分隔线 → 中心加入「✦」符号点缀
   ============================================= */

/* ===== 危险区域 ===== */
/* 1. 隐藏装饰条 */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"] { display: none !important; }

/* 2. 代码块 */
.markdown-body pre { background: rgba(240,232,220,0.80) !important; border: 1px solid rgba(120,87,60,0.18) !important; border-left: 3px solid #8b6e50 !important; border-radius: 6px !important; padding: 1em 1.2em !important; overflow-x: auto !important; }
.markdown-body pre code { background: transparent !important; color: #3d2b1f !important; }
.markdown-body :not(pre)>code { background: rgba(120,87,60,0.10) !important; color: #8b6e50 !important; padding: 0.15em 0.45em !important; border-radius: 4px !important; }

/* 3. details折叠块 —— 标题行和容器背景分开设置，平台级兜底 */
.markdown-body details { background: rgba(120,87,60,0.03) !important; border: 1px solid rgba(120,87,60,0.12) !important; border-radius: 6px !important; margin: 8px 0 !important; overflow: hidden !important; transition: border-color 0.15s !important; display: block !important; width: 100% !important; max-width: 100% !important; }
.markdown-body details[open] { border-color: rgba(120,87,60,0.30) !important; }
.markdown-body details summary { background: rgba(120,87,60,0.05) !important; color: #5c3d2a !important; padding: 8px 12px 8px 32px !important; display: block !important; position: relative !important; border-bottom: 1px solid rgba(120,87,60,0.12) !important; cursor: pointer !important; font-weight: 600 !important; list-style: none !important; user-select: none !important; width: 100% !important; }
.markdown-body details summary::before { content: '\25B6' !important; position: absolute !important; left: 12px !important; top: 50% !important; transform: translateY(-50%) !important; color: #8b6e50 !important; font-size: 11px !important; transition: transform 0.2s ease !important; }
.markdown-body details[open] summary::before { transform: translateY(-50%) rotate(90deg) !important; }
.markdown-body details summary::-webkit-details-marker { display: none !important; }

/* 4. 滚动条 */
::-webkit-scrollbar { width: 3px !important; height: 3px !important; }
::-webkit-scrollbar-track { background: #faf7f2 !important; }
::-webkit-scrollbar-thumb { background: #b89a7c !important; border-radius: 3px !important; }
::-webkit-scrollbar-thumb:hover { background: #8b6e50 !important; }

/* 5. 选区 & 占位符 */
::placeholder { color: rgba(120,87,60,0.28) !important; opacity: 1 !important; }
::selection { background: rgba(120,87,60,0.10) !important; color: #8b6e50 !important; }

/* 6. 页面背景 */
body, html, #root, .app-root, .h-screen { background: #faf7f2 !important; color: #3d2b1f !important; cursor: auto !important; }

/* ⚠️ 输入框强制可见 */
#ai-chat-input { background: rgba(250,246,240,0.95) !important; color: #3d2b1f !important; caret-color: #8b6e50 !important; }
textarea.rc-textarea { background: rgba(250,246,240,0.95) !important; color: #3d2b1f !important; border: 1px solid rgba(120,87,60,0.20) !important; }


/* ===== 全局 ===== */
body, #root, .h-screen { background: #faf7f2 !important; color: #3d2b1f !important; }


/* ===== 顶部导航 ===== */
.sticky.w-full.top-0.flex.items-center { background: rgba(250,246,240,0.96) !important; backdrop-filter: blur(12px) !important; border-bottom: 1px solid rgba(120,87,60,0.12) !important; }
#ai-model-selector .group.flex.items-center { background: rgba(120,87,60,0.06) !important; border: 1px solid rgba(120,87,60,0.18) !important; border-radius: 6px !important; transition: background 0.15s !important; }
#ai-model-selector .group.flex.items-center:hover { background: rgba(120,87,60,0.10) !important; }
#ai-model-selector .truncate.text-[13px] { color: #8b6e50 !important; }
#ai-model-selector .shrink-0.flex.items-center svg { color: #c27830 !important; }
#header-setting-button { color: #5c3d2a !important; }


/* ===== 开场白区域 ===== */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] { background: rgba(255,255,255,0.70) !important; border: 1px solid rgba(120,87,60,0.12) !important; border-radius: 6px !important; color: #5c3d2a !important; transition: border-color 0.15s !important; }
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover { border-color: rgba(120,87,60,0.30) !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: #5c3d2a !important; }


/* ===== 侧边栏 ===== */
.shadow-lg.border-r.border-gray-200 { background: #faf7f2 !important; border-right: 1px solid rgba(120,87,60,0.12) !important; }
.MuiList-root { background: transparent !important; }
.conversation-text { color: #3d2b1f !important; }


/* ===== 功能按钮 ===== */
#ai-mod-button2 { background: transparent !important; }
#ai-mod-button2 button.MuiButton-root { background: rgba(120,87,60,0.05) !important; border: 1px solid rgba(120,87,60,0.15) !important; border-radius: 6px !important; color: #5c3d2a !important; transition: all 0.15s !important; }
#ai-mod-button2 button.MuiButton-root:hover { background: rgba(120,87,60,0.10) !important; }
#ai-mod-button2 button.MuiButton-root svg { fill: #5c3d2a !important; }


/* ===== 聊天气泡 ===== */
.bg-gray-100\/90.relative.inline-block { background: #f9e3c3 !important; border: 1px solid rgba(120,87,60,0.18) !important; border-radius: 8px !important; padding: 10px 14px !important; box-shadow: 0 0 0px rgba(120,87,60,0.06) !important; transition: box-shadow 0.2s !important; }
.bg-gray-100\/90.relative.inline-block:hover { box-shadow: 0 0 6px rgba(120,87,60,0.15) !important; }
.chat-answer-container .bg-gray-100\/90.relative.inline-block { background: #f5efe6 !important; }

.markdown-body { color: #3d2b1f !important; font-size: 15px !important; line-height: 1.8 !important; font-weight: 500 !important; letter-spacing: 0.02em !important; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { color: #5c3d2a !important; border-bottom: 1px solid rgba(120,87,60,0.12) !important; padding-bottom: 0.3em !important; }
.markdown-body ul, .markdown-body ol, .markdown-body li { color: #3d2b1f !important; }
.markdown-body blockquote { background: rgba(120,87,60,0.04) !important; border-left: 4px solid rgba(120,87,60,0.40) !important; color: #5c3d2a !important; padding: 8px 14px !important; margin: 8px 0 !important; border-radius: 0 6px 6px 0 !important; font-style: italic !important; }
.markdown-body table, .markdown-body th, .markdown-body td { border: 1px solid rgba(120,87,60,0.18) !important; }
.markdown-body th { background: rgba(120,87,60,0.05) !important; color: #5c3d2a !important; }
.markdown-body strong, .markdown-body em, .markdown-body a { color: #5c3d2a !important; text-decoration: none !important; }


/* ===== 加载动画 ===== */
.style_dot-flashing__8L91Q.style_text__zGhNq { display: none !important; }
.flex.items-center.justify-center.w-6.h-5 { position: relative !important; width: 24px !important; height: 24px !important; }
.flex.items-center.justify-center.w-6.h-5::before { content: '' !important; position: absolute !important; width: 16px !important; height: 16px !important; border: 2px solid rgba(120,87,60,0.15) !important; border-top-color: #8b6e50 !important; border-radius: 50% !important; animation: ai-spin 1s linear infinite !important; }
.flex.items-center.justify-center.w-6.h-5::after { content: none !important; }
@keyframes ai-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


/* ===== 底部输入区 ===== */
.bg-gradient-to-t { background: linear-gradient(to top, #faf7f2 60%, transparent) !important; }
#ai-chat-bottom-input { background: transparent !important; }
#ai-chat-input { background: rgba(250,246,240,0.95) !important; border: 1px solid rgba(120,87,60,0.20) !important; border-radius: 14px !important; color: #3d2b1f !important; caret-color: #8b6e50 !important; padding: 10px 14px !important; transition: border-color 0.2s !important; }
#ai-chat-input:focus { border-color: rgba(120,87,60,0.45) !important; outline: none !important; }
#ai-chat-input::placeholder { color: rgba(120,87,60,0.28) !important; }
#ai-chat-input::selection { background: rgba(120,87,60,0.10) !important; color: #8b6e50 !important; }
#ai-send-button { background: linear-gradient(135deg, #78573c, #5c3d2a) !important; border-radius: 50% !important; color: #fff !important; transition: opacity 0.15s !important; }
#ai-send-button:hover { opacity: 0.9 !important; }


/* ===== 评论区 ===== */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] { background: #faf7f2 !important; border-top: 1px solid rgba(120,87,60,0.12) !important; }
div.text-lg.font-bold { color: #5c3d2a !important; }
p.MuiTypography-body1.text-grey-600 { color: #3d2b1f !important; }
span.MuiRating-root { color: #8b6e50 !important; }
span.MuiRating-iconEmpty svg { color: rgba(120,87,60,0.28) !important; }
span.MuiRating-iconFilled svg { color: #8b6e50 !important; }
span.text-orange-500 { color: #c27830 !important; }
div.flex.flex-col.border-gray-200 { border-color: rgba(120,87,60,0.12) !important; }
textarea.rc-textarea { background: rgba(250,246,240,0.95) !important; border: 1px solid rgba(120,87,60,0.20) !important; border-radius: 14px !important; color: #3d2b1f !important; }
div.bg-gray-100.text-gray-500 { background: rgba(120,87,60,0.05) !important; color: #5c3d2a !important; }
div.cursor-pointer.group.flex.items-center.justify-center { background: rgba(120,87,60,0.05) !important; border-radius: 6px !important; }
div[data-state="closed"] svg[data-icon="Send03"] { color: #8b6e50 !important; }
div.style_divider__mW0YX { border-color: rgba(120,87,60,0.12) !important; position: relative !important; }
div.style_divider__mW0YX::after { content: '✦' !important; position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; color: rgba(120,87,60,0.40) !important; background: #faf7f2 !important; padding: 0 12px !important; font-size: 12px !important; }
.MuiStack-root.css-1dmzxoz { background: transparent !important; }
button.MuiButton-containedPrimary { background: #78573c !important; color: #fff !important; }
button.MuiButton-outlinedPrimary { border-color: rgba(120,87,60,0.45) !important; color: #5c3d2a !important; }
div.p-3.overflow-y-auto { background: #faf7f2 !important; }
div.group.ml-0 { background: transparent !important; }
div.group img.rounded-full { border: 1px solid rgba(120,87,60,0.18) !important; }
div.text-sm.text-grey-600 span.font-bold { color: #5c3d2a !important; }
span.text-[10px] { color: rgba(120,87,60,0.40) !important; }
div.break-all { color: #3d2b1f !important; }
div.text-xs.text-grey-600 { color: rgba(120,87,60,0.60) !important; }
button.text-gray-400 { color: rgba(120,87,60,0.40) !important; }
button.text-gray-400 svg { fill: currentColor !important; }
span.cursor-pointer { color: #8b6e50 !important; }
div.ml-8.border-l { border-color: rgba(120,87,60,0.12) !important; }


/* ===== 分页 ===== */
.MuiPaginationItem-root { color: #5c3d2a !important; border-color: rgba(120,87,60,0.18) !important; }
.MuiPaginationItem-root.Mui-selected { background: rgba(120,87,60,0.10) !important; color: #8b6e50 !important; }
.MuiPaginationItem-root.Mui-disabled { opacity: 0.5 !important; }
.MuiPaginationItem-icon { fill: currentColor !important; }
.MuiStack-root.css-1uwir8f { background: transparent !important; }
.MuiInputBase-input { color: #3d2b1f !important; }


/* ===== MUI 全局 ===== */
.MuiButton-root, .MuiButton-contained, .MuiButton-outlined { text-transform: none !important; border-radius: 6px !important; }
.MuiIconButton-root { color: #5c3d2a !important; }
.MuiDialog-paper, .MuiDrawer-paper { background: #faf7f2 !important; color: #3d2b1f !important; border: 1px solid rgba(120,87,60,0.12) !important; }
.MuiBackdrop-root { background: rgba(61,43,31,0.4) !important; backdrop-filter: blur(2px) !important; }
.MuiDivider-root { border-color: rgba(120,87,60,0.12) !important; }
.MuiTypography-root { color: #3d2b1f !important; }
.MuiRating-icon { color: #8b6e50 !important; }
.MuiOutlinedInput-root { border-color: rgba(120,87,60,0.20) !important; }
.MuiOutlinedInput-notchedOutline { border-color: rgba(120,87,60,0.20) !important; }
.MuiTouchRipple-root { color: rgba(120,87,60,0.10) !important; }
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 { color: #3d2b1f !important; }
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary { color: #5c3d2a !important; }
.text-orange-500 { color: #c27830 !important; }


/* ===== 响应式 ===== */
@media (max-width: 480px) {
  .bg-gray-100\/90.relative.inline-block { padding: 8px 12px !important; }
  .markdown-body details { margin: 6px 0 !important; }
}


/* ===== 降速 ===== */
@media (prefers-reduced-motion: reduce) {
  .flex.items-center.justify-center.w-6.h-5::before { animation-duration: 4s !important; }
  .markdown-body details summary::before { transition: none !important; }
}