ai {
  /* 默认暗色模式变量 */
  --bg-main: #120a0d;
  --text-main: #e8d5da;
  --bg-hd-top: #2d111a;
  --bg-hd-bot: #120a0d;
  --border-strong: #8e1b40;
  --text-hd: #ffb3c6;
  --bg-panel: #1a0f13;
  --border-panel: #4a1525;
  --bg-summary: #331420;
  --text-summary: #ff8da1;
  --text-k: #a97b88;
  --text-v: #ffd1dc;
  --bg-choice: #261219;
  --bg-choice-hover: #331420;
  --bg-bottom: #0a0507;
  --shadow-color: rgba(0,0,0,0.5);

  display: block;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-main);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-color);
  margin: 10px 0;
}

/* 自动适配浅色模式 */
@media (prefers-color-scheme: light) {
  ai {
    --bg-main: #fff0f3;
    --text-main: #4a1525;
    --bg-hd-top: #ffccd5;
    --bg-hd-bot: #fff0f3;
    --border-strong: #c9184a;
    --text-hd: #a4133c;
    --bg-panel: #ffffff;
    --border-panel: #ffb3c6;
    --bg-summary: #ffc8dd;
    --text-summary: #800f2f;
    --text-k: #8e1b40;
    --text-v: #590d22;
    --bg-choice: #ffe5ec;
    --bg-choice-hover: #ffc8dd;
    --bg-bottom: #fff0f3;
    --shadow-color: rgba(201, 24, 74, 0.15);
  }
}

ai hd {
  display: block;
  text-align: center;
  padding: 10px 5px;
  font-size: 13px;
  color: var(--text-hd);
  background: linear-gradient(180deg, var(--bg-hd-top) 0%, var(--bg-hd-bot) 100%);
  border-bottom: 2px solid var(--border-strong);
}
ai article {
  padding: 12px 15px;
}
ai p {
  margin: 0 0 10px 0;
  text-align: justify;
}
ai p:last-child {
  margin-bottom: 0;
}
ai details {
  margin: 8px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  overflow: hidden;
}
ai summary {
  padding: 8px 12px;
  background: var(--bg-summary);
  color: var(--text-summary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid transparent;
}
ai details[open] summary {
  border-bottom: 1px solid var(--border-panel);
}
ai summary::-webkit-details-marker {
  display: none;
}
ai t {
  display: block;
  font-size: 12px;
  color: var(--text-k);
  margin: 8px 12px 2px;
  padding-bottom: 2px;
  border-bottom: 1px dashed var(--border-panel);
}
ai g {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 6px 12px;
}
ai d {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13px;
  padding: 3px 0;
  border-bottom: 1px solid var(--bg-hd-top);
}
ai d:last-child {
  border-bottom: none;
}
ai k {
  color: var(--text-k);
  white-space: nowrap;
  margin-right: 10px;
  font-size: 12px;
}
ai v {
  color: var(--text-v);
  text-align: right;
  word-break: break-all;
}
ai c {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-bottom);
  border-top: 1px solid var(--bg-summary);
}
ai ch {
  display: block;
  padding: 8px 12px;
  background: var(--bg-choice);
  border-left: 3px solid var(--border-strong);
  border-radius: 0 4px 4px 0;
  color: var(--text-main);
  font-size: 13px;
  transition: all 0.2s;
}
ai ch:hover {
  background: var(--bg-choice-hover);
  border-left-color: var(--text-summary);
}
ai ch b {
  color: var(--text-summary);
  margin-right: 6px;
}
ai table {
  width: calc(100% - 24px);
  margin: 8px 12px;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--text-k);
}
ai th, ai td {
  border: 1px solid var(--border-panel);
  padding: 6px;
  text-align: left;
}
ai th {
  background: var(--bg-choice);
  color: var(--text-summary);
}