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

/* ===== 外部容器 ===== */
.card-wrap {
  position: relative;
  padding: 4px 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  color: #d4d4d4;
}

/* ===== 顶部状态栏 ===== */
header {
  display: block;
  margin: 0 0 12px 0;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(143, 168, 200, 0.15), rgba(176, 196, 222, 0.08));
  border-left: 3px solid #8fa8c8;
  border-radius: 0 8px 8px 0;
  backdrop-filter: blur(4px);
}

.card-wrap header p {
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: #8fa8c8;
  letter-spacing: 2px;
}

/* ===== 正文区域 ===== */
text {
  display: block;
  margin: 16px 0;
  padding: 0 4px;
}

.card-wrap text p {
  margin: 00 14px 0;
  padding: 0;
  font-size: 15px;
  line-height: 2;
  color: #d4d4d4;
  text-align: justify;
  text-indent: 2em;
}

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

/* ===== 折叠区域通用 ===== */
.card-wrap details {
  margin: 8px 0;
  padding: 0;
  border: 1px solid rgba(143, 168, 200, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.card-wrap details[open] {
  border-color: rgba(143, 168, 200, 0.4);
}

.card-wrap details summary {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #b0c4de;
  background: linear-gradient(135deg, rgba(143, 168, 200, 0.1), rgba(0, 0, 0, 0.05));
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: all 0.3s ease;letter-spacing: 1px;
  user-select: none;
}

.card-wrap details summary::-webkit-details-marker {
  display: none;
}

.card-wrap details summary::after {
  content: "▸";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #8fa8c8;
  transition: transform 0.3s ease;
}

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

.card-wrap details summary:hover {
  background: linear-gradient(135deg, rgba(143, 168, 200, 0.2), rgba(232, 196, 160, 0.08));
  color: #e8c4a0;
  text-shadow: 0 0 12px rgba(232, 196, 160, 0.3);
}

.card-wrap details summary:active {
  transform: scale(0.99);
}

/* ===== 折叠内容区域 ===== */
.card-wrap details > p {
  margin: 0;
  padding: 4px 16px;
  font-size: 13.5px;
  line-height: 1.9;
  color: #c0c0c0;
  border-bottom: 1px solid rgba(143, 168, 200, 0.06);
}

.card-wrap details > p:first-of-type {
  padding-top: 10px;
}

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

/* ===== 记忆区表格 ===== */
.memory-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 12px 0;
  font-size: 12.5px;
  table-layout: fixed;
}

.memory-table th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  color: #e8c4a0;
  background: rgba(232, 196, 160, 0.1);
  border-bottom: 2px solid rgba(232, 196, 160, 0.25);
  letter-spacing: 1px;text-transform: uppercase;
}

