/* ============================================================
   暧昧期 · 夜色情书主题美化 v4（档案纸 · 全动态）
   根标签：<card>（含 hd / text / panel / sync / m / d）
   已遵守平台红线：无 html/body/* 前缀、无 inset 简写、
   无 backdrop-filter
   ============================================================ */

/* ---------- 隐藏推演链（思维链） ---------- */
card details.cot {
  display: none !important;
}

/* ---------- 根容器：夜色酒馆氛围 ---------- */
card {
  --rose: #ff7aa2;
  --rose-deep: #e0527f;
  --rose-light: #ff9dbd;
  --rose-soft: #ffc2d4;
  --gold: #e8bd7a;
  --cream: #f7e8dc;
  --ink: #f6e0e8;

  display: block;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 34px 30px 40px;
  border-radius: 30px;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.85;
  overflow: hidden;
  border: 1px solid rgba(232, 189, 122, 0.35);
  background:
    radial-gradient(1100px 500px at -10% -20%, rgba(255, 122, 162, 0.26), transparent 60%),
    radial-gradient(900px 460px at 115% 110%, rgba(232, 189, 122, 0.2), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.6px),
    linear-gradient(155deg, #23101d 0%, #3c1a2e 50%, #55233c 100%);
  background-size: auto, auto, 22px 22px, auto;
  box-shadow:
    0 24px 60px rgba(15, 4, 12, 0.6),
    0 0 0 1px rgba(255, 122, 162, 0.12),
    0 0 0 8px rgba(255, 122, 162, 0.05),
    0 0 0 9px rgba(232, 189, 122, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(232, 189, 122, 0.25);
}

/* 顶部饰带：细金线 + 菱钻 */
card::before {
  content: "✦ ✦ ✦";
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 22px;
  padding-left: 22px;
  color: var(--gold);
  opacity: 0.55;
  pointer-events: none;
}

/* 底部暗纹：大朵玫瑰水印 */
card::after {
  content: "❀";
  position: absolute;
  right: 18px;
  bottom: 8px;
  font-size: 60px;
  line-height: 1;
  color: var(--rose);
  opacity: 0.08;
  transform: rotate(-14deg);
  pointer-events: none;
}

/* 文字选中色 */
card ::selection {
  background: rgba(224, 82, 127, 0.45);
  color: #ffffff;
}

/* 细滚动条 */
card ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
card ::-webkit-scrollbar-thumb {
  background: rgba(255, 122, 162, 0.35);
  border-radius: 3px;
}

/* ---------- 顶部信息条（时间 / 地点 / 天气） ---------- */
card hd {
  display: block;
  position: relative;
  overflow: hidden;
  margin: 10px 0 20px;
  padding: 12px 46px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--cream);
  border-radius: 14px;
  border: 1px solid rgba(232, 189, 122, 0.35);
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0 8px, transparent 8px 16px),
    linear-gradient(90deg, rgba(224, 82, 127, 0.3), rgba(232, 189, 122, 0.2), rgba(150, 110, 200, 0.24), rgba(224, 82, 127, 0.3));
  animation: cardHdBreathe 3.2s ease-in-out infinite;
}

/* 状态灯：左侧呼吸亮点 */
card hd::before {
  content: "●";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: var(--rose);
  text-shadow: 0 0 10px var(--rose), 0 0 4px var(--rose);
  animation: cardHdBlink 1.6s ease-in-out infinite;
  pointer-events: none;
}

