/* ======================
   CSS 模块化重构 - 温润奶茶主题（加深版）
   调整：粗体/深色文字加深，整体层次更清晰
   ====================== */

/* ======================
   1. 全局与基础设置
   ====================== */
* {
  box-sizing: border-box !important;
}

hr {
  border: none !important;
  border-top: 2px solid #d9c8b8 !important;
  margin: 1.5em 0 !important;
  opacity: 0.9 !important;
  transition: all 0.3s ease !important;
}

hr:hover {
  opacity: 1 !important;
  box-shadow: 0 0 10px rgba(160, 120, 100, 0.35) !important;
}

@media (prefers-color-scheme: dark) {
  hr {
    border-top: 2px solid #8a7b70 !important;
    opacity: 0.75 !important;
  }
  hr:hover {
    box-shadow: 0 0 10px rgba(200, 170, 150, 0.3) !important;
  }
}

/* ======================
   2. 头像
   ====================== */
.mb-2 .shrink-0 { display: none; }

/* ======================
   3. 可折叠内容区 (details)
   ====================== */
details {
  position: relative !important;
  width: 100% !important;
  max-width: 800px !important;
  margin: 15px auto !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 1em !important;
  top: auto !important;
  right: auto !important;
  z-index: 1 !important;
}

details summary {
  max-width: 100% !important;
  width: 100% !important;
  padding: 7px 18px 7px 40px !important;
  margin: 0 !important;
  position: relative !important;
  background: linear-gradient(to right, #b89480, #c4a08c) !important;
  color: #fffaf7 !important;
  border-radius: 22px !important;
  font-size: 1.1em !important;
  font-weight: bold !important;
  cursor: pointer !important;
  list-style: none !important;
  box-shadow: 0 3px 10px rgba(150, 120, 100, 0.2) !important;
  transition: all 0.3s ease !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  height: auto !important;
  letter-spacing: 0.35px !important;
}

details summary::before {
  content: "📕" !important;
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) rotate(0deg) !important;
  font-size: 1em !important;
  color: #fffaf7 !important;
  z-index: 2 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  transform-origin: center !important;
}

details[open] summary::before {
  content: "📖" !important;
  transform: translateY(-50%) rotate(15deg) !important;
  color: #f5e6d8 !important;
  text-shadow: 0 0 8px rgba(230, 200, 180, 0.6) !important;
}

details[open] summary {
  background: linear-gradient(to right, #c4a08c, #d0b8a8) !important;
  box-shadow: 0 5px 18px rgba(150, 120, 100, 0.35) !important;
  border-radius: 22px !important;
}

details summary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(150, 120, 100, 0.3) !important;
  background: linear-gradient(to right, #c4a08c, #d0b8a8) !important;
}

details > div {
  width: 100% !important;
  padding: 22px !important;
  margin-top: 0 !important;
  border-radius: 0 0 14px 14px !important;
  box-shadow: 0 5px 22px rgba(150, 120, 100, 0.14) !important;
  border: 1px solid #e0cebe !important;
  background: linear-gradient(135deg, #fefbf8 0%, #faf3eb 100%) !important;
  animation: slideDown 0.3s ease-out !important;
  color: #3b302b !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px;
  }
}

/* 暗色模式 - details */
@media (prefers-color-scheme: dark) {
  details {
    background: transparent !important;
    border-color: transparent !important;
    color: #e2d8cf !important;
    box-shadow: none !important;
  }
  details summary {
    background: linear-gradient(to right, #62554c, #6e6056) !important;
    color: #faf4ed !important;
  }
  details summary:hover,
  details[open] summary {
    background: linear-gradient(to right, #6e6056, #7c6e64) !important;
  }
  details > div {
    background: linear-gradient(135deg, #362e28 0%, #463c34 100%) !important;
    border-color: #5a4e44 !important;
    color: #e2d8cf !important;
    box-shadow: 0 5px 22px rgba(0, 0, 0, 0.4) !important;
  }
  details > div h1,
  details > div h2,
  details > div h3,
  details > div h4 {
    color: #e2d8cf !important;
    border-bottom-color: #5a4e44 !important;
  }
  details > div code {
    background: #5a4e44 !important;
    color: #e2d8cf !important;
  }
}

/* 响应式 */
@media (max-width: 768px) {
  details {
    max-width: 95% !important;
    margin: 10px auto !important;
  }
  details summary {
    padding: 6px 14px 6px 42px !important;
    font-size: 1em !important;
    border-radius: 20px !important;
  }
  details summary::before {
    left: 14px !important;
  }
  details > div {
    padding: 16px !important;
  }
}

@media (max-width: 480px) {
  details summary {
    padding: 5px 12px 5px 38px !important;
    font-size: 0.95em !important;
    border-radius: 18px !important;
  }
  details summary::before {
    left: 13px !important;
  }
  details > div {
    padding: 14px !important;
  }
}

/* ======================
   4. 表格样式
   ====================== */
.table-container {
  max-height: 400px !important;
  overflow: auto !important;
  border-radius: 10px !important;
  box-shadow: 0 5px 14px rgba(150, 120, 100, 0.1) !important;
  margin: 20px 0 !important;
}

details table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background-color: rgba(254, 251, 248, 0.98) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

details th {
  background: #c4a08c !important;
  color: #fffaf7 !important;
  font-weight: bold !important;
  padding: 14px 18px !important;
  text-align: left !important;
  border-bottom: 2px solid #a07868 !important;
  font-size: 1.1em !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
}

details td {
  padding: 12px 18px !important;
  border-bottom: 1px solid #e0cebe !important;
  color: #3b302b !important;
  transition: background-color 0.2s !important;
}

details tr:last-child td {
  border-bottom: none !important;
}

details tr:hover td {
  background-color: rgba(180, 140, 120, 0.1) !important;
}

details tr:nth-child(even) {
  background-color: rgba(225, 205, 190, 0.35) !important;
}

@media (prefers-color-scheme: dark) {
  .table-container {
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4) !important;
  }
  details table {
    background-color: rgba(50, 40, 35, 0.9) !important;
  }
  details th {
    background: linear-gradient(to bottom, #5a4e44, #4a3e34) !important;
    border-bottom-color: #3b302b !important;
  }
  details td {
    color: #e2d8cf !important;
    border-bottom-color: #5a4e44 !important;
  }
  details tr:nth-child(even) {
    background-color: rgba(48, 38, 32, 0.4) !important;
  }
  details tr:hover td {
    background-color: rgba(90, 76, 66, 0.3) !important;
  }
}

@media (max-width: 768px) {
  .table-container {
    max-height: 300px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  details table {
    min-width: 100% !important;
    width: auto !important;
  }
  .table-container::-webkit-scrollbar {
    height: 8px !important;
  }
  .table-container::-webkit-scrollbar-thumb {
    background-color: rgba(180, 140, 120, 0.3) !important;
    border-radius: 4px !important;
  }
}

@media (max-width: 480px) {
  details th, details td {
    padding: 10px 12px !important;
    font-size: 0.9em !important;
  }
  details td {
    word-break: break-word !important;
  }
}

/* ======================
   5. AI 输出对话框
   ====================== */
.group .bg-gray-100\/90 {
  background: rgba(254, 251, 248, 0.95) !important;
  border: 2px solid #c4a08c !important;
  border-radius: 14px !important;
  box-shadow: 3px 3px 10px rgba(150, 120, 100, 0.18) !important;
  color: #3b302b !important;
  padding: 18px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  position: relative !important;
  font-size: 1.0em !important;
  line-height: 1.7 !important;
}

.group .bg-gray-100\/90::before {
  content: "" !important;
  position: absolute !important;
  top: -10px !important;
  left: 20px !important;
  width: 0 !important;
  height: 0 !important;
  border-left: 10px solid transparent !important;
  border-right: 10px solid transparent !important;
  border-bottom: 10px solid #c4a08c !important;
}

.group .bg-gray-100\/90::after {
  content: "" !important;
  position: absolute !important;
  top: -8px !important;
  left: 20px !important;
  width: 0 !important;
  height: 0 !important;
  border-left: 10px solid transparent !important;
  border-right: 10px solid transparent !important;
  border-bottom: 10px solid rgba(254, 251, 248, 0.95) !important;
}

.group .bg-gray-100\/90 p,
.group .bg-gray-100\/90 li,
.group .bg-gray-100\/90 td,
.group .bg-gray-100\/90 th {
  margin: 16px 0 !important;
  line-height: 1.75 !important;
  font-size: 1.05em !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  color: #4b3e36 !important;
  text-align: justify !important;
  position: relative !important;
}

.group .bg-gray-100\/90 p:last-child,
.group .bg-gray-100\/90 li:last-child {
  margin-bottom: 0 !important;
}

/* 暗色模式 - 对话框 */
@media (prefers-color-scheme: dark) {
  .group .bg-gray-100\/90 {
    background: rgba(50, 40, 35, 0.95) !important;
    border-color: #5a4e44 !important;
    color: #e2d8cf !important;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4) !important;
  }
  .group .bg-gray-100\/90::after {
    border-bottom: 10px solid rgba(50, 40, 35, 0.95) !important;
  }
  .group .bg-gray-100\/90 p,
  .group .bg-gray-100\/90 li,
  .group .bg-gray-100\/90 td,
  .group .bg-gray-100\/90 th {
    color: #e2d8cf !important;
  }
}

/* ======================
   6. 底部输入区域
   ====================== */
#ai-chat-bottom-input {
  background: transparent !important;
  backdrop-filter: none !important;
}

#ai-chat-input {
  background-color: #fefbf8 !important;
  border: 2px solid #c4a08c !important;
  border-radius: 10px !important;
  color: #3b302b !important;
  box-shadow: inset 2px 2px 6px rgba(150, 120, 100, 0.1) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 0.85em !important;
  padding: 13px 18px !important;
  transition: all 0.3s ease !important;
}

#ai-chat-input:focus {
  border-color: #b89480 !important;
  box-shadow: inset 2px 2px 6px rgba(150, 120, 100, 0.1), 0 0 0 4px rgba(180, 140, 120, 0.12) !important;
}

#ai-send-button {
  width: 34px !important;
  height: 34px !important;
  overflow: visible !important;
}
#ai-send-button svg {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 20px !important;
  height: 20px !important;
  fill: #b89480 !important;
  color: #b89480 !important;
  transition: all 0.2s ease !important;
}
#ai-send-button:hover svg {
  fill: #c4a08c !important;
  color: #c4a08c !important;
  filter: drop-shadow(0 0 6px rgba(180, 140, 120, 0.5)) !important;
}

