think {
  display: none;
}

text {
  display: block;
  line-height: 1.8;
  font-size: 15px;
}

text p {
  margin: 0.6em 0;
  text-indent: 2em;
}

details {
  margin: 8px 0;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 10px;
}

summary {
  cursor: pointer;
  font-weight: bold;
  padding: 4px 0;
}

/* ===== 忘川客栈 · 回复格式美化 ===== */

/* 整体容器 */
scene {
  display: block;
  font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  color: #3a3530;
  line-height: 1.8;
  padding: 4px 0;
}

/* ===== 正文区域 ===== */
text {
  display: block;
  padding: 16px 14px;
  margin: 12px 0;
  background: linear-gradient(180deg, rgba(245, 240, 232, 0.5) 0%, rgba(235, 229, 217, 0.3) 100%);
  border-left: 2px solid rgba(107, 143, 94, 0.35);
  border-radius: 0 8px 8px 0;
  position: relative;
}

text::before {
  content: '';
  position: absolute;
  top: 8px;
  left: -6px;
  width: 10px;
  height: 10px;
  background: #6b8f5e;
  border-radius: 50%;
  opacity: 0.4;
}

text p {
  margin: 0 0 12px 0;
  text-indent: 2em;
  font-size: 0.94em;
  line-height: 1.95;
  color: #3a3530;
}

text p:last-child {
  margin-bottom: 0;
}