/* 流光：斜向扫过信息条 */
card hd::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -35%;
  width: 32%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-16deg);
  animation: cardHdSweep 4.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cardHdBlink {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes cardHdSweep {
  0% { left: -35%; }
  55%, 100% { left: 115%; }
}

@keyframes cardHdBreathe {
  0%, 100% {
    border-color: rgba(232, 189, 122, 0.35);
    box-shadow: 0 0 0 rgba(255, 122, 162, 0), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  50% {
    border-color: rgba(255, 122, 162, 0.65);
    box-shadow: 0 0 20px rgba(255, 122, 162, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }
}

/* ---------- 面板通用：双层描边 + 顶部色带 ---------- */
card panel,
card sync,
card > details {
  display: block;
  position: relative;
  margin: 18px 0;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(165deg, rgba(255, 122, 162, 0.08), rgba(10, 4, 8, 0.25));
  box-shadow: 0 6px 18px rgba(15, 4, 12, 0.3);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* 面板顶部高光色带 */
card panel::before,
card sync::before,
card > details::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 20px;
  right: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.75;
}

card panel:hover,
card sync:hover,
card > details:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 30px rgba(15, 4, 12, 0.5),
    0 0 22px rgba(255, 122, 162, 0.12);
}

/* 面板内部的虚线“缝线” */
card panel > details,
card sync > details {
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2px;
}

/* ---------- 档案纸面板通用 ---------- */
card panel.shared > details,
card sync > details,
card panel.npc > details,
card panel.actions > details {
  border: none;
  border-radius: 0;
  padding: 0 0 6px;
}

@keyframes cardPaperBreath {
  0%, 100% {
    box-shadow: 0 12px 28px rgba(15, 4, 12, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  }
  50% {
    box-shadow: 0 16px 36px rgba(15, 4, 12, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.75);
  }
}

@keyframes cardPanelSweep {
  0% { left: -50%; opacity: 0; }
  6% { opacity: 0.9; }
  62% { opacity: 0.9; }
  70%, 100% { left: 115%; opacity: 0; }
}

@keyframes cardRowSweep {
  0% { left: -55%; }
  55%, 100% { left: 120%; }
}

@keyframes cardStamp {
  0%, 100% { transform: rotate(-6deg) scale(1); opacity: 0.85; }
  50% { transform: rotate(-6deg) scale(1.06); opacity: 1; }
}

@keyframes cardBannerGlow {
  0%, 100% { box-shadow: 0 2px 8px rgba(120, 60, 40, 0.15); }
  50% { box-shadow: 0 2px 16px rgba(120, 60, 40, 0.32); }
}

@keyframes cardStarSpin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(90deg) scale(1.2); }
}

@keyframes cardSignFloat {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-2px); }
}

@keyframes cardBtnPulse {
  0%, 100% { border-color: rgba(192, 67, 95, 0.4); }
  50% { border-color: rgba(192, 67, 95, 0.9); }
}

@keyframes cardArrowSlide {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(3px); opacity: 1; }
}

/* ---------- 折叠标题 ---------- */
card summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 13px 46px 13px 20px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--cream);
  border-radius: 12px;
  user-select: none;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: color 0.25s ease, letter-spacing 0.3s ease;
}

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

card summary:hover {
  color: #ffffff;
  letter-spacing: 3.5px;
}

/* 右侧开合指示器 */
card summary::after {
  content: "＋";
  position: absolute;
  right: 16px;
  top: 13px;
  font-size: 15px;
  font-weight: 400;
  color: var(--rose);
  opacity: 0.8;
  transition: transform 0.4s ease;
}

card details[open] > summary::after {
  content: "－";
}

/* 展开后的分隔线 */
card details[open] > summary {
  border-bottom: 1px dashed rgba(255, 122, 162, 0.25);
  margin-bottom: 12px;
}

card summary:focus-visible {
  outline: 1px dashed var(--rose);
  outline-offset: 3px;
  border-radius: 8px;
}

/* 正文段落基础 */
card p {
  margin: 6px 0;
  font-size: 14.5px;
  color: var(--ink);
}