@media (prefers-color-scheme: dark) {
  #ai-chat-input {
    background-color: #362e28 !important;
    border: 2px solid #5a4e44 !important;
    color: #e2d8cf !important;
    box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.25) !important;
  }
  #ai-chat-input:focus {
    border-color: #8a7b70 !important;
    box-shadow: inset 2px 2px 6px rgba(0,0,0,0.25), 0 0 0 4px rgba(138, 123, 112, 0.15) !important;
  }
  #ai-send-button svg {
    fill: #a08878 !important;
    color: #a08878 !important;
  }
  #ai-send-button:hover svg {
    fill: #c4a08c !important;
    color: #c4a08c !important;
  }
}

/* ======================
   7. 顶部横幅
   ====================== */
.sticky.w-full.top-0.h-16 {
  background: #000 !important;
  background-image: url('https://youke1.picui.cn/s1/2025/08/14/689dd42f18d31.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  border-bottom: 1px solid rgba(190, 160, 140, 0.6) !important;
}

@media (prefers-color-scheme: dark) {
  .sticky.w-full.top-0.h-16 {
    border-bottom: 1px solid rgba(110, 95, 80, 0.6) !important;
  }
}

/* ======================
   8. 按钮样式
   ====================== */
.flex.items-center.gap-2.pb-2 > button,
.MuiButtonBase-root.MuiButton-root.MuiButton-default,
.flex.items-center.gap-2.mb-4 button.px-3 {
  background: linear-gradient(to bottom, #faf3eb, #f3e6da) !important;
  color: #3b302b !important;
  border: 1.5px solid #a07868 !important;
  border-radius: 8px !important;
  box-shadow: 2px 2px 0px rgba(160, 120, 104, 0.4) !important;
  font-weight: bold !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  text-transform: none !important;
  transition: all 0.15s ease-in-out !important;
  padding: 5px 12px !important;
  font-size: 0.85em !important;
  letter-spacing: 0.25px !important;
}

.flex.items-center.gap-2.pb-2 > button:hover,
.MuiButtonBase-root.MuiButton-root.MuiButton-default:hover,
.flex.items-center.gap-2.mb-4 button.px-3:hover {
  background: linear-gradient(to bottom, #f3e6da, #ebd9cb) !important;
  color: #2e2520 !important;
  transform: translate(2px, 2px) !important;
  box-shadow: 0px 0px 3px rgba(150, 120, 100, 0.2) !important;
}

.css-m3x93c svg,
.css-m3x93c i,
.css-m3x93c span,
.css-m3x93c * {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #b89480 !important;
  fill: #b89480 !important;
  font-family: inherit !important;
}
.css-m3x93c {
  font-family: var(--font-system), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto !important;
}
.css-m3x93c svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
}
.css-m3x93c:hover {
  background-color: rgba(180, 140, 120, 0.15) !important;
}

#customized-resend-button.css-b8ryli {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 4px !important;
  color: #b89480 !important;
  background: transparent !important;
  border-radius: 8px !important;
  overflow: visible !important;
  border: none !important;
  transition: all 0.2s ease !important;
}
#customized-resend-button.css-b8ryli svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  fill: #b89480 !important;
  color: #b89480 !important;
  flex-shrink: 0 !important;
}
#customized-resend-button.css-b8ryli:hover {
  background-color: rgba(180, 140, 120, 0.12) !important;
}
#customized-resend-button.css-b8ryli:hover svg {
  fill: #c4a08c !important;
  color: #c4a08c !important;
}

