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

/* ===== 正文 ===== */
story-text {
  display: block;
  background: #fffafa;
  border-left: 3px solid #e8a0b4;
  border-radius: 0 12px 12px 0;
  padding: 16px 18px;
  margin: 10px 0;
  font-size: 15px;
  line-height: 1.85;
  color: #3d2535;
  letter-spacing: 0.02em;
}
story-text p {
  margin: 0 0 14px 0;
}
story-text p:last-child {
  margin-bottom: 0;
}

/* ===== 分隔线 ===== */
hr {
  border: none;
  border-top: 1px solid #f5d0dc;
  margin: 12px 0;
}

/* ===== 折叠栏通用 ===== */
details {
  background: #fffcfd;
  border: 1px solid #f2c8d5;
  border-radius: 12px;
  margin: 8px 0;
  overflow: hidden;
}
summary {
  list-style: none;
  padding: 11px 16px;
  background: linear-gradient(135deg, #ffe8f0, #ffd6e8);
  color: #c05070;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "▾";
  font-size: 16px;
  color: #d4688a;
  transition: transform 0.25s ease;
}
details[open] > summary {
  background: linear-gradient(135deg, #ffd0e4, #ffc0d8);
  border-bottom: 1px solid #f2c8d5;
}
details[open] > summary::after {
  transform: rotate(180deg);
}
details > p {
  padding: 7px 16px;
  font-size: 14px;
  color: #4a3040;
  line-height: 1.7;
  margin: 0;
  border-bottom: 1px solid #fdeef3;
}
details > p:last-of-type {
  border-bottom: none;
}

/* ===== 各栏色调 ===== */
.sw-scene > summary {
  background: linear-gradient(135deg, #fce8f0, #f8d5e5);
}
.sw-scene > p {
  font-size: 13px;
  color: #6b4558;
}
.sw-user > summary {
  background: linear-gradient(135deg, #fff0f5, #ffe4ed);
}
.sw-npc > summary {
  background: linear-gradient(135deg, #ffe0ec, #ffd0e4);
}

/* ===== 上官静渊·人物图片美化框 ===== */
.sw-npc > img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 340px;
  margin: 8px auto 10px;
  border-radius: 12px;
  border: 2px solid #f0b0c8;
  box-shadow:
    0 2px 8px rgba(180, 80, 110, .15),
    0 0 0 5px rgba(248, 210, 225, .22);
  object-fit: contain;
  background: #fef8fa;
}

/* ===== 嵌套 details ===== */
details details {
  margin: 8px 16px 12px;
  border: 1px dashed #f0b0c8;
  border-radius: 8px;
  background: #fff5f8;
}
details details > summary {
  background: linear-gradient(135deg, #fff0f5, #ffe8f0);
  font-size: 13px;
  padding: 8px 14px;
  color: #b05070;
}
details details > p {
  font-size: 13px;
  padding: 5px 14px;
  color: #5a3545;
}

/* ===== 关系栏 ===== */
.sw-relation > summary {
  background: linear-gradient(135deg, #ffe8f2, #ffd8ea);
}

/* ===== 记忆区 ===== */
.sw-memory-wrap > summary {
  background: linear-gradient(135deg, #fde0ec, #f8cce0);
}
.sw-memory {
  padding: 10px 14px;
}
.sw-mem-title {
  font-size: 13px;
  font-weight: 700;
  color: #c05070;
  margin: 8px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f2c8d5;
  display: block;
}
.sw-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 10px;
  border-radius: 8px;
}
.sw-memory table {
  min-width: 480px;
  border-collapse: collapse;
  width: max-content;
  font-size: 13px;
}
.sw-memory th {
  background: #fce0ea;
  color: #c05070;
  padding: 7px 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid #f0b0c8;
  font-weight: 600;
}
.sw-memory td {
  padding: 6px 12px;
  color: #4a3040;
  border-bottom: 1px solid #fdeef3;
  vertical-align: top;
  white-space: nowrap;
}
.sw-memory tr:nth-child(even) td {
  background: #fff8fa;
}
.sw-memory tr:hover td {
  background: #fff0f5;
  transition: background 0.15s;
}

/* ===== 行动推荐 ===== */
.sw-branch > summary {
  background: linear-gradient(135deg, #ffd8e8, #ffc8dc);
}
.sw-branch > p {
  margin: 6px 12px;
  padding: 9px 14px;
  background: linear-gradient(135deg, #fff5f8, #ffecf2);
  border: 1px solid #f2c8d5;
  border-radius: 10px;
  font-size: 14px;
  color: #4a3040;
  line-height: 1.6;
  transition: all 0.2s ease;
  cursor: pointer;
}
.sw-branch > p:hover {
  background: linear-gradient(135deg, #ffe4ee, #ffd6e8);
  transform: translateX(4px);
  box-shadow: 0 3px 10px rgba(212, 104, 138, 0.18);
  border-color: #e8a0b4;
}
.sw-branch > p:active {
  background: linear-gradient(135deg, #ffd8e8, #ffc8dc);
  transform: translateX(2px);
}
.sw-branch > p:last-child {
  margin-bottom: 10px;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  story-text {
    padding: 13px 14px;
    font-size: 14.5px;
    line-height: 1.8;
  }
  summary {
    padding: 10px 13px;
    font-size: 13.5px;
  }
  details > p {
    font-size: 13.5px;
    padding: 6px 13px;
  }
  details details {
    margin: 6px 10px 10px;
  }
  .sw-branch > p {
    margin: 5px 8px;
    padding: 8px 12px;
    font-size: 13.5px;
  }
  .sw-memory table {
    min-width: 400px;
  }
  .sw-memory th,
  .sw-memory td {
    padding: 6px 9px;
    font-size: 12.5px;
  }
  .sw-npc > img {
    max-height: 240px;
  }
}