/* ---------- 主角信息：人物档案卡（换向美化） ---------- */
card panel.mc-neighbor {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(214, 166, 120, 0.55);
  background:
    linear-gradient(90deg, rgba(224, 82, 127, 0.13), transparent 44px),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(176, 90, 80, 0.16) 30px 31px),
    linear-gradient(165deg, #fdf4e8 0%, #f6e3cf 70%, #efd8bd 100%);
  box-shadow:
    0 12px 28px rgba(15, 4, 12, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* 档案卡内层：去掉通用虚线框 */
card panel.mc-neighbor > details {
  border: none;
  border-radius: 0;
  padding: 0 0 8px;
}

/* 红丝绒页签标题 */
card panel.mc-neighbor > details > summary {
  position: relative;
  margin: 0;
  padding: 14px 60px 14px 20px;
  color: #fff5ee;
  font-size: 17px;
  letter-spacing: 3px;
  border-radius: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(120deg, #d14a72 0%, #a93157 100%);
  text-shadow: 0 1px 4px rgba(90, 10, 40, 0.45);
  animation: cardBannerGlow 3.8s ease-in-out infinite;
}

/* 页签上的开合指示器 */
card panel.mc-neighbor > details > summary::after {
  color: rgba(255, 245, 238, 0.9);
}

/* 右上角红色档案章 */
card panel.mc-neighbor::before {
  content: "★ 档案";
  position: absolute;
  top: 10px;
  right: 14px;
  width: auto;
  height: auto;
  padding: 2px 9px;
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(255, 245, 238, 0.85);
  border: 2px solid rgba(255, 245, 238, 0.85);
  border-radius: 6px;
  background: none;
  transform: rotate(-6deg);
  opacity: 1;
  animation: cardStamp 4.2s ease-in-out infinite;
  pointer-events: none;
}

/* 右下角留档签名 */
card panel.mc-neighbor::after {
  content: "♡ 留档";
  position: absolute;
  bottom: 10px;
  right: 16px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(176, 90, 80, 0.35);
  transform: rotate(-4deg);
  pointer-events: none;
}

/* 档案内容行：横线纸 + 左侧花式小标 */
card panel.mc-neighbor p {
  position: relative;
  margin: 0;
  padding: 10px 18px 10px 52px;
  color: #4a2a38;
  font-size: 14.5px;
  border-bottom: 1px dashed rgba(176, 90, 80, 0.18);
  transition: background 0.25s ease;
}

card panel.mc-neighbor p::before {
  content: "❧";
  position: absolute;
  left: 22px;
  top: 10px;
  font-size: 12px;
  color: #c0435f;
  opacity: 0.55;
  pointer-events: none;
}

/* 姓名行高亮 */
card panel.mc-neighbor p:first-child {
  font-weight: 700;
  color: #8f2f4f;
  font-size: 15.5px;
  background: linear-gradient(90deg, rgba(224, 82, 127, 0.12), transparent 70%);
}

card panel.mc-neighbor p:hover {
  background: rgba(224, 82, 127, 0.06);
}

/* 档案行扫光（依次错开） */
card panel.mc-neighbor p::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(224, 82, 127, 0.09), transparent);
  transform: skewX(-15deg);
  animation: cardRowSweep 6s ease-in-out infinite;
  pointer-events: none;
}

card panel.mc-neighbor p:nth-of-type(1)::after { animation-delay: 0s; }
card panel.mc-neighbor p:nth-of-type(2)::after { animation-delay: 0.4s; }
card panel.mc-neighbor p:nth-of-type(3)::after { animation-delay: 0.8s; }
card panel.mc-neighbor p:nth-of-type(4)::after { animation-delay: 1.2s; }
card panel.mc-neighbor p:nth-of-type(5)::after { animation-delay: 1.6s; }
card panel.mc-neighbor p:nth-of-type(6)::after { animation-delay: 2s; }
card panel.mc-neighbor p:nth-of-type(7)::after { animation-delay: 2.4s; }
card panel.mc-neighbor p:nth-of-type(8)::after { animation-delay: 2.8s; }

/* ---------- 共通数值：青玉档案 ---------- */
card panel.shared {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(214, 166, 120, 0.55);
  background:
    linear-gradient(90deg, rgba(47, 125, 118, 0.14), transparent 44px),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(47, 125, 118, 0.12) 30px 31px),
    linear-gradient(165deg, #fdf4e8 0%, #f6e3cf 70%, #efd8bd 100%);
  box-shadow:
    0 12px 28px rgba(15, 4, 12, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  animation: cardPaperBreath 5s ease-in-out infinite;
}

/* 青玉页签标题 */
card panel.shared > details > summary {
  position: relative;
  margin: 0;
  padding: 14px 60px 14px 20px;
  color: #eefbf7;
  font-size: 16.5px;
  letter-spacing: 3px;
  border-radius: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(120deg, #3a8f86 0%, #25645e 100%);
  text-shadow: 0 1px 4px rgba(10, 60, 55, 0.4);
  animation: cardBannerGlow 4s ease-in-out infinite;
}

card panel.shared > details > summary::after {
  color: rgba(238, 251, 247, 0.9);
}

/* 标题左侧闪烁信号灯 */
card panel.shared > details > summary::before {
  content: "●";
  position: absolute;
  left: 8px;
  top: 15px;
  font-size: 9px;
  color: #9fe8dd;
  text-shadow: 0 0 8px #9fe8dd;
  animation: cardCursor 1.2s steps(1) infinite;
}

/* 右上角档案章 */
card panel.shared::before {
  content: "✦ 数值";
  position: absolute;
  top: 10px;
  right: 14px;
  width: auto;
  height: auto;
  padding: 2px 9px;
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(238, 251, 247, 0.9);
  border: 2px solid rgba(238, 251, 247, 0.9);
  border-radius: 6px;
  background: none;
  transform: rotate(-6deg);
  opacity: 1;
  animation: cardStamp 4.6s ease-in-out infinite;
  pointer-events: none;
}

/* 读数行：档案纸 + 扫光（依次错开） */
card panel.shared p {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 9px 18px 9px 52px;
  color: #4a2a38;
  font-size: 14.5px;
  border-bottom: 1px dashed rgba(47, 125, 118, 0.25);
  transition: background 0.25s ease, transform 0.25s ease;
}

card panel.shared p::before {
  content: "◆";
  position: absolute;
  left: 22px;
  top: 10px;
  font-size: 10px;
  color: #2f7d76;
  opacity: 0.55;
  pointer-events: none;
}

card panel.shared p::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(47, 125, 118, 0.1), transparent);
  transform: skewX(-15deg);
  animation: cardRowSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}

card panel.shared p:nth-of-type(1)::after { animation-delay: 0s; }
card panel.shared p:nth-of-type(2)::after { animation-delay: 0.6s; }
card panel.shared p:nth-of-type(3)::after { animation-delay: 1.2s; }
card panel.shared p:nth-of-type(4)::after { animation-delay: 1.8s; }
card panel.shared p:nth-of-type(5)::after { animation-delay: 2.4s; }

card panel.shared p:hover {
  background: rgba(47, 125, 118, 0.08);
  transform: translateX(4px);
}

/* 右下角留档签名 */
card panel.shared::after {
  content: "♡ 已记录";
  position: absolute;
  bottom: 8px;
  right: 16px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(47, 125, 118, 0.4);
  transform: rotate(-4deg);
  animation: cardSignFloat 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cardCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* ---------- 共感面板：绯红心跳档案 ---------- */
card sync {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(214, 166, 120, 0.55);
  background:
    linear-gradient(90deg, rgba(192, 67, 95, 0.14), transparent 44px),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(192, 67, 95, 0.12) 30px 31px),
    linear-gradient(165deg, #fdf4e8 0%, #f6e3cf 70%, #efd8bd 100%);
  box-shadow:
    0 12px 28px rgba(15, 4, 12, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  animation: cardSyncPulse 3.6s ease-in-out infinite;
}

/* 右上角跳动的心 */
card sync::before {
  content: "♥";
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 22px;
  line-height: 1;
  color: #d14a72;
  opacity: 0.75;
  animation: cardHeart 2.4s ease-in-out infinite;
  pointer-events: none;
}

/* 档案纸纵向扫光 */
card sync::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: -8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(192, 67, 95, 0.3), transparent);
  opacity: 0;
  animation: cardScan 4.5s linear infinite;
  pointer-events: none;
}

@keyframes cardScan {
  0% { top: -8%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 106%; opacity: 0; }
}

/* 全面板金色柔光扫过 */
card sync > details::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(214, 166, 120, 0.22), transparent);
  transform: skewX(-15deg);
  animation: cardPanelSweep 7.4s ease-in-out infinite;
  pointer-events: none;
}