/* 暗色模式 - 按钮 */
@media (prefers-color-scheme: dark) {
  .flex.items-center.gap-2.pb-2 > button,
  .MuiButtonBase-root.MuiButton-root.MuiButton-default,
  .flex.items-center.gap-2.mb-4 button.px-3 {
    background: linear-gradient(to bottom, #5a4e44, #4a3e34) !important;
    color: #e2d8cf !important;
    border: 1.5px solid #7a6b60 !important;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
  }
  .flex.items-center.gap-2.pb-2 > button:hover,
  .MuiButtonBase-root.MuiButton-root.MuiButton-default:hover,
  .flex.items-center.gap-2.mb-4 button.px-3:hover {
    background: linear-gradient(to bottom, #4a3e34, #3b302b) !important;
    color: #faf4ed !important;
  }
  .css-m3x93c svg,
  .css-m3x93c i,
  .css-m3x93c span {
    color: #a08878 !important;
    fill: #a08878 !important;
  }
  #customized-resend-button.css-b8ryli {
    color: #a08878 !important;
  }
  #customized-resend-button.css-b8ryli svg {
    fill: #a08878 !important;
    color: #a08878 !important;
  }
  #customized-resend-button.css-b8ryli:hover {
    background-color: rgba(160, 136, 120, 0.15) !important;
  }
  #customized-resend-button.css-b8ryli:hover svg {
    fill: #c4a08c !important;
    color: #c4a08c !important;
  }
}

/* ======================
   9. 元素隐藏
   ====================== */
.MuiButtonBase-root.MuiButton-root.MuiButton-default.css-w13mdt,
.absolute.z-40 .px-4.py-2.hover\:bg-indigo-100:nth-child(5),
.css-nkqe49 {
  display: none !important;
}

/* ======================
   10. 侧边栏、弹出菜单与对话框
   ====================== */
#ai-model-selector .group {
  background: #fefbf8 !important;
  border: 1px solid #c4a08c !important;
  border-radius: 8px !important;
  position: relative !important;
  overflow: hidden !important;
  transition: all 0.3s ease !important;
}
#ai-model-selector .group:hover {
  box-shadow: 0 0 12px rgba(180, 140, 120, 0.4) !important;
  border-color: #d0b8a8 !important;
}
#ai-model-selector .group *, #ai-model-selector .group {
  color: #3b302b !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.MuiDialog-paper,
