/* ========== 隐藏思维链 ========== */
think {
  display: none;
}

/* ========== 正文区域美化 ========== */
text {
  display: block;
  background: linear-gradient(135deg, #fffaee 0%, #fff5e0 100%);
  border: 1px solid #e8c98a;
  border-left: 4px solid #d4a052;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
  color: #4a3318;
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 12px rgba(212, 160, 82, 0.12);
  position: relative;
}

text::before {
  content: "✦";
  position: absolute;
  top: 8px;
  right: 12px;
  color: #d4a052;
  font-size: 14px;
  opacity: 0.6;
}

/* ========== details 卡片容器 ========== */
details {
  background: linear-gradient(135deg, #fff9ec 0%, #fef3d8 100%);
  border: 1px solid #e8c98a;
  border-radius: 12px;
  margin: 10px 0;
  padding: 0;
  box-shadow: 0 2px 10px rgba(200, 144, 96, 0.15);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

details:hover {
  box-shadow: 0 4px 16px rgba(200, 144, 96, 0.25);
}

/* ========== summary 标题栏 ========== */
details summary {
  background: linear-gradient(90deg, #e8b86a 0%, #d4a052 50%, #c89060 100%);
  color: #fff9ec;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.2px;
  cursor: pointer;
  list-style: none;
  position: relative;
  text-shadow: 0 1px 2px rgba(107, 74, 37, 0.3);
  transition: background 0.3s ease;
}

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

details summary::before {
  content: "❀";
  margin-right: 8px;
  color: #fff9ec;
  font-size: 13px;
}

details summary::after {
  content: "▸";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  font-size: 12px;
  color: #fff9ec;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(90deg);
}

details[open] summary {
  background: linear-gradient(90deg, #d4a052 0%, #c89060 50%, #a87344 100%);
}

/* ========== details 内部 p 标签美化 ========== */
details p {
  margin: 6px 0;
  padding: 6px 14px;
  color: #5a3e1d;
  font-size: 13.5px;
  line-height: 1.7;
  border-bottom: 1px dashed #e8c98a;
}

details p:last-child {
  border-bottom: none;
}

details p:nth-child(even) {
  background: rgba(255, 245, 220, 0.5);
}

/* ========== 林未晚立绘图片 ========== */
details img {
  display: block;
  max-width: 60%;
  height: auto;
  margin: 12px auto;
  border-radius: 12px;
  border: 3px solid #e8b86a;
  box-shadow: 0 4px 14px rgba(200, 144, 96, 0.35);
  transition: transform 0.4s ease;
}

details img:hover {
  transform: scale(1.03);
}

/* ========== 林未晚信息块文本(纯文字段落) ========== */
details {
  font-size: 13.5px;
  color: #5a3e1d;
  line-height: 1.8;
}

details summary + img + br,
details summary + p + br {
  display: none;
}

/* ========== 记忆区表格 ========== */
details table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 12px;
  background: #fffaee;
  border-radius: 8px;
  overflow: hidden;
}

details table th {
  background: linear-gradient(90deg, #d4a052, #c89060);
  color: #fff9ec;
  padding: 8px 6px;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.5px;
}

details table td {
  padding: 7px 6px;
  color: #5a3e1d;
  border-bottom: 1px solid #f0dcb0;
  word-break: break-word;
  vertical-align: top;
}

details table tr:nth-child(even) td {
  background: rgba(254, 243, 216, 0.6);
}

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

details table tr:hover td {
  background: rgba(232, 184, 106, 0.15);
}

/* 长短期记忆标识段落 */
details > p {
  background: linear-gradient(90deg, #fef3d8, #fff9ec);
  color: #a87344;
  font-weight: 600;
  padding: 8px 14px;
  margin: 8px 0 4px;
  border-left: 3px solid #d4a052;
  font-size: 13px;
  letter-spacing: 1px;
}

/* ========== 行动推荐选项 ========== */
details summary:not([class]) + br + *,
details > p + p + p + p {
  /* 通用兜底，不强约束 */
}

/* 行动推荐项采用 p 包装效果 */
details p[class*="action"],
details summary[class*="action"] + p {
  background: linear-gradient(90deg, #fff9ec, #fef3d8);
  padding: 8px 14px;
  margin: 6px 0;
  border-left: 3px solid #d4a052;
  border-radius: 0 8px 8px 0;
  transition: all 0.3s ease;
  cursor: default;
}

details p[class*="action"]:hover {
  background: linear-gradient(90deg, #fef3d8, #f8e2b0);
  border-left-width: 5px;
  transform: translateX(3px);
}

/* ========== 响应式·手机端适配 ========== */
@media (max-width: 600px) {
  text {
    font-size: 14px;
    padding: 12px 13px;
    line-height: 1.8;
  }
  
  details summary {
    font-size: 13px;
    padding: 9px 12px;
    letter-spacing: 0.8px;
  }
  
  details p {
    font-size: 13px;
    padding: 5px 12px;
  }
  
  details img {
    max-width: 75%;
  }
  
  details table {
    font-size: 11px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  
  details table th,
  details table td {
    padding: 6px 5px;
  }
}

@media (max-width: 380px) {
  text {
    font-size: 13.5px;
    padding: 10px 11px;
  }
  
  details summary {
    font-size: 12.5px;
    padding: 8px 10px;
  }
  
  details p {
    font-size: 12.5px;
    padding: 4px 10px;
  }
  
  details img {
    max-width: 85%;
  }
}

/* ========== 高亮·特殊数值视觉强化 ========== */
details p strong,
text strong {
  color: #c8602f;
  font-weight: 600;
}

/* ========== 滚动条美化(部分浏览器) ========== */
details table::-webkit-scrollbar {
  height: 4px;
}

details table::-webkit-scrollbar-thumb {
  background: #d4a052;
  border-radius: 2px;
}

details table::-webkit-scrollbar-track {
  background: #fef3d8;
}