/* ========== 顶部状态条 ========== */
topbar {
  display: block;
  background: linear-gradient(135deg, #0d1117 0%, #1a1f2e 100%);
  border: 1px solid #c9a84c55;
  border-left: 3px solid #c9a84c;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82em;
  color: #c9a84c;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px #c9a84c18;
}

/* ========== 正文区域 ========== */
text {
  display: block;
  background: linear-gradient(180deg, #111520 0%, #0d1117 100%);
  border: 1px solid #8b5cf633;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 14px;
  line-height: 2;
  color: #e0ddd5;
  font-size: 0.97em;
}
text p {
  margin: 0 0 1.1em 0;
  text-indent: 2em;
}
text p:last-child {
  margin-bottom: 0;
}

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

/* ========== 状态面板外层 details ========== */
details {
  background: #111827;
  border: 1px solid #2d3448;
  border-radius: 10px;
  margin: 8px 0;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}
details:hover {
  box-shadow: 0 0 12px #8b5cf628;
}
details[open] {
  border-color: #8b5cf666;
}

/* ========== summary 折叠标题 ========== */
details > summary {
  padding: 10px 16px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9em;
  color: #c9a84c;
  background: linear-gradient(90deg, #1a1f2e 0%, #111827 100%);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::before {
  content: "▶";
  font-size: 0.7em;
  color: #8b5cf6;
  transition: transform 0.25s ease;
  display: inline-block;
}
details[open] > summary::before {
  transform: rotate(90deg);
}
details > summary:hover {
  background: linear-gradient(90deg, #1e2540 0%, #16192a 100%);
  color: #e0c97a;
}

/* ========== 嵌套 details（同伴/身体状态等二级折叠）========== */
details details {
  background: #0d1117;
  border: 1px solid #8b5cf633;
  border-radius: 8px;
  margin: 6px 12px;
}
details details > summary {
  font-size: 0.85em;
  color: #a78bfa;
  background: linear-gradient(90deg, #13111f 0%, #0d1117 100%);
  padding: 8px 14px;
}
details details > summary::before {
  color: #c9a84c;
}
details details:hover {
  box-shadow: 0 0 8px #a78bfa22;
}

/* ========== 三级折叠（身体状态）========== */
details details details {
  background: #0a0d14;
  border: 1px solid #c9a84c22;
  border-radius: 6px;
  margin: 4px 10px;
}
details details details > summary {
  font-size: 0.82em;
  color: #f9a8d4;
  background: #0a0d14;
}
details details details > summary::before {
  color: #f9a8d4;
}

/* ========== details 内容区域内边距 ========== */
details > *:not(summary) {
  padding: 10px 16px;
}
details details > *:not(summary) {
  padding: 8px 14px;
}

/* ========== 列表条目 ========== */
details li,
details ul,
details ol {
  color: #ccc8bc;
  font-size: 0.88em;
  line-height: 1.85;
  margin: 0;
  padding-left: 1.2em;
}

/* ========== 好感度表格 ========== */
details table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83em;
  color: #ccc8bc;
  margin: 4px 0;
}
details table th {
  background: #1a1f2e;
  color: #c9a84c;
  padding: 7px 10px;
  text-align: center;
  border-bottom: 1px solid #c9a84c44;
  font-weight: bold;
  letter-spacing: 0.04em;
}
details table td {
  padding: 6px 10px;
  text-align: center;
  border-bottom: 1px solid #2d344822;
  transition: background 0.15s ease;
}
details table tr:hover td {
  background: #1a1f2e55;
}
details table tr:last-child td {
  border-bottom: none;
}

/* ========== 行动推荐 input ========== */
details input[type="text"][readonly] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #0d1117;
  border: 1px solid #8b5cf644;
  border-left: 3px solid #8b5cf6;
  border-radius: 6px;
  padding: 9px 14px;
  color: #c4b5fd;
  font-size: 0.87em;
  margin: 6px 0;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  caret-color: transparent;
}
details input[type="text"][readonly]:hover {
  border-color: #8b5cf6aa;
  background: #13111f;
  box-shadow: 0 0 10px #8b5cf622;
}
details input[type="text"][readonly]:focus {
  border-color: #c9a84c;
  box-shadow: 0 0 14px #c9a84c33;
}

/* ========== 记忆区/任务区 blockquote & strong ========== */
details strong {
  color: #c9a84c;
  font-size: 0.88em;
  letter-spacing: 0.05em;
}
details blockquote,
details > *:not(summary) > blockquote {
  border-left: 3px solid #8b5cf6;
  background: #0d1117;
  color: #a0aec0;
  margin: 6px 0;
  padding: 6px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 0.85em;
}

/* ========== 移动端适配 ========== */
@media (max-width: 600px) {
  topbar {
    font-size: 0.75em;
    padding: 6px 10px;
  }
  text {
    padding: 14px 14px;
    font-size: 0.93em;
  }
  details > summary {
    font-size: 0.85em;
    padding: 9px 12px;
  }
  details table {
    font-size: 0.76em;
  }
  details table th,
  details table td {
    padding: 5px 6px;
  }
  details input[type="text"][readonly] {
    font-size: 0.82em;
    padding: 8px 10px;
  }
}