/* ===== details/summary 统一样式 ===== */
scene details {
  margin: 8px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(197, 185, 154, 0.35);
  background: linear-gradient(135deg, #f5f0e8 0%, #ebe5d9 100%);
  transition: box-shadow 0.3s ease;
}

scene details[open] {
  box-shadow: 0 2px 12px rgba(58, 53, 48, 0.08);
}

scene details summary {
  padding: 10px 16px;
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-size: 0.95em;
  font-weight: 600;
  color: #4a6741;
  letter-spacing: 3px;
  cursor: pointer;
  background: linear-gradient(135deg, #ebe5d9 0%, #e4ddd0 100%);
  border-bottom: 1px solid rgba(197, 185, 154, 0.25);
  position: relative;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s ease;
}

scene details summary::-webkit-details-marker {
  display: none;
}

scene details summary::before {
  content: '◇';
  font-size: 0.7em;
  color: #b8a88a;
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
}

scene details[open] summary::before {
  content: '◆';
  color: #6b8f5e;
  transform: rotate(45deg);
}

scene details summary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c5b99a, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

scene details[open] summary::after {
  opacity: 1;
}

scene details summary:hover {
  background: linear-gradient(135deg, #e6dfcf 0%, #ddd5c5 100%);
}

/* details 内部内容区 */
scene details > p {
  padding: 4px 18px;
  margin: 0;
  font-size: 0.84em;
  line-height: 1.85;
  color: #4a4540;
  border-bottom: 1px dashed rgba(208, 199, 181, 0.4);
}

scene details > p:first-of-type {
  padding-top: 10px;
}

scene details > p:last-of-type {
  padding-bottom: 10px;
  border-bottom: none;
}

scene details > p strong {
  color: #4a6741;
  font-weight: 600;
  letter-spacing: 1px;
  margin-right: 2px;
}

/* ===== 时空信息 · 顶部状态栏特殊样式 ===== */
scene > details:first-child {
  background: linear-gradient(135deg, #eae4d6 0%, #e0d9c8 100%);
  border: 1px solid rgba(197, 185, 154, 0.4);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

scene > details:first-child::before {
  content: '';
  position: absolute;
  top: -15px;
  right: -15px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(107, 143, 94, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

scene > details:first-child summary {
  letter-spacing: 5px;
  text-align: center;
  justify-content: center;
}

/* ===== 记忆区 · markdown内容适配 ===== */
scene details ol,
scene details ul {
  padding: 4px 18px 10px 36px;
  margin: 0;
  font-size: 0.84em;
  line-height: 1.85;
  color: #4a4540;
}

scene details li {
  margin-bottom: 4px;
  padding-left: 2px;
}

scene details li strong {
  color: #4a6741;
  font-weight: 600;
}

/* 记忆区内部标题 */
scene details > p > strong:only-child,
scene details strong:first-child {
  display: inline-block;
  margin-top: 4px;
}

/* ===== 行动推荐 · 最后一个details ===== */
scene > details:last-child {
  background: linear-gradient(135deg, #f0ebe0 0%, #e8e1d3 100%);
  border: 1px dashed rgba(107, 143, 94, 0.3);
}

scene > details:last-child summary {
  color: #6b8f5e;
}

scene > details:last-child li {
  position: relative;
  padding-left: 8px;
}

scene > details:last-child li::marker {
  color: #6b8f5e;
}

/* ===== 好感度星星高亮 ===== */
scene details p {
  word-break: break-word;
}

/* ===== 整体动画 ===== */
scene details[open] > p,
scene details[open] > ul,
scene details[open] > ol {
  animation: wc-slideDown 0.35s ease;
}

@keyframes wc-slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 移动端适配 ===== */
@media screen and (max-width: 374px) {
  scene details summary {
    font-size: 0.88em;
    padding: 8px 12px;
    letter-spacing: 2px;
  }

  scene details > p {
    padding: 3px 12px;
    font-size: 0.8em;
  }

  text {
    padding: 12px 10px;
  }

  text p {
    font-size: 0.88em;
  }

  scene details ol,
  scene details ul {
    padding: 4px 12px 10px 28px;
    font-size: 0.8em;
  }
}

/* ===== 输入框美化 ===== */
#ai-chat-input {
  background: rgba(255, 248, 235, 0.85);
  color: #5c4033;
  border: none;
  font-size: 14px;
}

#ai-chat-input::placeholder {
  color: #c4a882;
}

/* 输入框外层容器 */
#ai-chat-input-container,
div:has(> #ai-chat-input) {
  background: rgba(255, 250, 240, 0.7);
  border: 1.5px solid #d4a96a !important;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

div:has(> #ai-chat-input):focus-within {
  border-color: #b8860b !important;
  box-shadow: 0 0 8px rgba(184, 134, 11, 0.3);
}

/* ===== 发送按钮美化 ===== */
#ai-send-button {
  background: linear-gradient(135deg, #d4a96a, #b8860b) !important;
  border-radius: 8px !important;
  transition: all 0.3s ease;
}

#ai-send-button:hover {
  background: linear-gradient(135deg, #e6c07a, #c9960c) !important;
  box-shadow: 0 0 12px rgba(184, 134, 11, 0.5);
  transform: scale(1.05);
}

#ai-send-button svg {
  color: #fff !important;
  fill: #fff !important;
}

/* ===== 第一排工具栏（复制/刷新/编辑等） ===== */
.MuiButton-textPrimary {
  color: #8b6914 !important;
  transition: all 0.25s ease;
}

.MuiButton-textPrimary:hover {
  background: rgba(212, 169, 106, 0.15) !important;
  color: #b8860b !important;
}

/* ===== 第二排工具栏（Mod/记忆增强/调试等） ===== */
.MuiButton-outlinedPrimary {
  border-color: #d4a96a !important;
  color: #8b6914 !important;
  transition: all 0.25s ease;
}

.MuiButton-outlinedPrimary:hover {
  background: rgba(212, 169, 106, 0.12) !important;
  border-color: #b8860b !important;
  color: #b8860b !important;
}

/* ===== 底部翻页区域统一色调 ===== */
.MuiPaginationItem-root {
  color: #8b6914 !important;
}

.MuiPaginationItem-root.Mui-selected {
  background: rgba(212, 169, 106, 0.25) !important;
  color: #b8860b !important;
}