.memory-table td {
  padding: 7px 10px;
  text-align: left;
  color: #b8b8b8;
  border-bottom: 1px solid rgba(143, 168, 200, 0.1);
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.memory-table tr:hover td {
  background: rgba(143, 168, 200, 0.06);
}

/*表格列宽分配 */
.memory-table th:nth-child(1),
.memory-table td:nth-child(1) {
  width: 8%;
  text-align: center;
}

.memory-table th:nth-child(2),
.memory-table td:nth-child(2) {
  width: 28%;
}

.memory-table th:nth-child(3),
.memory-table td:nth-child(3) {
  width: 18%;
}

.memory-table th:nth-child(4),
.memory-table td:nth-child(4) {
  width: 46%;
}

/* ===== 推荐行动区域 ===== */
.actions {
  margin: 14px 0 4px 0;
  padding: 12px;
  background: linear-gradient(135deg, rgba(143, 168, 200, 0.08), rgba(232, 196, 160, 0.04));
  border: 1px solid rgba(143, 168, 200, 0.15);
  border-radius: 8px;
}

.actions .actions-title {
  margin: 0 0 10px 0;
  padding: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #e8c4a0;
  border-bottom: 1px solid rgba(232, 196, 160, 0.2);
  letter-spacing: 1px;
}

.action-item {
  margin: 6px 0;
  padding: 9px 14px;
  font-size: 13.5px;
  color: #b0c4de;
  background: rgba(143, 168, 200, 0.06);
  border: 1px solid rgba(143, 168, 200, 0.12);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.action-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #8fa8c8, #e8c4a0);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.action-item:hover {
  background: rgba(143, 168, 200, 0.14);
  border-color: rgba(143, 168, 200, 0.3);
  color: #e8c4a0;
  transform: translateX(4px);
  text-shadow: 0 0 8px rgba(232, 196, 160, 0.2);
}

.action-item:hover::before {
  opacity: 1;
}

.action-item:active {
  transform: translateX(2px) scale(0.99);
}

/* ===== 正文与状态栏之间的分隔装饰 ===== */
.card-wrap text + details {
  margin-top: 16px;
  position: relative;
}

.card-wrap text + details::before {
  content: "· ··";
  display: block;
  text-align: center;
  color: rgba(143, 168, 200, 0.3);
  font-size: 16px;
  letter-spacing: 8px;
  margin: -8px 0 8px 0;
}

/* ===== 移动端基础适配 ===== */
@media screen and (max-width: 768px) {
  .card-wrap {
    padding: 2px 0;
  }

  header {
    padding: 8px 12px;
    margin-bottom: 10px;
  }

  .card-wrap header p {
    font-size: 12px;
    letter-spacing: 1px;
  }

  .card-wrap text p {
    font-size: 14.5px;
    line-height: 1.9;
  }

  .card-wrap details summary {
    padding: 9px 14px;
    font-size: 13.5px;
  }

  .card-wrap details > p {
    padding: 3px 14px;
    font-size: 13px;
  }

  .memory-table {
    font-size: 11.5px;
  }

  .memory-table th {
    padding: 6px 6px;
    font-size: 10.5px;
  }

  .memory-table td {
    padding: 5px 6px;
    font-size: 11.5px;
  }

  .memory-table th:nth-child(1),
  .memory-table td:nth-child(1) {
    width: 10%;
  }

  .memory-table th:nth-child(2),
  .memory-table td:nth-child(2) {
    width: 26%;
  }

  .memory-table th:nth-child(3),
  .memory-table td:nth-child(3) {
    width: 16%;
  }

  .memory-table th:nth-child(4),
  .memory-table td:nth-child(4) {
    width: 48%;
  }

  .actions {
    padding: 10px;
  }

  .action-item {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ===== 滚动条美化（网页端） ===== */
.card-wrap details::-webkit-scrollbar {
  width: 4px;
}

.card-wrap details::-webkit-scrollbar-track {
  background: transparent;
}

.card-wrap details::-webkit-scrollbar-thumb {
  background: rgba(143, 168, 200, 0.3);
  border-radius: 4px;
}

/* ===== 表格响应式滚动 ===== */
.card-wrap details > .memory-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================APP端 / 浅色背景模式 — 深色字体覆盖
   ============================================ */
@media (prefers-color-scheme: light) {

  .card-wrap {
    color: #2d2d2d;
  }

  /*顶部状态栏 */
  header {
    background: linear-gradient(135deg, rgba(61, 90, 128, 0.1), rgba(74, 107, 138, 0.05));
    border-left-color: #4a6b8a;
  }

  .card-wrap header p {
    color: #4a6b8a;
  }

  /* 正文 */
  .card-wrap text p {
    color: #2d2d2d;
  }

  /* 折叠区域 */
  .card-wrap details {
    border-color: rgba(61, 90, 128, 0.2);
  }

  .card-wrap details[open] {
    border-color: rgba(61, 90, 128, 0.35);
  }

  .card-wrap details summary {
    color: #3d5a80;
    background: linear-gradient(135deg, rgba(61, 90, 128, 0.08), rgba(255, 255, 255, 0.3));
  }

  .card-wrap details summary::after {
    color: #4a6b8a;
  }

  .card-wrap details summary:hover {
    background: linear-gradient(135deg, rgba(61, 90, 128, 0.15), rgba(160, 114, 77, 0.08));
    color: #8a6530;
    text-shadow: none;
  }

  /* 折叠内容 */
  .card-wrap details > p {
    color: #3a3a3a;
    border-bottom-color: rgba(61, 90, 128, 0.08);
  }

  /* 记忆区表格 */
  .memory-table th {
    color: #8a6530;
    background: rgba(160, 114, 77, 0.08);
    border-bottom-color: rgba(160, 114, 77, 0.25);
  }

  .memory-table td {
    color: #4a4a4a;
    border-bottom-color: rgba(61, 90, 128, 0.1);
  }

  .memory-table tr:hover td {
    background: rgba(61, 90, 128, 0.05);
  }

  /* 推荐行动 */
  .actions {
    background: linear-gradient(135deg, rgba(61, 90, 128, 0.06), rgba(160, 114, 77, 0.03));
    border-color: rgba(61, 90, 128, 0.15);
  }

  .actions .actions-title {
    color: #8a6530;
    border-bottom-color: rgba(160, 114, 77, 0.2);
  }

  .action-item {
    color: #3d5a80;
    background: rgba(61, 90, 128, 0.04);
    border-color: rgba(61, 90, 128, 0.12);
  }

  .action-item:hover {
    background: rgba(61, 90, 128, 0.1);
    border-color: rgba(61, 90, 128, 0.25);
    color: #8a6530;text-shadow: none;
  }

  /* 分隔装饰 */
  .card-wrap text + details::before {
    color: rgba(61, 90, 128, 0.25);
  }

  /* 滚动条 */
  .card-wrap details::-webkit-scrollbar-thumb {
    background: rgba(61, 90, 128, 0.25);
  }
}