.absolute.z-40.w-48.bg-white.border,
.w-\[360px\].max-h-\[480px\].rounded-lg,
.absolute.z-40.text-gray-700.right-0.mt-6.w-48.bg-white.border.border-gray-200.rounded-lg.shadow-lg.py-2 {
  background: rgba(254, 251, 248, 0.96) !important;
  border: 1px solid #c4a08c !important;
  border-radius: 10px !important;
  box-shadow: 0 0 22px rgba(150, 120, 100, 0.25) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
.MuiDialogContent-root,
.MuiDialogTitle-root,
.MuiDialogActions-root,
.absolute.z-40.w-48.bg-white.border > *,
.w-\[360px\].max-h-\[480px\].rounded-lg *,
.absolute.z-40.text-gray-700.right-0.mt-6.w-48.bg-white.border.border-gray-200.rounded-lg.shadow-lg.py-2 * {
  color: #3b302b !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
.absolute.z-40.w-48.bg-white.border > *:hover,
.absolute.z-40.text-gray-700.right-0.mt-6.w-48.bg-white.border.border-gray-200.rounded-lg.shadow-lg.py-2 > div:hover {
  background: rgba(180, 140, 120, 0.12) !important;
}
.MuiDialogContent-dividers {
  border-top: 1px solid rgba(190, 160, 140, 0.6) !important;
  border-bottom: 1px solid rgba(190, 160, 140, 0.6) !important;
}

.MuiDialogContent-root.MuiDialogContent-dividers::-webkit-scrollbar { width: 8px !important; }
.MuiDialogContent-root.MuiDialogContent-dividers::-webkit-scrollbar-track {
  background: rgba(254, 251, 248, 0.5) !important;
  border-radius: 4px !important;
}
.MuiDialogContent-root.MuiDialogContent-dividers::-webkit-scrollbar-thumb {
  background: #c4a08c !important;
  border-radius: 4px !important;
  border: 1px solid #fefbf8 !important;
}
.MuiDialogContent-root.MuiDialogContent-dividers::-webkit-scrollbar-thumb:hover {
  background: #b89480 !important;
}

div.duration-500.w-60.MuiBox-root {
  background: rgba(254, 251, 248, 0.82) !important;
  border-right: 1px solid #c4a08c !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}
div.duration-500.w-60.MuiBox-root * {
  color: #3b302b !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
div.duration-500.w-60.MuiBox-root .MuiListItemButton-root:hover {
  background: rgba(180, 140, 120, 0.12) !important;
}
div.duration-500.w-60.MuiBox-root .MuiList-root::-webkit-scrollbar { width: 6px !important; }
div.duration-500.w-60.MuiBox-root .MuiList-root::-webkit-scrollbar-track { background: transparent !important; }
div.duration-500.w-60.MuiBox-root .MuiList-root::-webkit-scrollbar-thumb {
  background: #c4a08c !important;
  border-radius: 3px !important;
}
div.duration-500.w-60.MuiBox-root .MuiList-root::-webkit-scrollbar-thumb:hover {
  background: #b89480 !important;
}

.sticky.top-0.my-0.mx-3.border-\[1\.5px\] {
  background: rgba(254, 251, 248, 0.65) !important;
  border: 1px solid #c4a08c !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  position: relative !important;
  padding-top: 28px !important;
  border-radius: 8px !important;
}
.sticky.top-0.my-0.mx-3.border-\[1\.5px\]::before {
  content: '留下你的评论' !important;
  position: absolute !important;
  top: 6px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  color: #a07868 !important;
  font-size: 14px !important;
  font-weight: bold !important;
  text-shadow: 0 0 5px rgba(160, 120, 104, 0.3) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
.translate-y-0 .p-3.overflow-y-auto {
  background: rgba(254, 251, 248, 0.65) !important;
}

.block.w-full.sm\:w-\[240px\].shrink-0 {
  background: rgba(254, 251, 248, 0.65) !important;
  border-left: 1px solid #c4a08c !important;
}
.block.w-full.sm\:w-\[240px\].shrink-0 * {
  color: #3b302b !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
.block.w-full.sm\:w-\[240px\].shrink-0 div[class*="hover:bg-gray-200"]:hover {
  background: rgba(180, 140, 120, 0.12) !important;
}

/* 暗色模式 - 侧边栏/弹窗 */
@media (prefers-color-scheme: dark) {
  #ai-model-selector .group {
    background: #362e28 !important;
    border-color: #5a4e44 !important;
  }
  #ai-model-selector .group:hover {
    box-shadow: 0 0 12px rgba(90, 76, 66, 0.5) !important;
    border-color: #7a6b60 !important;
  }
  #ai-model-selector .group *, #ai-model-selector .group {
    color: #e2d8cf !important;
  }
  .MuiDialog-paper,
  .absolute.z-40.w-48.bg-white.border,
  .w-\[360px\].max-h-\[480px\].rounded-lg,
  .absolute.z-40.text-gray-700.right-0.mt-6.w-48.bg-white.border.border-gray-200.rounded-lg.shadow-lg.py-2 {
    background: rgba(50, 40, 35, 0.96) !important;
    border-color: #5a4e44 !important;
    box-shadow: 0 0 22px rgba(0, 0, 0, 0.4) !important;
  }
  .MuiDialogContent-root,
  .MuiDialogTitle-root,
  .MuiDialogActions-root,
  .absolute.z-40.w-48.bg-white.border > *,
  .w-\[360px\].max-h-\[480px\].rounded-lg *,
  .absolute.z-40.text-gray-700.right-0.mt-6.w-48.bg-white.border.border-gray-200.rounded-lg.shadow-lg.py-2 * {
    color: #e2d8cf !important;
  }
  .absolute.z-40.w-48.bg-white.border > *:hover,
  .absolute.z-40.text-gray-700.right-0.mt-6.w-48.bg-white.border.border-gray-200.rounded-lg.shadow-lg.py-2 > div:hover {
    background: rgba(90, 76, 66, 0.25) !important;
  }
  .MuiDialogContent-dividers {
    border-top: 1px solid rgba(90, 76, 66, 0.6) !important;
    border-bottom: 1px solid rgba(90, 76, 66, 0.6) !important;
  }
  .MuiDialogContent-root.MuiDialogContent-dividers::-webkit-scrollbar-track {
    background: rgba(50, 40, 35, 0.5) !important;
  }
  .MuiDialogContent-root.MuiDialogContent-dividers::-webkit-scrollbar-thumb {
    background: #5a4e44 !important;
    border-color: #362e28 !important;
  }
  .MuiDialogContent-root.MuiDialogContent-dividers::-webkit-scrollbar-thumb:hover {
    background: #7a6b60 !important;
  }
  div.duration-500.w-60.MuiBox-root {
    background: rgba(50, 40, 35, 0.82) !important;
    border-right: 1px solid #5a4e44 !important;
  }
  div.duration-500.w-60.MuiBox-root * {
    color: #e2d8cf !important;
  }
  div.duration-500.w-60.MuiBox-root .MuiListItemButton-root:hover {
    background: rgba(90, 76, 66, 0.2) !important;
  }
  div.duration-500.w-60.MuiBox-root .MuiList-root::-webkit-scrollbar-thumb {
    background: #5a4e44 !important;
  }
  div.duration-500.w-60.MuiBox-root .MuiList-root::-webkit-scrollbar-thumb:hover {
    background: #7a6b60 !important;
  }
  .sticky.top-0.my-0.mx-3.border-\[1\.5px\] {
    background: rgba(50, 40, 35, 0.65) !important;
    border-color: #5a4e44 !important;
  }
  .sticky.top-0.my-0.mx-3.border-\[1\.5px\]::before {
    color: #a08878 !important;
    text-shadow: 0 0 5px rgba(160, 136, 120, 0.3) !important;
  }
  .translate-y-0 .p-3.overflow-y-auto {
    background: rgba(50, 40, 35, 0.65) !important;
  }
  .block.w-full.sm\:w-\[240px\].shrink-0 {
    background: rgba(50, 40, 35, 0.65) !important;
    border-left: 1px solid #5a4e44 !important;
  }
  .block.w-full.sm\:w-\[240px\].shrink-0 * {
    color: #e2d8cf !important;
  }
  .block.w-full.sm\:w-\[240px\].shrink-0 div[class*="hover:bg-gray-200"]:hover {
    background: rgba(90, 76, 66, 0.2) !important;
  }
}

/* ======================
   11. 积分信息栏
   ====================== */
.MuiStack-root.text-purple-500.mt-1.css-1kz283j {
  background: linear-gradient(145deg, #faf3eb, #f3e6da) !important;
  border: 1px solid #e0cebe !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 6px rgba(150, 120, 100, 0.1) !important;
  padding: 5px 10px !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  margin-top: 8px !important;
  position: relative !important;
  height: auto !important;
  min-height: 24px !important;
  gap: 4px !important;
}

.MuiStack-root.text-purple-500.mt-1.css-1kz283j::before {
  content: "📚" !important;
  position: absolute !important;
  left: 6px !important;
  font-size: 0.7em !important;
  color: rgba(160, 130, 110, 0.3) !important;
}

.MuiStack-root.text-purple-500.mt-1.css-1kz283j::after {
  content: "🔖" !important;
  position: absolute !important;
  right: 6px !important;
  font-size: 0.7em !important;
  color: rgba(160, 130, 110, 0.3) !important;
}

.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
  color: #2e2520 !important;
  font-size: 0.7em !important;
  font-weight: bold !important;
  padding: 2px 5px !important;
  background: rgba(254, 251, 248, 0.8) !important;
  border-radius: 5px !important;
  border: 1px solid rgba(190, 160, 140, 0.2) !important;
  margin: 1px 0.5px !important;
  word-break: break-all !important;
  line-height: 1.25 !important;
}

.MuiTypography-root.MuiTypography-body2.text-orange-500.css-1x48u03 {
  color: #2e2520 !important;
  font-size: 0.65em !important;
  padding: 2px 5px !important;
  background: rgba(254, 251, 248, 0.8) !important;
  border-radius: 5px !important;
  border: 1px solid rgba(190, 160, 140, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  margin: 1px 0.5px !important;
  word-break: break-all !important;
  line-height: 1.25 !important;
}

.MuiTypography-root.MuiTypography-body2.text-orange-500.css-1x48u03::before {
  content: "•" !important;
  margin-right: 3px !important;
  font-size: 0.6em !important;
  color: #a07868 !important;
}

/* 暗色 - 积分栏 */
@media (prefers-color-scheme: dark) {
  .MuiStack-root.text-purple-500.mt-1.css-1kz283j {
    background: linear-gradient(135deg, #362e28, #463c34) !important;
    border: 1px solid #5a4e44 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  }
  .MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #e2d8cf !important;
    background: rgba(50, 40, 35, 0.7) !important;
    border: 1px solid rgba(90, 76, 66, 0.2) !important;
  }
  .MuiTypography-root.MuiTypography-body2.text-orange-500.css-1x48u03 {
    color: #e2d8cf !important;
    background: rgba(50, 40, 35, 0.7) !important;
    border: 1px solid rgba(90, 76, 66, 0.2) !important;
  }
  .MuiTypography-root.MuiTypography-body2.text-orange-500.css-1x48u03::before {
    color: #a08878 !important;
  }
}

@media (max-width: 480px) {
  .MuiStack-root.text-purple-500.mt-1.css-1kz283j {
    padding: 4px 8px !important;
    min-height: 22px !important;
    gap: 3px !important;
    margin-top: 5px !important;
  }
  .MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    font-size: 0.65em !important;
    padding: 1px 4px !important;
  }
  .MuiTypography-root.MuiTypography-body2.text-orange-500.css-1x48u03 {
    font-size: 0.6em !important;
    padding: 1px 4px !important;
  }
}

/* ======================
   12. 叙事正文
   ====================== */
details > div.narrative-content,
.narrative-content {
  background: linear-gradient(135deg, #fefbf8 0%, #faf3eb 100%) !important;
  border: 1px solid #e0cebe !important;
  border-radius: 12px !important;
  padding: 22px 18px !important;
  margin: 16px 0 !important;
  line-height: 1.75 !important;
  font-size: 1.05em !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  color: #3b302b !important;
  text-align: justify !important;
  box-shadow: 0 5px 14px rgba(150, 120, 100, 0.1) !important;
  position: relative !important;
}

.narrative-content p {
  margin-bottom: 1.3em !important;
  text-indent: 0 !important;
}

.narrative-content p:last-child {
  margin-bottom: 0 !important;
}

.narrative-content ::selection {
  background: #c4a08c !important;
  color: #2e2520 !important;
}

.narrative-content ::-moz-selection {
  background: #c4a08c !important;
  color: #2e2520 !important;
}

.narrative-content.compact {
  padding: 22px 18px !important;
  border-radius: 12px !important;
  font-size: 1em !important;
  line-height: 1.65 !important;
}

.narrative-content::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 3px rgba(255, 252, 249, 0.7) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* 暗色 - 叙事正文 */
@media (prefers-color-scheme: dark) {
  .narrative-content {
    background: linear-gradient(135deg, #362e28 0%, #463c34 100%) !important;
    border-color: #5a4e44 !important;
    color: #e2d8cf !important;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4) !important;
  }
  .narrative-content ::selection {
    background: #5a4e44 !important;
    color: #e2d8cf !important;
  }
  .narrative-content ::-moz-selection {
    background: #5a4e44 !important;
    color: #e2d8cf !important;
  }
  .narrative-content::before {
    box-shadow: inset 0 1px 3px rgba(255, 252, 249, 0.1) !important;
  }
}

/* ======================
   13. 状态面板
   ====================== */
details .content-wrapper {
  background: #faf3eb !important;
  border: 1px solid #e0cebe !important;
  margin-top: 8px !important;
  border-radius: 12px !important;
  padding: 16px !important;
  font-family: 'Consolas', 'Monaco', monospace !important;
  font-size: 0.9em !important;
  line-height: 1.55 !important;
  color: #3b302b !important;
}

details .content-wrapper strong {
  color: #8b6b5c !important;
  font-weight: 700 !important;
}

details .content-wrapper pre,
details .content-wrapper code {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  font: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
  white-space: inherit !important;
}

@media (prefers-color-scheme: dark) {
  details .content-wrapper {
    background: #362e28 !important;
    border-color: #5a4e44 !important;
    color: #e2d8cf !important;
  }
  details .content-wrapper strong {
    color: #c4a08c !important;
  }
}

/* ======================
   14. 小说设定卡片
   ====================== */
.novel-setting-card {
  background: linear-gradient(145deg, #fefbf8 0%, #faf3eb 100%) !important;
  border: 1px solid #e0cebe !important;
  border-radius: 14px !important;
  padding: 22px 20px !important;
  margin: 20px 0 !important;
  box-shadow:
    0 5px 18px rgba(150, 120, 100, 0.12),
    0 1px 4px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 252, 249, 0.8) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.75 !important;
  color: #3b302b !important;
  position: relative !important;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  overflow: hidden !important;
}

.novel-setting-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2.5px !important;
  background: linear-gradient(90deg, #b89480, #c4a08c, #b89480) !important;
  border-radius: 14px 14px 0 0 !important;
}

.novel-setting-card:hover {
  transform: translateY(-1px) !important;
  box-shadow:
    0 7px 22px rgba(150, 120, 100, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255, 252, 249, 0.9) !important;
  border-color: #d0b8a8 !important;
}

.novel-setting-card p,
.novel-setting-card div {
  margin-bottom: 14px !important;
  font-size: 1em !important;
  color: #4b3e36 !important;
  line-height: 1.65 !important;
}

.novel-setting-card p:last-child {
  margin-bottom: 0 !important;
}

.novel-setting-card .setting-icon {
  display: inline-block !important;
  width: 22px !important;
  text-align: center !important;
  margin-right: 9px !important;
  opacity: 0.8 !important;
  transition: opacity 0.3s ease !important;
}

.novel-setting-card:hover .setting-icon {
  opacity: 1 !important;
}

.novel-setting-card .highlight {
  color: #2e2520 !important;
  font-weight: 600 !important;
  background: linear-gradient(120deg, transparent 0%, rgba(180, 140, 120, 0.1) 100%) !important;
  padding: 2px 7px !important;
  border-radius: 5px !important;
  margin: 0 2px !important;
}

.novel-setting-card .card-title {
  margin: 0 0 18px 0 !important;
  font-size: 1.1em !important;
  font-weight: 600 !important;
  color: #2e2520 !important;
  text-align: center !important;
  padding: 9px 0 !important;
  border-bottom: 2px solid #c4a08c;
  letter-spacing: 0.5px !important;
}

/* 暗色 - 设定卡片 */
@media (prefers-color-scheme: dark) {
  .novel-setting-card {
    background: linear-gradient(145deg, #362e28 0%, #463c34 100%) !important;
    border-color: #5a4e44 !important;
    color: #e2d8cf !important;
    box-shadow:
      0 5px 20px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 252, 249, 0.08) !important;
  }
  .novel-setting-card::before {
    background: linear-gradient(90deg, #5a4e44, #6e6056, #5a4e44) !important;
  }
  .novel-setting-card:hover {
    border-color: #7a6b60 !important;
    box-shadow:
      0 7px 26px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 252, 249, 0.12) !important;
  }
  .novel-setting-card p,
  .novel-setting-card div {
    color: #e2d8cf !important;
  }
  .novel-setting-card .highlight {
    color: #faf4ed !important;
    background: linear-gradient(120deg, transparent 0%, rgba(90, 76, 66, 0.3) 100%) !important;
  }
  .novel-setting-card .card-title {
    color: #e2d8cf !important;
    border-bottom-color: #5a4e44 !important;
  }
}

@media (max-width: 768px) {
  .novel-setting-card {
    padding: 18px 16px !important;
    margin: 16px 0 !important;
    border-radius: 12px !important;
  }
  .novel-setting-card p,
  .novel-setting-card div {
    font-size: 0.9em !important;
    line-height: 1.65 !important;
  }
}

/* ======================
   15. 行动选项卡片
   ====================== */
.action-card {
  background: linear-gradient(145deg, #fefbf8, #faf3eb);
  border: 1px solid #e0cebe;
  border-radius: 14px;
  padding: 22px;
  margin: 22px 0;
  box-shadow: 0 5px 14px rgba(150, 120, 100, 0.1);
  transition: all 0.3s ease;
}

.action-card:hover {
  box-shadow: 0 7px 22px rgba(150, 120, 100, 0.15);
  transform: translateY(-1px);
}

.action-header {
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 16px;
  color: #3b302b;
  border-bottom: 2px solid #c4a08c;
  padding-bottom: 10px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.action-btn {
  padding: 13px 16px;
  background: #fffdfb;
  border: 1px solid #e0cebe;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 1em;
  line-height: 1.45;
  color: #4b3e36;
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  -webkit-touch-callout: text !important;
}

.action-btn * {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  pointer-events: none;
}

.action-btn:hover {
  background: #faf3eb;
  border-color: #c4a08c;
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(150, 120, 100, 0.18);
}

.action-btn:active {
  transform: translateY(-2px) !important;
  box-shadow: 0 3px 10px rgba(150, 120, 100, 0.18) !important;
  background: #faf3eb !important;
  border-color: #c4a08c !important;
}

@media (prefers-color-scheme: dark) {
  .action-card {
    background: linear-gradient(145deg, #362e28, #463c34) !important;
    border-color: #5a4e44 !important;
    color: #e2d8cf !important;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4) !important;
  }
  .action-header {
    color: #e2d8cf !important;
    border-bottom-color: #5a4e44 !important;
  }
  .action-btn {
    background: #362e28 !important;
    border-color: #5a4e44 !important;
    color: #e2d8cf !important;
  }
  .action-btn:hover {
    background: #463c34 !important;
    border-color: #6e6056 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35) !important;
  }
  .action-btn:active {
    background: #463c34 !important;
    border-color: #6e6056 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35) !important;
  }
}

@media (max-width: 768px) {
  .action-grid {
    grid-template-columns: 1fr;
  }
  .action-card {
    padding: 16px;
    margin: 16px 0;
  }
}

/* ======================
   16. 顶部导航栏
   ====================== */
.flex.items-center.justify-between.w-full.relative {
  background: linear-gradient(to bottom, #faf3eb, #f3e6da) !important;
  border-bottom: 2px solid #c4a08c !important;
  box-shadow: 0 5px 14px rgba(150, 120, 100, 0.22) !important;
  padding: 5px 14px !important;
  position: relative !important;
  z-index: 10 !important;
}

@media (prefers-color-scheme: dark) {
  .flex.items-center.justify-between.w-full.relative {
    background: linear-gradient(to bottom, #362e28, #463c34) !important;
    border-bottom-color: #5a4e44 !important;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4) !important;
  }
}

.px-2\\.5.py-px.text-xs.leading-5.rounded-md.inline-flex.items-center.text-green-800.bg-green-100.flex-shrink-0 {
  background: linear-gradient(135deg, #b89480, #c4a08c) !important;
  color: #fffaf7 !important;
  border: 1px solid #d0b8a8 !important;
  box-shadow: 0 0 8px rgba(180, 140, 120, 0.35) !important;
  font-weight: bold !important;
  letter-spacing: 1px !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.15) !important;
  font-family: "Segoe UI", -apple-system, sans-serif !important;
  text-transform: uppercase !important;
}

@media (prefers-color-scheme: dark) {
  .px-2\\.5.py-px.text-xs.leading-5.rounded-md.inline-flex.items-center.text-green-800.bg-green-100.flex-shrink-0 {
    background: linear-gradient(135deg, #5a4e44, #6e6056) !important;
    color: #faf4ed !important;
    border-color: #5a4e44 !important;
    box-shadow: 0 0 8px rgba(90, 76, 66, 0.35) !important;
  }
}

.MuiIconButton-root svg,
button.MuiButtonBase-root svg {
  color: #b89480 !important;
  fill: #b89480 !important;
  transition: color 0.2s, filter 0.2s !important;
}

.MuiIconButton-root:hover svg {
  color: #c4a08c !important;
  fill: #c4a08c !important;
  filter: drop-shadow(0 0 6px rgba(180, 140, 120, 0.5)) !important;
}

@media (prefers-color-scheme: dark) {
  .MuiIconButton-root svg,
  button.MuiButtonBase-root svg {
    color: #a08878 !important;
    fill: #a08878 !important;
  }
  .MuiIconButton-root:hover svg {
    color: #c4a08c !important;
    fill: #c4a08c !important;
  }
}

#ai-model-selector .Group {
  background: rgba(254, 251, 248, 0.9) !important;
  border: 1.5px solid #c4a08c !important;
  border-radius: 10px !important;
  box-shadow: 0 3px 10px rgba(150, 120, 100, 0.14), inset 0 1px 0 rgba(255,252,249,0.8) !important;
  font-family: "Segoe UI", -apple-system, sans-serif !important;
  transition: all 0.3s ease !important;
  padding: 3px 10px !important;
  position: relative !important;
}

#ai-model-selector .Group:hover {
  border-color: #d0b8a8 !important;
  box-shadow: 0 0 14px rgba(180, 140, 120, 0.4), inset 0 1px 0 rgba(255,252,249,0.8) !important;
}

#ai-model-selector .Group .truncate {
  color: #3b302b !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

#ai-model-selector .Group svg,
#ai-model-selector .Group [data-icon="ChevronDown"] path {
  stroke: #b89480 !important;
  color: #b89480 !important;
}

#ai-model-selector .Group:hover svg,
#ai-model-selector .Group:hover [data-icon="ChevronDown"] path {
  stroke: #c4a08c !important;
  color: #c4a08c !important;
}

@media (prefers-color-scheme: dark) {
  #ai-model-selector .Group {
    background: rgba(50, 40, 35, 0.9) !important;
    border-color: #5a4e44 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,252,249,0.05) !important;
  }
  #ai-model-selector .Group .truncate {
    color: #e2d8cf !important;
  }
  #ai-model-selector .Group svg,
  #ai-model-selector .Group [data-icon="ChevronDown"] path {
    stroke: #a08878 !important;
    color: #a08878 !important;
  }
  #ai-model-selector .Group:hover {
    border-color: #7a6b60 !important;
    box-shadow: 0 0 14px rgba(90, 76, 66, 0.4), inset 0 1px 0 rgba(255,252,249,0.05) !important;
  }
}

.cursor-pointer.items-center.hidden.gap-1.text-xs svg,
.cursor-pointer.items-center.hidden.gap-1.text-xs use {
  color: #b89480 !important;
  fill: #b89480 !important;
}

.MuiBox-root.css-0:has(> #header-setting-button) button {
  background: transparent !important;
}

.flex.items-center.justify-between.w-full.relative::after {
  content: "" !important;
  position: absolute !important;
  bottom: -2px !important;
  left: 0 !important;
  width: 100% !important;
  height: 1px !important;
  background: linear-gradient(to right, transparent, #c4a08c, transparent) !important;
  opacity: 0.55 !important;
}

@media (prefers-color-scheme: dark) {
  .flex.items-center.justify-between.w-full.relative::after {
    background: linear-gradient(to right, transparent, #7a6b60, transparent) !important;
    opacity: 0.45 !important;
  }
}

@media (max-width: 640px) {
  .flex.items-center.justify-between.w-full.relative {
    padding: 5px 10px !important;
  }
  #ai-model-selector .Group {
    padding: 3px 8px !important;
  }
}

/* ======================
   17. 加载动画 - 构思剧情
   ====================== */
div:has(> [class*="dot-flashing"]) {
  width: auto !important;
  min-width: 155px !important;
  height: auto !important;
  min-height: 32px !important;
  overflow: visible !important;
}

[class*="dot-flashing"] {
  width: auto !important;
  height: auto !important;
  min-width: 145px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  font-size: 0 !important;
  color: transparent !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 5px 10px !important;
}

[class*="dot-flashing"]::before,
[class*="dot-flashing"]::after {
  animation: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: absolute !important;
}
[class*="dot-flashing"]::before {
  content: none !important;
  width: 0 !important;
  height: 0 !important;
}
[class*="dot-flashing"]::after {
  content: none !important;
  width: 0 !important;
  height: 0 !important;
}

[class*="dot-flashing"]::before {
  content: "" !important;
  display: inline-block !important;
  width: 7px !important;
  height: 7px !important;
  min-width: 7px !important;
  min-height: 7px !important;
  background: radial-gradient(circle, #c4a08c 0%, rgba(196, 160, 140, 0.6) 40%, transparent 70%) !important;
  border-radius: 50% !important;
  box-shadow:
    0 0 7px rgba(180, 140, 120, 0.7),
    0 0 14px rgba(180, 140, 120, 0.4),
    0 0 22px rgba(180, 140, 120, 0.2) !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  margin-right: 9px !important;
  flex-shrink: 0 !important;
  animation: dotWarmPulse 2s ease-in-out infinite !important;
  transform-origin: center !important;
}

@keyframes dotWarmPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 7px rgba(180, 140, 120, 0.7),
      0 0 14px rgba(180, 140, 120, 0.4),
      0 0 22px rgba(180, 140, 120, 0.2);
  }
  50% {
    transform: translateY(-5px) scale(1.18);
    box-shadow:
      0 0 11px rgba(196, 160, 140, 0.9),
      0 0 20px rgba(196, 160, 140, 0.55),
      0 0 32px rgba(196, 160, 140, 0.35);
  }
}

[class*="dot-flashing"]::after {
  content: "正在构思剧情" !important;
  display: inline-block !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
  background-image: linear-gradient(
    105deg,
    #7a6b60 0%,
    #a07868 15%,
    #c4a08c 35%,
    #f0e0d0 50%,
    #c4a08c 65%,
    #a07868 85%,
    #7a6b60 100%
  ) !important;
  background-size: 300% 100% !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  color: transparent !important;
  text-shadow: none !important;
  animation: conceiveWarmFlow 3s ease-in-out infinite !important;
  filter: drop-shadow(0 0 6px rgba(180, 140, 120, 0.5)) !important;
  transition: filter 0.5s ease !important;
}

@keyframes conceiveWarmFlow {
  0%, 100% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 4px rgba(180, 140, 120, 0.35));
  }
  25% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 10px rgba(196, 160, 140, 0.65));
  }
  50% {
    background-position: 200% 50%;
    filter: drop-shadow(0 0 16px rgba(210, 180, 160, 0.8));
  }
  75% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 10px rgba(196, 160, 140, 0.65));
  }
}