/* 绯红页签标题 */
card sync > details > summary {
  position: relative;
  margin: 0;
  padding: 14px 60px 14px 20px;
  color: #fff2f6;
  font-size: 16.5px;
  letter-spacing: 3px;
  border-radius: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(120deg, #c0435f 0%, #8f2445 100%);
  text-shadow: 0 1px 4px rgba(90, 10, 40, 0.45);
  animation: cardBannerGlow 4.2s ease-in-out infinite;
}

card sync > details > summary::after {
  color: rgba(255, 242, 246, 0.9);
}

/* 标题左侧快跳的小心 */
card sync > details > summary::before {
  content: "♥";
  position: absolute;
  left: 6px;
  top: 15px;
  font-size: 10px;
  color: rgba(255, 242, 246, 0.95);
  animation: cardHeart 1.6s ease-in-out infinite;
}

/* 共感行：心跳标记 + 扫光 */
card sync p {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 9px 18px 9px 52px;
  color: #4a2a38;
  font-size: 14.5px;
  border-bottom: 1px dashed rgba(192, 67, 95, 0.22);
  transition: background 0.25s ease;
}

card sync p::before {
  content: "♥";
  position: absolute;
  left: 22px;
  top: 10px;
  font-size: 9px;
  color: #c0435f;
  opacity: 0.55;
  animation: cardHeart 2.8s ease-in-out infinite;
  pointer-events: none;
}

card sync p::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(192, 67, 95, 0.09), transparent);
  transform: skewX(-15deg);
  animation: cardRowSweep 5.8s ease-in-out infinite;
  pointer-events: none;
}

