/* ========================================================= */
/* ===== 1. 折叠栏整体 ===== */
/* ========================================================= */
details {
  display: block;
  background: linear-gradient(135deg, #f7f9fc 0%, #eef1f7 100%);
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 16px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dce0e8;
  border-left: 4px solid #2957a2;
  box-shadow: 0 4px 14px rgba(41,87,162,0.10);
  transition: box-shadow .3s ease, transform .2s ease;
}
details[open] {
  box-shadow: 0 6px 22px rgba(41,87,162,0.18);
}
details:hover {
  transform: translateY(-1px);
}

/* 折叠标题 */
details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  background: linear-gradient(135deg, #2957a2 0%, #3d7bd4 100%);
  border-radius: 22px;
  padding: 11px 20px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #ffffff;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(41,87,162,0.30);
  text-align: left;
  user-select: none;
}
details summary::after {
  content: "▾";
  font-size: 0.9em;
  transition: transform .3s ease;
  color: #cfe0ff;
}
details[open] summary::after {
  transform: rotate(180deg);
}
details summary::-webkit-details-marker { display: none; }
details summary::marker { display: none; content: ""; }

/* 叙事正文段落 */
.narrative-p {
  text-indent: 2em;
  line-height: 1.9;
  margin: 0.8em 0;
}

/* ========================================================= */
/* ===== 2. 对话美化框（林晚晚粉红，用户紫色） ===== */
/* ========================================================= */
.dialogue-box {
  position: relative;
  display: block;
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
  border-left: 4px solid #e91e63;
  border-radius: 4px 16px 16px 16px;
  padding: 12px 18px 12px 16px;
  margin: 14px 0 14px 8px;
  box-shadow: 0 2px 10px rgba(233,30,99,0.12);
  text-indent: 0 !important;
}
.dialogue-box .speaker {
  display: block;
  font-size: 0.82em;
  font-weight: 700;
  color: #c2185b;
  margin-bottom: 4px;
  letter-spacing: .5px;
}
.dialogue-box .dialogue-text {
  display: block;
  color: #ad1457;
  font-size: 1.04em;
  line-height: 1.7;
}
.dialogue-box[data-role="user"] {
  background: linear-gradient(135deg, #f3ecfb 0%, #ece0fa 100%);
  border-left-color: #7a4fbf;
}
.dialogue-box[data-role="user"] .speaker { color: #5a2f9f; }
.dialogue-box[data-role="user"] .dialogue-text { color: #7a4fbf; }

/* 内心独白 */
.inner-monologue {
  color: #8a8a9e;
  font-style: italic;
  background: rgba(138,138,158,0.06);
  border-radius: 10px;
  padding: 6px 14px;
  margin: 10px 0;
  text-indent: 0 !important;
}

/* ========================================================= */
/* ===== 3. 数值进度条 ===== */
/* ========================================================= */
.stat-bar { margin: 14px 0; }
.stat-bar .stat-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.92em;
  color: #1a1a2e;
  margin-bottom: 6px;
}
.stat-bar .stat-label span {
  font-weight: 500;
  font-size: 0.88em;
  color: #555;
}
.stat-bar .bar-track {
  width: 100%;
  height: 14px;
  background: #e2e6ee;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.12);
}
.stat-bar .bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .6s ease;
  box-shadow: 0 0 8px rgba(0,0,0,0.15) inset;
}
.stat-bar.trust .bar-fill {
  background: linear-gradient(90deg, #3d7bd4 0%, #4fc3c0 100%);
}
.stat-bar.lust .bar-fill {
  background: linear-gradient(90deg, #ff9ac4 0%, #e8455f 100%);
}
.stat-bar.risk .bar-fill {
  background: linear-gradient(90deg, #ffd166 0%, #ef476f 100%);
}
.stat-bar.intimacy .bar-fill {
  background: linear-gradient(90deg, #a06bff 0%, #6b3fd4 100%);
}
.stat-detail-label {
  display: inline-block;
  font-size: 0.85em;
  font-weight: 600;
  color: #2957a2;
  margin-top: 8px;
  margin-right: 4px;
}

/* ========================================================= */
/* ===== 4. 档案标签栏（精简常驻版） ===== */
/* ========================================================= */
.profile-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}
.tag-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tag-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 26px;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid #90caf9;
  border-radius: 6px;
  font-size: 0.82em;
  font-weight: 700;
  color: #1565c0;
  flex-shrink: 0;
}
.tag-content {
  font-size: 0.92em;
  color: #333;
  line-height: 1.5;
}

/* ========================================================= */
/* ===== 5. 立绘 ===== */
/* ========================================================= */
.profile-portrait {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 14px auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.profile-portrait img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================================= */
/* ===== 6. 详细档案折叠区（纵向列表） ===== */
/* ========================================================= */
.profile-detail {
  margin-top: 14px;
  background: linear-gradient(135deg, #faf7f2 0%, #f5f0e8 100%);
  border: 1px solid #e8e0d4;
  border-radius: 12px;
  padding: 12px 16px;
}
.profile-detail > summary {
  background: none !important;
  box-shadow: none !important;
  color: #8d6e63 !important;
  padding: 4px 0 !important;
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  list-style: none;
}
.profile-detail > summary::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.8em;
  color: #bcaaa4;
  transition: transform .3s ease;
}
.profile-detail[open] > summary::after {
  transform: rotate(180deg);
}
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 14px 0;
}
.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #d7ccc8;
}
.detail-item:last-child {
  border-bottom: none;
}
.detail-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 26px;
  padding: 0 10px;
  background: linear-gradient(135deg, #efebe9 0%, #d7ccc8 100%);
  border: 1px solid #bcaaa4;
  border-radius: 8px;
  font-size: 0.82em;
  font-weight: 600;
  color: #5d4037;
  flex-shrink: 0;
  margin-top: 1px;
}
.detail-text {
  font-size: 0.88em;
  color: #4e342e;
  line-height: 1.6;
  flex: 1;
}
.profile-meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e8e0d4;
}
.profile-meta p {
  font-size: 0.88em;
  color: #5d4037;
  margin: 5px 0;
  line-height: 1.5;
}
.profile-meta b { color: #3e2723; font-weight: 600; }
.profile-meta i { color: #8d6e63; }