/* 暗色 - 加载 */
@media (prefers-color-scheme: dark) {
  [class*="dot-flashing"]::before {
    background: radial-gradient(circle, #d0b8a8 0%, rgba(208, 184, 168, 0.65) 40%, transparent 70%) !important;
    box-shadow:
      0 0 8px rgba(208, 184, 168, 0.8),
      0 0 16px rgba(208, 184, 168, 0.5),
      0 0 26px rgba(208, 184, 168, 0.3) !important;
  }

  @keyframes dotWarmPulseDark {
    0%, 100% {
      transform: translateY(0) scale(1);
      box-shadow:
        0 0 8px rgba(208, 184, 168, 0.8),
        0 0 16px rgba(208, 184, 168, 0.5),
        0 0 26px rgba(208, 184, 168, 0.3);
    }
    50% {
      transform: translateY(-5px) scale(1.18);
      box-shadow:
        0 0 14px rgba(230, 210, 190, 0.95),
        0 0 24px rgba(230, 210, 190, 0.65),
        0 0 38px rgba(230, 210, 190, 0.4);
    }
  }

  [class*="dot-flashing"]::before {
    animation-name: dotWarmPulseDark !important;
  }

  [class*="dot-flashing"]::after {
    background-image: linear-gradient(
      105deg,
      #a07868 0%,
      #b89480 15%,
      #d0b8a8 35%,
      #f0e0d0 50%,
      #d0b8a8 65%,
      #b89480 85%,
      #a07868 100%
    ) !important;
    filter: drop-shadow(0 0 8px rgba(196, 160, 140, 0.55)) !important;
  }

  @keyframes conceiveWarmFlowDark {
    0%, 100% {
      background-position: 0% 50%;
      filter: drop-shadow(0 0 6px rgba(196, 160, 140, 0.45));
    }
    25% {
      background-position: 100% 50%;
      filter: drop-shadow(0 0 14px rgba(208, 184, 168, 0.7));
    }
    50% {
      background-position: 200% 50%;
      filter: drop-shadow(0 0 20px rgba(230, 210, 190, 0.85));
    }
    75% {
      background-position: 100% 50%;
      filter: drop-shadow(0 0 14px rgba(208, 184, 168, 0.7));
    }
  }

  [class*="dot-flashing"]::after {
    animation-name: conceiveWarmFlowDark !important;
  }
}

/* 响应式 */
@media (max-width: 768px) {
  div:has(> [class*="dot-flashing"]) {
    min-width: 140px !important;
    min-height: 28px !important;
  }
  [class*="dot-flashing"] {
    min-width: 130px !important;
    padding: 4px 7px !important;
  }
  [class*="dot-flashing"]::before {
    width: 5px !important;
    height: 5px !important;
    min-width: 5px !important;
    min-height: 5px !important;
    margin-right: 7px !important;
  }
  [class*="dot-flashing"]::after {
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
  }
}

@media (max-width: 480px) {
  div:has(> [class*="dot-flashing"]) {
    min-width: 125px !important;
    min-height: 26px !important;
  }
  [class*="dot-flashing"] {
    min-width: 115px !important;
    padding: 3px 6px !important;
  }
  [class*="dot-flashing"]::before {
    width: 4px !important;
    height: 4px !important;
    min-width: 4px !important;
    min-height: 4px !important;
    margin-right: 6px !important;
  }
  [class*="dot-flashing"]::after {
    font-size: 12px !important;
    letter-spacing: 0px !important;
  }
}

/* ======================
   温润奶茶主题（加深版） - 新平台对话界面适配
   涵盖消息气泡、输入框、工具栏、发送按钮等
   ====================== */

/* ---------- 5. 消息气泡 ---------- */
div:has(> .space-y-3 > .rili-markdown-renderer) {
  background: rgba(254, 251, 248, 0.95) !important; /* 米白底 */
  border: 2px solid #c4a08c !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 10px rgba(150, 120, 100, 0.12) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  transition: box-shadow 0.2s ease !important;
}

div:has(> .space-y-3 > .rili-markdown-renderer):hover {
  box-shadow: 0 5px 16px rgba(150, 120, 100, 0.18) !important;
}

div:has(> .space-y-3 > .rili-markdown-renderer) .rili-markdown-renderer,
div:has(> .space-y-3 > .rili-markdown-renderer) p,
div:has(> .space-y-3 > .rili-markdown-renderer) li,
div:has(> .space-y-3 > .rili-markdown-renderer) td,
div:has(> .space-y-3 > .rili-markdown-renderer) th {
  color: #3b302b !important; /* 深咖啡文字 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  line-height: 1.75 !important;
  font-size: 1.05em !important;
}

/* 暗色模式 - 消息气泡 */
@media (prefers-color-scheme: dark) {
  div:has(> .space-y-3 > .rili-markdown-renderer) {
    background: rgba(50, 40, 35, 0.95) !important;
    border-color: #5a4e44 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4) !important;
  }
  div:has(> .space-y-3 > .rili-markdown-renderer):hover {
    box-shadow: 0 5px 16px rgba(90, 76, 66, 0.4) !important;
  }
  div:has(> .space-y-3 > .rili-markdown-renderer) .rili-markdown-renderer,
  div:has(> .space-y-3 > .rili-markdown-renderer) p,
  div:has(> .space-y-3 > .rili-markdown-renderer) li,
  div:has(> .space-y-3 > .rili-markdown-renderer) td,
  div:has(> .space-y-3 > .rili-markdown-renderer) th {
    color: #e2d8cf !important;
  }
}

/* ---------- 6. 输入区域 ---------- */
/* 文本框 */
[data-slot="input-group-control"] {
  background-color: #fefbf8 !important;
  border: 2px solid #c4a08c !important;
  border-radius: 10px !important;
  color: #3b302b !important;
  box-shadow: inset 2px 2px 6px rgba(150, 120, 100, 0.1) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 0.85em !important;
  padding: 13px 18px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  resize: vertical !important;
}

[data-slot="input-group-control"]:focus-visible {
  border-color: #b89480 !important;
  box-shadow: inset 2px 2px 6px rgba(150, 120, 100, 0.1), 0 0 0 4px rgba(180, 140, 120, 0.12) !important;
  outline: none !important;
}

/* 工具栏容器 */
#prompt-input-header {
  background: rgba(254, 251, 248, 0.6) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  border-bottom: 1px solid #e0cebe !important;
  padding-bottom: 6px !important;
}