card sync p:nth-of-type(1)::after { animation-delay: 0s; }
card sync p:nth-of-type(2)::after { animation-delay: 0.5s; }
card sync p:nth-of-type(3)::after { animation-delay: 1s; }
card sync p:nth-of-type(4)::after { animation-delay: 1.5s; }
card sync p:nth-of-type(5)::after { animation-delay: 2s; }
card sync p:nth-of-type(6)::after { animation-delay: 2.5s; }
card sync p:nth-of-type(7)::after { animation-delay: 3s; }
card sync p:nth-of-type(8)::after { animation-delay: 3.5s; }

card sync p:hover {
  background: rgba(192, 67, 95, 0.06);
}

@keyframes cardSyncPulse {
  0%, 100% {
    border-color: rgba(192, 67, 95, 0.4);
    box-shadow: 0 12px 28px rgba(15, 4, 12, 0.45), 0 0 0 rgba(192, 67, 95, 0);
  }
  50% {
    border-color: rgba(192, 67, 95, 0.85);
    box-shadow: 0 12px 28px rgba(15, 4, 12, 0.45), 0 0 20px rgba(192, 67, 95, 0.3);
  }
}

@keyframes cardHeart {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.18); opacity: 0.6; }
}

/* ---------- NPC 信息：鎏金档案 ---------- */
card panel.npc {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(214, 166, 120, 0.55);
  background:
    linear-gradient(90deg, rgba(168, 127, 53, 0.16), transparent 44px),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(168, 127, 53, 0.12) 30px 31px),
    linear-gradient(165deg, #fdf4e8 0%, #f6e3cf 70%, #efd8bd 100%);
  box-shadow:
    0 12px 28px rgba(15, 4, 12, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  animation: cardPaperBreath 5.8s ease-in-out infinite;
}

/* 右上角名录章 */
card panel.npc::before {
  content: "✧ 名录";
  position: absolute;
  top: 10px;
  right: 14px;
  width: auto;
  height: auto;
  padding: 2px 9px;
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(255, 244, 221, 0.9);
  border: 2px solid rgba(255, 244, 221, 0.9);
  border-radius: 6px;
  background: none;
  transform: rotate(-6deg);
  opacity: 1;
  animation: cardStamp 5s ease-in-out infinite;
  pointer-events: none;
}

/* 全面板金色柔光扫过 */
card panel.npc > details::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(214, 166, 120, 0.24), transparent);
  transform: skewX(-15deg);
  animation: cardPanelSweep 7.8s ease-in-out infinite;
  pointer-events: none;
}

/* 鎏金页签标题 */
card panel.npc > details > summary {
  position: relative;
  margin: 0;
  padding: 14px 60px 14px 20px;
  color: #fff4dd;
  font-size: 16.5px;
  letter-spacing: 3px;
  border-radius: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(120deg, #a87f35 0%, #7c5a22 100%);
  text-shadow: 0 1px 4px rgba(60, 40, 5, 0.45);
  animation: cardBannerGlow 4.4s ease-in-out infinite;
}

card panel.npc > details > summary::after {
  color: rgba(255, 244, 221, 0.9);
}

/* 标题左侧旋转星饰 */
card panel.npc > details > summary::before {
  content: "✧";
  position: absolute;
  left: 7px;
  top: 14px;
  font-size: 11px;
  color: rgba(255, 244, 221, 0.95);
  animation: cardStarSpin 4s ease-in-out infinite;
}

/* 名录行：星标 + 扫光 */
card panel.npc p {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 8px 18px 8px 52px;
  color: #4a2a38;
  font-size: 14.5px;
  border-bottom: 1px dashed rgba(168, 127, 53, 0.25);
  transition: background 0.25s ease;
}

card panel.npc p::before {
  content: "✧";
  position: absolute;
  left: 22px;
  top: 9px;
  font-size: 10px;
  color: #a87f35;
  opacity: 0.55;
  pointer-events: none;
}

card panel.npc p::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(168, 127, 53, 0.1), transparent);
  transform: skewX(-15deg);
  animation: cardRowSweep 6s ease-in-out infinite;
  pointer-events: none;
}

