ai {
  /* -- 色彩系统 -- */
  --bg-main: #f4f1e8; /* 基础背景: 羊皮纸/米白色 */
  --text-main: #3a3a3a; /* 主要文字: 深炭灰色 */
  --color-official: #345c8c; /* 官方/标题: 褪色海军蓝 */
  --color-rust: #c77826; /* 废土/警告: 铁锈色 */
  --color-asset: #3d9970; /* 资产/数值: 深松石绿 */
  /* -- 边框与阴影 -- */
  --border-light: #ddd;
  --border-main: #d1cbae;
  --border-dark: #c1b49a;
  --shadow-main: 0 2px 8px rgba(0,0,0,0.1);
}

/* ---------- 基础布局 (ai容器) ---------- */
ai {
  display: block;
  background-color: var(--bg-main);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' stitchTiles='stitch'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='100' height='100' fill='%23f4f1e8'/%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-color: var(--border-main) var(--border-dark) var(--border-dark);
  border-radius: 8px;
  box-shadow: var(--shadow-main);
  position: relative;
  overflow: hidden;
}

/* ---------- 叙事与标题 ---------- */
ai hd {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--color-official);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--color-official);
  padding-bottom: 4px;
}
ai hd time {
  float: right;
  font-size: 0.85em;
  font-weight: normal;
  color: #888;
}
ai article p {
  margin-bottom: 1em;
}

/* ---------- 可折叠状态面板 (details/summary) ---------- */
ai details {
  margin-top: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
ai summary {
  background-color: #e8e4d8;
  color: var(--color-official);
  font-weight: bold;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
  list-style: none;
  border-bottom: 1px solid #ccc;
}
ai summary::-webkit-details-marker {
  display: none;
}
ai summary::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(199, 120, 38, 0.15) 0%, rgba(199, 120, 38, 0) 70%);
  pointer-events: none;
}

/* ---------- 状态信息布局 (已修改为垂直布局) ---------- */
ai .grid {
  padding: 12px;
  display: flex; /* 使用flex进行垂直堆叠 */
  flex-direction: column;
  gap: 16px; /* 分区之间的垂直间距 */
}
ai .grid p[t] {
  padding-top: 24px;
  position: relative;
  display: flex; /* 每个分区内部也使用flex垂直堆叠 */
  flex-direction: column;
  gap: 4px; /* 字段与数据之间的垂直间距 */
  border-top: 1px dashed #c5c0b0;
}
ai .grid p[t]:first-child {
  border-top: none;
}
ai .grid p[t]::before {
  content: "// " attr(t);
  position: absolute;
  top: 0;
  left: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85em;
  color: #999;
  text-transform: uppercase;
}

/* ---------- 字段与数据样式 (已修改为垂直布局) ---------- */
ai f {
  font-weight: bold;
  font-size: 0.9em;
  color: var(--text-main);
  text-align: left; /* 字段名左对齐 */
  opacity: 0.8;
}
ai d {
  font-size: 0.9em;
  padding-left: 1em; /* 数据内容向内缩进，形成层级感 */
}
/* 特殊数据高亮 (保持不变) */
ai d[npc="1"] {
  color: var(--color-rust);
  font-weight: bold;
}
ai code {
  background: #eaf3ed;
  color: var(--color-asset);
  font-family: "Lucida Console", "Courier New", monospace;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.95em;
}

/* ---------- 行动推荐列表 (.actions) ---------- */
ai .actions {
  list-style: none;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid var(--border-main);
  border-radius: 4px;
  background-color: #faf8f0;
}
ai li-title {
  display: block;
  font-weight: bold;
  color: var(--color-official);
  margin-bottom: 8px;
  font-size: 0.9em;
  font-family: "Courier New", Courier, monospace;
}
ai .actions li {
  padding: 6px 10px;
  padding-left: 25px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border-radius: 3px;
  position: relative;
}
ai .actions li::before {
  content: '>';
  position: absolute;
  left: 10px;
  top: 6px;
  color: var(--color-rust);
  font-weight: bold;
  transition: all 0.2s ease-in-out;
}
ai .actions li:hover {
  background-color: #fbeee2;
  color: var(--color-rust);
  font-weight: bold;
}
ai .actions li:hover::before {
  transform: translateX(4px);
  color: #a55d17;
}