#prompt-input-footer {
  background: rgba(254, 251, 248, 0.6) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  border-top: 1px solid #e0cebe !important;
  padding-top: 6px !important;
}

/* 通用工具栏按钮 */
#prompt-input-header button[class*="border-input"],
#prompt-input-footer button[class*="border-input"] {
  background: linear-gradient(to bottom, #faf3eb, #f3e6da) !important;
  border-color: #a07868 !important;
  color: #3b302b !important;
  box-shadow: 0 1px 3px rgba(150, 120, 100, 0.1) !important;
  transition: all 0.15s ease !important;
}

#prompt-input-header button[class*="border-input"]:hover,
#prompt-input-footer button[class*="border-input"]:hover {
  background: linear-gradient(to bottom, #f3e6da, #ebd9cb) !important;
  border-color: #b89480 !important;
  box-shadow: 0 2px 6px rgba(150, 120, 100, 0.15) !important;
  transform: translateY(-1px) !important;
}

/* 模型选择器按钮 */
button:has(img[alt="google logo"]) {
  background: linear-gradient(to bottom, #faf3eb, #f3e6da) !important;
  border-color: #a07868 !important;
  color: #3b302b !important;
  box-shadow: 0 1px 3px rgba(150, 120, 100, 0.1) !important;
}

button:has(img[alt="google logo"]):hover {
  background: linear-gradient(to bottom, #f3e6da, #ebd9cb) !important;
  border-color: #b89480 !important;
}

/* 图标颜色 */
#prompt-input-header svg,
#prompt-input-footer svg {
  color: #b89480 !important;
}

/* 发送按钮 - 暖棕色渐变，突出操作 */
#prompt-input-footer button[type="submit"] {
  background: linear-gradient(135deg, #b89480, #a07868) !important;
  border: none !important;
  color: #fffaf7 !important;
  box-shadow: 0 2px 8px rgba(160, 120, 104, 0.35) !important;
  transition: all 0.2s ease !important;
}

#prompt-input-footer button[type="submit"]:hover {
  background: linear-gradient(135deg, #c4a08c, #b89480) !important;
  box-shadow: 0 4px 12px rgba(160, 120, 104, 0.45) !important;
  transform: translateY(-1px) !important;
}

#prompt-input-footer button[type="submit"] svg {
  color: #fffaf7 !important;
}