card panel.npc p:nth-of-type(1)::after { animation-delay: 0s; }
card panel.npc p:nth-of-type(2)::after { animation-delay: 0.5s; }
card panel.npc p:nth-of-type(3)::after { animation-delay: 1s; }
card panel.npc p:nth-of-type(4)::after { animation-delay: 1.5s; }
card panel.npc p:nth-of-type(5)::after { animation-delay: 2s; }
card panel.npc p:nth-of-type(6)::after { animation-delay: 2.5s; }

card panel.npc p:hover {
  background: rgba(168, 127, 53, 0.07);
}

/* NPC 姓名：居中鎏金铭牌 + 专属流光 */
card panel.npc p:first-of-type {
  position: relative;
  text-align: center;
  color: #8a6420;
  font-weight: 700;
  letter-spacing: 4px;
  font-size: 16px;
  background: linear-gradient(90deg, transparent, rgba(168, 127, 53, 0.14), transparent);
  border-top: 1px solid rgba(168, 127, 53, 0.3);
  border-bottom: 1px solid rgba(168, 127, 53, 0.3);
  padding: 10px 12px;
  margin: 0;
}

card panel.npc p:first-of-type::before {
  content: "❖";
  left: 16px;
  top: 10px;
  color: #a87f35;
  opacity: 0.8;
}

card panel.npc p:first-of-type::after {
  animation-duration: 3.5s;
  background: linear-gradient(105deg, transparent, rgba(168, 127, 53, 0.2), transparent);
}

/* 右下角在册签名 */
card panel.npc::after {
  content: "✧ 在册";
  position: absolute;
  bottom: 8px;
  right: 16px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(168, 127, 53, 0.45);
  transform: rotate(-4deg);
  animation: cardSignFloat 3.6s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- 正文：奶油色手写信笺 ---------- */
card text {
  display: block;
  position: relative;
  margin: 22px 0;
  padding: 30px 30px 34px;
  border-radius: 10px;
  color: #4a2a38;
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(232, 189, 122, 0.25), transparent 60%),
    linear-gradient(165deg, #fdf4e8 0%, #f6e3cf 70%, #efd8bd 100%);
  border: 1px solid rgba(232, 189, 122, 0.55);
  box-shadow:
    0 14px 34px rgba(15, 4, 12, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 0 40px rgba(180, 120, 80, 0.12);
}

/* 信纸顶部横线 */
card text::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 90, 90, 0.35), transparent);
}

/* 右下角火漆印章 */
card text::after {
  content: "♡";
  position: absolute;
  right: 22px;
  bottom: -14px;
  width: 34px;
  height: 34px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9dbd, #e0527f 60%, #b03860);
  color: #ffffff;
  font-size: 15px;
  border: 2px solid rgba(120, 20, 60, 0.6);
  box-shadow: 0 4px 12px rgba(120, 20, 60, 0.5);
}

card text p {
  margin: 14px 0;
  text-indent: 2em;
  color: #4a2a38;
  font-size: 15.5px;
}

