/* ===== 通用折叠块样式 ===== */
.markdown-body details {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 12px 0;
  padding: 0;
  background: #fafafa;
}

.markdown-body summary {
  cursor: pointer;
  padding: 10px 16px;
  font-weight: 600;
  color: #2d3748;
  background: #f7fafc;
  border-radius: 8px 8px 0 0;
  list-style: none;
  transition: background 0.15s;
}

.markdown-body summary:hover {
  background: #edf2f7;
}

.markdown-body summary::-webkit-details-marker {
  display: none;
}

.markdown-body summary::before {
  content: "▶ ";
  display: inline-block;
  font-size: 0.75em;
  color: #718096;
  transition: transform 0.2s;
}

.markdown-body details[open] > summary::before {
  transform: rotate(90deg);
}

/* ===== 记忆回廊专属样式 ===== */
.mem-container {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f7fafc;
  padding: 0;
}

.mem-container summary {
  background: #edf2f7;
  font-weight: 700;
  border-radius: 8px 8px 0 0;
}

.mem-container .mem-config,
.mem-container .mem-stm,
.mem-container .mem-ltm {
  border: none;
  border-radius: 0;
  margin: 0;
  background: transparent;
}

.mem-container .mem-config summary,
.mem-container .mem-stm summary,
.mem-container .mem-ltm summary {
  background: #f7fafc;
  border-radius: 0;
  padding: 6px 16px;
  font-weight: 500;
  font-size: 0.9em;
}

.mem-container .mem-config ul.mem-list {
  list-style: none;
  padding: 8px 16px;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  font-size: 0.85em;
  color: #4a5568;
}

.mem-container .mem-config ul.mem-list li {
  padding: 2px 0;
}

.mem-container .mem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
  background: white;
}

.mem-container .mem-table th {
  background: #edf2f7;
  color: #2d3748;
  font-weight: 600;
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.mem-container .mem-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f4f8;
  color: #2d3748;
}

.mem-container .mem-table tr:last-child td {
  border-bottom: none;
}

/* ===== 兼容手机端 ===== */
@media (max-width: 640px) {
  .mem-container .mem-config ul.mem-list {
    grid-template-columns: 1fr;
  }
  .mem-container .mem-table {
    font-size: 0.75em;
  }
  .mem-container .mem-table th,
  .mem-container .mem-table td {
    padding: 4px 6px;
  }
}