/* 暗色模式 - 输入区域 */
@media (prefers-color-scheme: dark) {
  [data-slot="input-group-control"] {
    background-color: #362e28 !important;
    border-color: #5a4e44 !important;
    color: #e2d8cf !important;
    box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.25) !important;
  }
  [data-slot="input-group-control"]:focus-visible {
    border-color: #8a7b70 !important;
    box-shadow: inset 2px 2px 6px rgba(0,0,0,0.25), 0 0 0 4px rgba(138, 123, 112, 0.15) !important;
  }

  #prompt-input-header,
  #prompt-input-footer {
    background: rgba(50, 40, 35, 0.6) !important;
  }
  #prompt-input-header {
    border-bottom-color: #5a4e44 !important;
  }
  #prompt-input-footer {
    border-top-color: #5a4e44 !important;
  }

  #prompt-input-header button[class*="border-input"],
  #prompt-input-footer button[class*="border-input"],
  button:has(img[alt="google logo"]) {
    background: linear-gradient(to bottom, #5a4e44, #4a3e34) !important;
    border-color: #7a6b60 !important;
    color: #e2d8cf !important;
  }
  #prompt-input-header button[class*="border-input"]:hover,
  #prompt-input-footer button[class*="border-input"]:hover,
  button:has(img[alt="google logo"]):hover {
    background: linear-gradient(to bottom, #4a3e34, #3b302b) !important;
    border-color: #b89480 !important;
  }

  #prompt-input-header svg,
  #prompt-input-footer svg {
    color: #a08878 !important;
  }

  #prompt-input-footer button[type="submit"] {
    background: linear-gradient(135deg, #a07868, #8b6b5c) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  }
  #prompt-input-footer button[type="submit"]:hover {
    background: linear-gradient(135deg, #b89480, #a07868) !important;
  }
  #prompt-input-footer button[type="submit"] svg {
    color: #fffaf7 !important;
  }
}