/* 首段首字下沉（楷体） */
card text p:first-child::first-letter {
  font-size: 2.4em;
  float: left;
  line-height: 1;
  margin: 6px 9px 0 0;
  font-family: "KaiTi", "STKaiti", Georgia, serif;
  color: #c0435f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ---------- 记忆区：紫檀档案 ---------- */
card > details {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(214, 166, 120, 0.55);
  background:
    linear-gradient(90deg, rgba(125, 58, 99, 0.14), transparent 44px),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(125, 58, 99, 0.1) 30px 31px),
    linear-gradient(165deg, #fdf4e8 0%, #f6e3cf 70%, #efd8bd 100%);
  box-shadow:
    0 12px 28px rgba(15, 4, 12, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  animation: cardPaperBreath 6s ease-in-out infinite;
}

/* 右上角记忆章 */
card > details::before {
  content: "❦ 记忆";
  position: absolute;
  top: 10px;
  right: 14px;
  width: auto;
  height: auto;
  padding: 2px 9px;
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(251, 232, 242, 0.9);
  border: 2px solid rgba(251, 232, 242, 0.9);
  border-radius: 6px;
  background: none;
  transform: rotate(-6deg);
  opacity: 1;
  animation: cardStamp 4.8s ease-in-out infinite;
  pointer-events: none;
}

/* 全面板金色柔光扫过 */
card > details::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(214, 166, 120, 0.2), transparent);
  transform: skewX(-15deg);
  animation: cardPanelSweep 8s ease-in-out infinite;
  pointer-events: none;
}

/* 紫檀页签标题 */
card > details > summary {
  position: relative;
  margin: 0;
  padding: 14px 60px 14px 20px;
  color: #fbe8f2;
  font-size: 16.5px;
  letter-spacing: 3px;
  border-radius: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(120deg, #7d3a63 0%, #5a2448 100%);
  text-shadow: 0 1px 4px rgba(60, 10, 40, 0.45);
  animation: cardBannerGlow 4.6s ease-in-out infinite;
}

card > details > summary::after {
  color: rgba(251, 232, 242, 0.9);
}

/* 标题左侧旋转花饰 */
card > details > summary::before {
  content: "❦";
  position: absolute;
  left: 7px;
  top: 14px;
  font-size: 12px;
  color: rgba(251, 232, 242, 0.95);
  animation: cardStarSpin 5s ease-in-out infinite;
}

/* 书页内层 */
card details details {
  position: relative;
  margin: 12px 6px 4px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(125, 58, 99, 0.2);
  border-left: 4px solid rgba(125, 58, 99, 0.45);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

card details details:hover {
  border-color: rgba(125, 58, 99, 0.5);
  transform: translateY(-1px);
}

card details details summary {
  position: relative;
  margin: 0;
  padding: 9px 38px 9px 18px;
  font-size: 14px;
  letter-spacing: 2px;
  color: #6f2f54;
  border-bottom: 1px dashed rgba(125, 58, 99, 0.2);
}

card details details summary::after {
  right: 10px;
  top: 9px;
  font-size: 13px;
  color: #7d3a63;
}

card details details summary::before {
  content: "❧";
  position: absolute;
  left: 4px;
  top: 9px;
  font-size: 11px;
  color: #7d3a63;
  opacity: 0.6;
}

/* 归纳状态行 */
card d {
  display: block;
  position: relative;
  padding: 3px 12px;
  font-size: 13px;
  color: #5c3a44;
  border-bottom: 1px dotted rgba(125, 58, 99, 0.15);
}

/* 核心守则高亮 */
card details details d:first-child {
  color: #8a2f55;
  font-weight: 600;
}

/* 记忆条目：紫檀书签 + 扫光 */
card m {
  display: block;
  position: relative;
  overflow: hidden;
  margin: 10px 6px;
  padding: 12px 16px 12px 22px;
  border-radius: 3px 10px 10px 3px;
  border-left: 4px solid #7d3a63;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.3));
  color: #4a2a38;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(90, 40, 60, 0.08);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

card m:nth-of-type(even) {
  border-left-color: #9b6bdf;
}

card m::before {
  content: "❦";
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 12px;
  color: rgba(125, 58, 99, 0.5);
  animation: cardStarSpin 6s ease-in-out infinite;
}

card m::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -55%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(125, 58, 99, 0.08), transparent);
  transform: skewX(-15deg);
  animation: cardRowSweep 6.5s ease-in-out infinite;
  pointer-events: none;
}

card m:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.5));
  transform: translateX(3px);
  box-shadow: 0 4px 10px rgba(90, 40, 60, 0.14);
}

