ai {
  --sd: #0d0a0a;
  --bg: #140f0e;
  --ink: #1f1816;
  --red: #8b1d15;
  --gld: #b38b4d;
  --txt: #c2bba8;
  display: block;
  font-family: "SongTi", "STSong", serif;
  background: var(--sd);
  color: var(--txt);
  padding: 10px;
  border: 1px solid #2a1f1d;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  font-size: 14px;
  line-height: 1.6;
  max-width: 100%;
  box-sizing: border-box;
}

ai hd {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--gld);
  background: linear-gradient(90deg, transparent, rgba(139,29,21,0.5) 50%, transparent);
  padding: 4px 0;
  border-bottom: 1px solid var(--red);
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px #000;
}

ai article {
  display: block;
  color: #d1ccbf;
  margin-bottom: 15px;
  padding: 0 5px;
  text-align: justify;
}

ai details {
  background: var(--bg);
  border: 1px solid #362622;
  border-radius: 2px;
  overflow: hidden;
}

ai summary {
  background: linear-gradient(180deg, #2a1e1b, var(--ink));
  padding: 10px;
  color: var(--gld);
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid #362622;
  text-shadow: 0 1px 1px #000;
  user-select: none;
}
ai summary::-webkit-details-marker { display: none; }
ai summary::before {
  content: "▼";
  display: inline-block;
  color: var(--red);
  margin-right: 8px;
  transition: transform 0.3s;
}
ai details[open] summary::before { transform: rotate(180deg); }

ai details[open] {
  animation: ai-slip 0.4s ease-out;
}

ai p[t] {
  position: relative;
  display: block;
  margin: 8px 6px;
  padding: 8px 8px 8px 30px;
  background: rgba(255,255,255,0.02);
  border: 1px solid #241a18;
}

/* 左侧印章排版大宋卷宗感 */
ai p[t]::before {
  content: attr(t);
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  background: linear-gradient(180deg, var(--red), #4a0d08);
  color: #000;
  writing-mode: vertical-lr;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 2px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.5);
}

/* 名字高亮块 */
ai f {
  display: inline-block;
  padding: 1px 6px;
  background: var(--gld);
  color: #000;
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 4px;
}

ai n {
  display: inline-block;
  padding: 1px 6px;
  background: #3d0c0c;
  color: var(--gld);
  border: 1px solid var(--red);
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 4px;
}

/* 基础信息行流式排列 */
ai d {
  display: inline-block;
  width: 100%;
  color: #9c9584;
  font-size: 13px;
  margin-bottom: 2px;
}
ai d::before {
  content: "▪";
  color: var(--red);
  margin-right: 4px;
  font-size: 10px;
  vertical-align: middle;
}

/* 危机与偏离警告 */
ai d[c="w"] {
  color: #d15649;
  font-weight: bold;
  animation: ai-pulse 2s infinite;
}

/* 执念阈值长条特调 */
ai d[c="bar"] {
  color: var(--gld);
  letter-spacing: -1px;
}
ai d[c="bar"] b {
  color: #a84238;
  letter-spacing: 0;
}

/* 阴暗面心理剖析块 */
ai q[c="x"] {
  display: block;
  margin: 6px 0;
  padding: 6px 8px;
  background: linear-gradient(90deg, #1f0b0a, transparent);
  border-left: 2px solid var(--red);
  color: #c96d67;
  font-style: italic;
  font-size: 12.5px;
}
ai q[c="x"]::before { content: "『所思』 "; color: var(--red); font-style: normal; }

/* 🔞 极端肉体感官渲染块(艳红迷离感) */
ai q[c="s"] {
  display: block;
  margin: 6px 0;
  padding: 6px 8px;
  background: radial-gradient(circle at left, #290f19, transparent);
  border: 1px dashed #6b2639;
  color: #d48ba3;
  font-size: 12.5px;
  box-shadow: inset 0 0 12px rgba(138,41,75,0.2);
}
ai q[c="s"]::before { content: "『妄相』 "; color: #9c4562; }

/* 动作策引选项(交互刀刃感) */
ai p[t="策引"] d {
  display: block;
  padding: 4px 6px;
  background: var(--ink);
  border: 1px solid #2a1f1d;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--gld);
}
ai p[t="策引"] d:hover {
  background: linear-gradient(90deg, var(--red), transparent);
  color: #fff;
  border-color: var(--red);
  transform: translateX(4px);
  padding-left: 10px;
}
ai p[t="策引"] d::before { display: none; }

@keyframes ai-slip {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ai-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 2px rgba(209,86,73,0.2); }
  50% { opacity: 0.6; text-shadow: 0 0 8px rgba(209,86,73,0.8); }
}