/* ═══════════════════════════════════════
   返校 · 内置CSS · 完整版
   暗色 · 恐怖暧昧 · 超自然渲染 · 异常仪表盘
   ═══════════════════════════════════════ */

/* ═══ 折叠面板 ═══ */

.markdown-body details {
  background: #121010 !important;
  border: 1px solid #2a2424 !important;
  border-radius: 3px !important;
  margin: 12px 0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
  overflow: visible !important;
  color: #d0c8c0 !important;
}

.markdown-body details > summary {
  list-style: none !important;
  cursor: pointer !important;
  padding: 10px 16px !important;
  background: linear-gradient(135deg, #1a1616, #141010) !important;
  color: #c0b0a0 !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  border-bottom: 1px solid #2a2424 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  border-radius: 3px 3px 0 0 !important;
  letter-spacing: 1px !important;
}

.markdown-body details:not([open]) > summary {
  border-radius: 3px !important;
  border-bottom: none !important;
}

.markdown-body details > summary::before,
.markdown-body details > summary::marker {
  content: none !important;
  display: none !important;
}

.markdown-body details > *:not(summary) {
  padding: 14px 16px !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
  color: #c0b8b0 !important;
  overflow: visible !important;
  background: #121010 !important;
}

/* ═══ 表格 ═══ */

.markdown-body table {
  border-collapse: collapse !important;
  width: 100% !important;
  font-size: 13px !important;
  margin: 8px 0 !important;
  background: #121010 !important;
}

.markdown-body th {
  background: #8b1a1a !important;
  color: #f0e0d0 !important;
  padding: 6px 10px !important;
  text-align: left !important;
  font-weight: 700 !important;
  border: 1px solid #6a1414 !important;
}

.markdown-body td {
  padding: 5px 10px !important;
  border: 1px solid #2a2424 !important;
  color: #c0b8b0 !important;
  vertical-align: top !important;
  background: #121010 !important;
}

.markdown-body tr:nth-child(even) td {
  background: #161212 !important;
}

/* ═══ 对话气泡 ═══ */

.markdown-body .talk {
  position: relative;
  margin: 12px 0;
  padding: 12px 18px;
  border-radius: 2px 10px 10px 10px;
  border-left: 4px solid #3a3030;
  background: #161212;
  font-size: 15px;
  line-height: 1.8;
  color: #d0c8c0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.markdown-body .talk::before {
  font-size: 13px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.markdown-body .talk-qinyin { border-left-color: #b0a0d0; }
.markdown-body .talk-qinyin::before { content: '🎹 琴音'; color: #b0a0d0; }

.markdown-body .talk-shuling { border-left-color: #80a0b0; }
.markdown-body .talk-shuling::before { content: '📖 书灵'; color: #80a0b0; }

.markdown-body .talk-shuilan { border-left-color: #5090b0; }
.markdown-body .talk-shuilan::before { content: '🏊 水蓝'; color: #5090b0; }

.markdown-body .talk-huayi { border-left-color: #c06050; }
.markdown-body .talk-huayi::before { content: '🎨 画意'; color: #c06050; }

.markdown-body .talk-yingyue { border-left-color: #a0b0c0; }
.markdown-body .talk-yingyue::before { content: '🪞 映月'; color: #a0b0c0; }

.markdown-body .talk-baiyi { border-left-color: #d0d0d0; }
.markdown-body .talk-baiyi::before { content: '💊 白衣'; color: #d0d0d0; }

.markdown-body .talk-yuejian { border-left-color: #9090c0; }
.markdown-body .talk-yuejian::before { content: '🌙 月见'; color: #9090c0; }

.markdown-body .talk-jiuwu { border-left-color: #a09070; }
.markdown-body .talk-jiuwu::before { content: '📿 旧物'; color: #a09070; }

.markdown-body .talk-player { border-left-color: #60a070; }
.markdown-body .talk-player::before { content: '🧑 你'; color: #60a070; }

/* ═══ 内心·暗面 ═══ */

.markdown-body .thought {
  display: inline-block;
  background: rgba(139,26,26,0.08);
  color: #905050;
  font-style: italic;
  font-size: 13px;
  padding: 4px 12px 4px 20px;
  margin: 4px 0;
  border-left: 2px solid rgba(139,26,26,0.3);
  line-height: 1.5;
  position: relative;
}

.markdown-body .thought::before {
  content: '⛧';
  font-size: 0.7em;
  position: absolute;
  top: 3px;
  left: 5px;
  font-style: normal;
  color: #8b1a1a;
}

/* ═══ 超自然行为 ═══ */

.markdown-body .ghost-act {
  display: inline;
  color: #b0a0d0;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(176,160,208,0.2);
  position: relative;
}

.markdown-body .ghost-act::before {
  content: '⟐ ';
  opacity: 0.5;
  font-size: 0.8em;
}

.markdown-body .ghost-act::after {
  content: ' ⟐';
  opacity: 0.5;
  font-size: 0.8em;
}

/* ═══ 寒意 ═══ */

.markdown-body .chill {
  display: inline;
  color: #80b8d0;
  font-style: italic;
  text-shadow: 0 0 4px rgba(128,184,208,0.15);
}

/* ═══ 低语 ═══ */

.markdown-body .whisper {
  display: inline;
  color: #a08080;
  font-style: italic;
  font-size: 0.9em;
  letter-spacing: 2px;
  position: relative;
}

.markdown-body .whisper::before {
  content: '…';
  opacity: 0.3;
}

.markdown-body .whisper::after {
  content: '…';
  opacity: 0.3;
}

/* ═══ 幻觉 ═══ */

.markdown-body .halluc {
  display: inline;
  color: #908080;
  text-decoration: line-through;
  text-decoration-color: rgba(144,128,128,0.3);
  font-style: italic;
  opacity: 0.75;
}

/* ═══ 拟声词 ═══ */

.markdown-body .sfx {
  display: inline-block;
  font-weight: 900;
  font-size: 15px;
  color: #c04040;
  padding: 2px 10px;
  margin: 0 3px;
  position: relative;
  letter-spacing: 3px;
  font-style: italic;
}

.markdown-body .sfx::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 115%;
  height: 170%;
  background: radial-gradient(ellipse, rgba(200,40,40,0.06) 0%, transparent 60%);
  border-radius: 50%;
  z-index: -1;
}

.markdown-body .sfx::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 5%;
  width: 90%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(200,40,40,0.2), transparent);
}

/* ═══ 场景切割 ═══ */

.markdown-body .scene-cut {
  text-align: center;
  color: #504040;
  font-size: 13px;
  margin: 28px 0;
  position: relative;
  letter-spacing: 4px;
}

.markdown-body .scene-cut::before,
.markdown-body .scene-cut::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 25%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3a2a2a, transparent);
}

.markdown-body .scene-cut::before { left: 0; }
.markdown-body .scene-cut::after { right: 0; }

/* ═══ CoT ═══ */

.cot-inner {
  font-size: 14px;
  color: #908880;
  line-height: 1.75;
}

.cot-inner strong {
  color: #c04040;
  display: block;
  margin-top: 10px;
  padding: 3px 0;
  border-bottom: 1px dotted #3a2a2a;
}

/* ═══ 世界信息 ═══ */

.world-panel {
  font-size: 15px;
  line-height: 2;
  padding: 12px 16px;
  background: #121010;
  border-left: 3px solid #8b1a1a;
  color: #c0b8b0;
}

/* ═══════════════════════════════════════
   👻 遭遇判定面板
   ═══════════════════════════════════════ */

.judge-panel {
  background: #121010;
  border: 1px solid #2a2424;
  border-radius: 4px;
  margin: 16px 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.judge-head {
  background: linear-gradient(135deg, #1a1010, #2a1818);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 15px;
  color: #c04040;
  letter-spacing: 2px;
  border-bottom: 1px solid #3a2424;
}

.judge-act {
  padding: 10px 18px 4px;
  font-size: 14px;
  color: #a09890;
  border-bottom: 1px dashed #2a2222;
}

.judge-target {
  padding: 4px 18px 10px;
  font-size: 14px;
  color: #a09890;
  font-weight: 600;
}

.judge-factors {
  padding: 10px 18px;
  font-size: 13px;
  color: #807870;
  line-height: 2;
  background: #0e0c0c;
  border-top: 1px solid #2a2222;
  border-bottom: 1px solid #2a2222;
}

.judge-result {
  padding: 12px 18px 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.judge-inner {
  padding: 4px 18px 12px;
  font-size: 13px;
  color: #605050;
  font-style: italic;
  line-height: 1.6;
}

.judge-s { color: #c04040; }
.judge-a { color: #b080a0; }
.judge-b { color: #808080; }
.judge-c { color: #c09040; }
.judge-d { color: #ff4040; text-shadow: 0 0 6px rgba(255,64,64,0.2); }

/* ═══════════════════════════════════════
   🕯️ 异常仪表盘
   ═══════════════════════════════════════ */

.abn-dash {
  background: #0e0c0c;
  border: 1px solid #2a2424;
  border-radius: 4px;
  margin: 16px 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.ad-head {
  background: linear-gradient(135deg, #1a0808, #2a1010);
  padding: 10px 16px;
  font-weight: 900;
  font-size: 15px;
  color: #c04040;
  letter-spacing: 3px;
  text-align: center;
  border-bottom: 2px solid #6a1414;
  font-family: 'Noto Serif SC', serif;
}

.ad-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #1a1616;
}

.ad-block {
  padding: 10px 14px;
  background: #0e0c0c;
}

.ad-label {
  font-size: 11px;
  font-weight: 700;
  color: #c04040;
  letter-spacing: 2px;
  margin-bottom: 3px;
}

.ad-val {
  font-size: 15px;
  font-weight: 700;
  color: #e0d8d0;
  margin-bottom: 3px;
}

.ad-bar {
  width: 100%;
  height: 5px;
  background: #1a1616;
  border-radius: 3px;
  overflow: hidden;
  margin: 3px 0;
}

.ad-fill {
  height: 100%;
  border-radius: 3px;
}

.ad-fill-red { background: linear-gradient(90deg, #6a1414, #c04040); }
.ad-fill-blue { background: linear-gradient(90deg, #1a3a5a, #4090c0); }
.ad-fill-pink { background: linear-gradient(90deg, #6a2040, #c060a0); }
.ad-fill-purple { background: linear-gradient(90deg, #2a1a4a, #7050a0); }
.ad-fill-gold { background: linear-gradient(90deg, #4a3a10, #c09830); }
.ad-fill-green { background: linear-gradient(90deg, #1a4a2a, #40a060); }

.ad-sub {
  font-size: 11px;
  color: #706060;
  margin-top: 2px;
}

.ad-section {
  padding: 8px 14px;
  border-top: 1px solid #1a1616;
}

.ad-text {
  font-size: 13px;
  color: #908880;
  line-height: 1.7;
  margin-top: 3px;
}

/* ═══ 变量面板 ═══ */

.var-panel {
  font-size: 14px;
  line-height: 1.7;
  color: #c0b8b0;
}

.var-panel strong {
  color: #c04040;
}

/* ═══ 角色状态 ═══ */

.char-panel {
  font-size: 14px;
  line-height: 1.75;
  color: #c0b8b0;
}

.char-panel .cp-char {
  padding: 8px 0;
  border-bottom: 1px dashed #2a2424;
}

.char-panel .cp-char:last-child {
  border-bottom: none;
}

.char-panel .cp-name {
  font-weight: 700;
  color: #c04040;
  font-size: 15px;
}

.char-panel .cp-line {
  padding-left: 14px;
  color: #908880;
  font-size: 14px;
}

/* ═══ 瑶记忆 ═══ */

.memory-panel {
  font-size: 14px;
  line-height: 1.7;
  color: #c0b8b0;
}

.memory-config {
  background: #161212;
  padding: 10px 14px;
  border-radius: 3px;
  font-size: 13px;
  color: #706868;
  font-family: 'Consolas', 'Monaco', monospace;
  line-height: 1.9;
  border: 1px solid #2a2424;
}

/* ═══ 行动选项 ═══ */

.markdown-body .action-box {
  background: linear-gradient(135deg, #141010, #1a1414);
  border: 1px solid #2a2424;
  border-radius: 4px;
  padding: 16px 18px;
  margin: 14px 0;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  line-height: 2;
  font-size: 15px;
  color: #c0b8b0;
}

.markdown-body .action-box::before {
  content: '🕯️ 你打算……';
  display: block;
  font-weight: 700;
  color: #c04040;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #2a2222;
  font-size: 15px;
  letter-spacing: 2px;
}

/* ═══ 手机适配 ═══ */

@media (max-width: 600px) {
  .markdown-body .talk {
    padding: 10px 14px;
    font-size: 14px;
  }

  .markdown-body .sfx { font-size: 14px; }

  .markdown-body .action-box {
    padding: 12px 14px;
    font-size: 14px;
  }

  .markdown-body details > summary {
    font-size: 14px !important;
    padding: 10px 14px !important;
  }

  .markdown-body details > *:not(summary) {
    font-size: 14px !important;
    padding: 12px 14px !important;
  }

  .ad-row { grid-template-columns: 1fr; }
  .ad-block { padding: 8px 12px; }
  .ad-val { font-size: 14px; }
  .ad-head { font-size: 14px; padding: 8px 14px; }
  .ad-label { font-size: 10px; }
  .ad-sub { font-size: 10px; }
  .ad-text { font-size: 12px; }
  .ad-section { padding: 6px 12px; }

  .judge-panel { font-size: 13px; }
  .judge-head { font-size: 14px; padding: 8px 14px; }
  .judge-factors { font-size: 12px; padding: 8px 14px; }
  .judge-result { font-size: 14px; padding: 10px 14px 4px; }
  .judge-inner { font-size: 12px; padding: 4px 14px 10px; }
}
