/* ============================================
   完整CSS —— 适配上一轮HTML结构
   ============================================ */

/* ----- 容器与基础 ----- */
ai {
  display: block;
  max-width: 640px;
  margin: 0 auto;
  padding: 12px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #3e2c1a;
  background: #f4efe6;
  background-image: 
    linear-gradient(45deg, rgba(210, 190, 170, 0.15) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(210, 190, 170, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,240,0.6);
}

/* ----- 头部（时间/地点） ----- */
hd {
  display: block;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #d9c5b5 0%, #e8d5c0 100%);
  border-radius: 12px;
  font-size: 13px;
  color: #4a3724;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
hd del {
  text-decoration: none;
  color: #8b5a2b;
  margin-right: 4px;
}

/* ----- 正文 ----- */
article {
  padding: 12px 16px;
  background: rgba(255, 245, 235, 0.8);
  border-radius: 14px;
  margin: 12px 0;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.04);
  line-height: 1.75;
}
article p {
  margin: 0 0 8px 0;
}
article p:last-child {
  margin-bottom: 0;
}

/* ----- 状态栏容器 ----- */
menu {
  display: block;
  margin: 16px 0 0;
  padding: 0;
}

/* ----- details / summary ----- */
details {
  margin: 8px 0;
  background: rgba(255, 248, 240, 0.7);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
  transition: all 0.25s ease;
}
details[open] {
  background: rgba(255, 248, 240, 0.9);
}
summary {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  color: #5c3d26;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,240,0.5));
  border-bottom: 1px solid rgba(139, 90, 43, 0.1);
}
summary::-webkit-details-marker {
  display: none;
}
summary del {
  text-decoration: none;
  color: #8b5a2b;
  margin-right: 6px;
}

/* ----- 信息卡片 ----- */
f {
  display: block;
  padding: 10px 14px;
  margin: 6px 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  font-size: 13px;
  line-height: 1.6;
}
f n {
  font-weight: 700;
  color: #7ab0d4;
  font-size: 14px;
}
f d, d {
  display: inline;
  color: #5a4a3a;
}
f t, t {
  font-weight: 600;
  color: #a0815a;
  margin-right: 4px;
}
b { /* 用于 NSFW 标题 */
  display: block;
  padding: 6px 14px 4px;
  font-size: 13px;
  color: #c2185b;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ----- 数值组 (g) 与数值 (v) ----- */
g {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 6px 14px;
  margin: 0;
}
g d {
  display: inline-flex;
  align-items: center;
  background: rgba(122, 176, 212, 0.08);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
}
v {
  display: inline-block;
  padding: 1px 8px;
  margin-left: 4px;
  background: linear-gradient(135deg, #7ab0d4, #a8d0e8);
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
  color: white;
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
  box-shadow: 0 0 0 2px rgba(122, 176, 212, 0.2);
  animation: pop-in 0.3s ease-out both;
}
/* 数值弹动动画，每次渲染播放一次 */
@keyframes pop-in {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ----- NSFW 区域（深红-粉红渐变 & 丝绸纹理） ----- */
p[item="npc"] {
  background: linear-gradient(180deg, rgba(139,0,0,0.02), rgba(255,20,147,0.04));
  border-radius: 14px;
  margin: 4px;
}
p[item="npc"] g d {
  background: transparent;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
}
p[item="npc"] g d:hover {
  background: rgba(255,20,147,0.08);
  transform: scale(1.02);
}
p[item="npc"] span[s] {
  display: inline;
  padding: 1px 6px;
  border-radius: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #8B0000, #FF1493);
  background-size: 200% 200%;
  color: white;
  text-shadow: 0 0 4px rgba(255,20,147,0.6);
  box-shadow: 0 0 6px rgba(255,20,147,0.2), inset 0 0 4px rgba(255,255,255,0.3);
  animation: subtle-glow 3s ease-in-out infinite alternate;
}
/* 各身体部位不同色相 */
span[s="chest"] { background: linear-gradient(135deg, #b30059, #ff66a3); }
span[s="nipple"] { background: linear-gradient(135deg, #80002a, #ff3385); }
span[s="clit"] { background: linear-gradient(135deg, #660033, #ff6699); }
span[s="vagina"] { background: linear-gradient(135deg, #4d0033, #cc0066); }
span[s="womb"] { background: linear-gradient(135deg, #330033, #99004d); }
span[s="mouth"] { background: linear-gradient(135deg, #cc0044, #ff3377); }
span[s="neck"] { background: linear-gradient(135deg, #997300, #ffaa33); }

/* 丝绸纹理叠加 */
span[s]::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.05) 2px,
    rgba(255,255,255,0.05) 4px
  );
  pointer-events: none;
  border-radius: inherit;
}
span[s] {
  position: relative;
  display: inline-block;
}
/* 柔光动画 */
@keyframes subtle-glow {
  0% { box-shadow: 0 0 4px rgba(255,20,147,0.15); }
  100% { box-shadow: 0 0 12px rgba(255,20,147,0.4); }
}

/* ----- 内心想法 ----- */
f:has(d:first-child:not(only-child)) d[style] {} /* 不干扰 */
f t + d:first-of-type::before { content: '“'; }
f t + d:first-of-type::after { content: '”'; }

/* ----- 记忆表格 ----- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 12px;
  font-size: 12px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}
th {
  background: #d9c5b5;
  color: #4a3724;
  padding: 6px 8px;
  text-align: left;
}
td {
  padding: 6px 8px;
  border-bottom: 1px solid #f0e6d8;
}
tr:last-child td { border: none; }

/* ----- 行动推荐列表 ----- */
ol {
  margin: 8px 12px;
  padding-left: 22px;
}
ol li {
  padding: 4px 0;
  font-size: 13px;
  color: #4a3724;
  list-style: decimal;
}
ol li::marker {
  color: #7ab0d4;
  font-weight: 600;
}

/* ----- 手机 & 网络 ----- */
f t i {
  font-style: normal;
  font-weight: 600;
  color: #8b5a2b;
}

/* ----- 分隔线 / 间距微调 ----- */
del + d {
  margin-left: 2px;
}