/* =================================================================
   builtInCss · 中古战锤 · 旧世界群像 · 羊皮卷宗主题 · 通用无容器版
   -----------------------------------------------------------------
   适用：没有固定回答容器的平台；选择器直接作用于运行时输出标签
   用途：平台运行时输出区样式（创作手记 / 分隔线 / 正文 / 三面板 / 行动建议）
   配色：羊皮纸米黄 #f4ead2 / 深褐墨 #2e2012 / 朱砂 #b3402a
         靛蓝铅笔 #3a5a8c / 淡金 #c9a45c / 墨线 #5a3a20
   字体：Noto Serif SC（正文）+ JetBrains Mono（手记/面板值）
   约束：≤3种字体 / 无绝对定位 / 不依赖 description DOM / 引擎术语零泄漏
   ================================================================= */

/* ---------- 0. 字体引入 + 变量根 ---------- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Noto+Serif+SC:wght@400;500;700&display=swap');

:root {
  --bg: #f4ead2;
  --bg-2: #eadcc0;
  --surface: #faf3e2;
  --surface-2: #f6eed8;
  --text: #2e2012;
  --muted: #6b5636;
  --dim: #94805c;
  --accent: #b3402a;
  --accent-2: #c9a45c;
  --ink: #5a3a20;
  --blue: #4a5a6e;
  --line: rgba(90,58,32,.18);
  --line-hi: rgba(90,58,32,.42);
  --shadow: 0 18px 44px rgba(70,50,20,.2);
}

/* 运行时输出区整体氛围：羊皮纸延续，极克制 */
body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(179,64,42,.05), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

*, *::before, *::after {
  transition: border-color .22s, background-color .22s, box-shadow .22s, opacity .22s, transform .22s;
}

/* ---------- 1. 正文 .story —— 编年史叙事质感 ---------- */
.story {
  padding: 26px 24px;
  font-size: 16px;
  line-height: 1.92;
  color: var(--text);
  letter-spacing: .3px;
  border-left: 1px solid rgba(179,64,42,.14);
  margin-left: 8px;
  animation: fadeInStory .6s ease both;
}

@keyframes fadeInStory {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.story p {
  margin: 0 0 15px;
  text-indent: 2em;
}

.story p:last-child { margin-bottom: 0; }

/* 强调：朱砂 = 关键名词 / 力量感 */
.story strong {
  color: var(--accent);
  font-weight: 700;
}

/* 斜体：靛蓝铅笔 = 特殊语气 / 内心声 */
.story em {
  color: var(--blue);
  font-style: italic;
}

/* ---------- 2. 分隔线 —— 双线 + 中央菱形 ---------- */
hr.separator {
  border: 0;
  height: 14px;
  margin: 26px 0;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, transparent 5px, var(--line-hi) 5px, var(--line-hi) 6px, transparent 6px),
    linear-gradient(180deg, transparent 9px, var(--line) 9px, var(--line) 10px, transparent 10px);
}

hr.separator::before {
  content: "◆";
  margin: 0 auto;
  color: var(--accent);
  font-size: 9px;
  line-height: 1;
  background: var(--bg-2);
  padding: 0 10px;
}

/* ---------- 3. 创作手记 details.judge —— 米白纸卡 + 墨线框 ---------- */
details.judge {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 0 0 14px;
  box-shadow: 0 4px 14px rgba(70,50,20,.08);
  overflow: hidden;
}

details.judge > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 16px;
  font-family: "JetBrains Mono", "Noto Serif SC", monospace;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(201,164,92,.16), rgba(201,164,92,.06));
  border-bottom: 1px solid var(--line);
  user-select: none;
}

details.judge > summary::-webkit-details-marker { display: none; }
details.judge > summary::after,
details.panel > summary::after {
  content: "▾";
  float: right;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

details.judge[open] > summary::after { content: "▴"; }
details.panel[open] > summary::after { content: "▴"; }

.judge-body {
  padding: 12px 16px 14px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.judge-meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: .04em;
  padding: 2px 0;
  border-bottom: 1px dotted var(--line);
  margin-bottom: 6px;
}

.judge-line {
  padding: 2px 0;
  color: var(--muted);
}

.judge-line:first-of-type { margin-top: 4px; }

/* ---------- 4. 三面板 details.panel —— 羊皮纸卡 + 双线古卷边框 ---------- */
details.panel {
  background: var(--surface);
  border: 1px solid var(--ink);
  outline: 1px solid rgba(201,164,92,.5);
  outline-offset: 3px;
  border-radius: 4px;
  margin: 0 0 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

details.panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(180deg, rgba(201,164,92,.22), rgba(201,164,92,.08)), var(--surface);
  border-bottom: 1px solid var(--line-hi);
  letter-spacing: .08em;
  user-select: none;
}

details.panel > summary::-webkit-details-marker { display: none; }

details.panel > summary b {
  color: var(--accent);
  font-weight: 700;
}

details.panel p {
  margin: 0;
  padding: 4px 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

details.panel p:first-of-type { padding-top: 10px; }
details.panel p:last-of-type { padding-bottom: 12px; }

details.panel p b {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .05em;
}

/* 面板状态值：靛蓝铅笔 */
details.panel p b:contains() { }

/* ---------- 5. 行动建议 .suggestions —— 朱砂描边胶囊 ---------- */
.suggestions {
  margin: 18px 8px 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestions p {
  margin: 0;
  padding: 7px 16px;
  border: 1px solid rgba(179,64,42,.45);
  border-radius: 999px;
  font-size: 13px;
  color: var(--accent);
  background: rgba(250,243,226,.7);
  cursor: pointer;
  transition: .2s;
}

.suggestions p:hover {
  background: var(--accent);
  color: #faf3e2;
  border-color: var(--accent);
}

/* ---------- 6. 其余运行时元素 ---------- */
/* 通用引用块 */
blockquote {
  margin: 14px 8px;
  padding: 10px 16px;
  border-left: 3px solid var(--accent-2);
  background: rgba(201,164,92,.1);
  color: var(--muted);
  font-style: italic;
}

/* 代码片段（系统声） */
code, .judge-line code {
  font-family: "JetBrains Mono", monospace;
  font-size: .92em;
  color: var(--blue);
  background: rgba(58,90,140,.08);
  padding: 1px 5px;
  border-radius: 3px;
}

/* 链接 */
a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px dotted rgba(58,90,140,.5);
}

/* 暗色适配：平台强制深色模式时保底可读 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #e8dcc0;
    --bg-2: #ddcdaa;
    --surface: #f4ead2;
    --surface-2: #efe4c8;
  }
}