/* ---------- 行动推荐：玫瑰档案按钮 ---------- */
card panel.actions {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(214, 166, 120, 0.55);
  background:
    linear-gradient(90deg, rgba(192, 67, 95, 0.13), transparent 44px),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(192, 67, 95, 0.1) 30px 31px),
    linear-gradient(165deg, #fdf4e8 0%, #f6e3cf 70%, #efd8bd 100%);
  box-shadow:
    0 12px 28px rgba(15, 4, 12, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  animation: cardPaperBreath 5.2s ease-in-out infinite;
}

/* 右上角行动章 */
card panel.actions::before {
  content: "→ 行动";
  position: absolute;
  top: 10px;
  right: 14px;
  width: auto;
  height: auto;
  padding: 2px 9px;
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(255, 242, 246, 0.9);
  border: 2px solid rgba(255, 242, 246, 0.9);
  border-radius: 6px;
  background: none;
  transform: rotate(-6deg);
  opacity: 1;
  animation: cardStamp 4.4s ease-in-out infinite;
  pointer-events: none;
}

/* 全面板金色柔光扫过 */
card panel.actions > details::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(214, 166, 120, 0.2), transparent);
  transform: skewX(-15deg);
  animation: cardPanelSweep 7s ease-in-out infinite;
  pointer-events: none;
}

/* 玫瑰页签标题 */
card panel.actions > details > summary {
  position: relative;
  margin: 0;
  padding: 14px 60px 14px 20px;
  color: #fff2f6;
  font-size: 16.5px;
  letter-spacing: 3px;
  border-radius: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(120deg, #c0435f 0%, #8f2445 100%);
  text-shadow: 0 1px 4px rgba(90, 10, 40, 0.45);
  animation: cardBannerGlow 4s ease-in-out infinite;
}

card panel.actions > details > summary::after {
  color: rgba(255, 242, 246, 0.9);
}

/* 标题左侧滑动箭头 */
card panel.actions > details > summary::before {
  content: "→";
  position: absolute;
  left: 6px;
  top: 13px;
  font-size: 13px;
  color: rgba(255, 242, 246, 0.95);
  animation: cardArrowSlide 1.8s ease-in-out infinite;
}

/* 纸感按钮：呼吸描边 + 悬停扫光 */
card panel.actions p {
  position: relative;
  overflow: hidden;
  margin: 8px 14px;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #6b2c3e;
  border: 1px solid rgba(192, 67, 95, 0.45);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.7), rgba(192, 67, 95, 0.08));
  box-shadow: 0 2px 6px rgba(90, 40, 60, 0.08);
  animation: cardBtnPulse 4s ease-in-out infinite;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

card panel.actions p:nth-of-type(2) { animation-delay: 0.4s; }
card panel.actions p:nth-of-type(3) { animation-delay: 0.8s; }
card panel.actions p:nth-of-type(4) { animation-delay: 1.2s; }
card panel.actions p:nth-of-type(5) { animation-delay: 1.6s; }

card panel.actions p::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 60%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: translateX(-130%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

card panel.actions p:hover {
  transform: translateX(6px);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(192, 67, 95, 0.16));
  box-shadow: 0 4px 12px rgba(192, 67, 95, 0.25);
}

card panel.actions p:hover::before {
  transform: translateX(260%);
}

/* 右下角下一步签名 */
card panel.actions::after {
  content: "♡ 下一步";
  position: absolute;
  bottom: 8px;
  right: 16px;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(192, 67, 95, 0.4);
  transform: rotate(-4deg);
  animation: cardSignFloat 3.4s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- 展开内容入场动画（纸页翻开） ---------- */
@keyframes cardFadeIn {
  from { opacity: 0; transform: perspective(600px) rotateX(-8deg) translateY(8px); }
  to { opacity: 1; transform: perspective(600px) rotateX(0deg) translateY(0); }
}

card details[open] > p,
card details[open] > m,
card details[open] > d,
card details details[open] > m,
card details details[open] > d {
  animation: cardFadeIn 0.35s ease;
}

/* ---------- 窄屏适配 ---------- */
@media (max-width: 600px) {
  card {
    padding: 22px 14px 28px;
    border-radius: 20px;
  }

  card hd {
    padding: 10px 38px;
    font-size: 13px;
  }

  card summary {
    font-size: 15px;
    padding: 10px 38px 10px 14px;
  }

  card text {
    padding: 22px 18px 28px;
  }
}
/* ===== 隐藏所有 class="cot" 的思维链 details ===== */
details.cot {
  display: none !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
}