/* =====================================================================
   builtInCss · 碧蓝档案·基沃托斯日常 · 学园日常风 · 通用无容器
   -----------------------------------------------------------------
   配套 Runtime：GM大世界卡-执行指令-runtime.md（v5.1-HD1.2 固定行序面板）
   模式：world/player/npc 面板每行 <p><b>标签：</b>值</p>，标签由模型写出
   配色：正文浅绿框 #E1EDF0（MomoTalk「回复」面板风）
         状态栏粉色系 #FCEEF0 / #FC879B / #FF8E9B
         墨蓝灰文字 #4C5B6F / 强调蓝 #2799E4
   结构基准：builtInCss_对齐版-通用无容器.css
   行序基准：builtInCss_固定行序面板-模型短标签参考.css
   ===================================================================== */

/* ---------- 0. 字体 + 变量根 ---------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;700&display=swap');

:root {
  --bg: #f4f7f9;
  --ink: #4c5b6f;
  --ink-l: #6b7d94;
  --green: #e1edf0;
  --green-line: #cfe0e6;
  --pink: #fceef0;
  --pink-line: #e8d4da;
  --pink-btn: #fc879b;
  --pink-d: #df6d80;
  --rose: #ff8e9b;
  --blue: #2799e4;
  --blue-d: #1f7fc2;
  --line: #ddd2d8;
  --line-soft: #dae1e5;
  --white: #ffffff;
  --shadow: 0 6px 18px rgba(60, 80, 110, .10);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after {
  transition: border-color .22s, background-color .22s, box-shadow .22s, opacity .22s, transform .22s;
}

/* ---------- 1. 正文 —— 浅绿「回复」面板风 ---------- */
.story {
  background: var(--green);
  background-image: radial-gradient(rgba(39,153,228,.07) 1.2px, transparent 1.2px);
  background-size: 16px 16px;
  background-position: right top;
  border: 1px solid var(--green-line);
  border-radius: 16px;
  padding: 22px 20px;
  font-family: "Noto Serif SC", serif;
  font-size: 16px;
  line-height: 1.95;
  color: #3f5468;
  letter-spacing: .3px;
  box-shadow: var(--shadow);
  animation: fadeInStory .5s ease both;
}

@keyframes fadeInStory {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.story p {
  margin: 0 0 14px;
  text-indent: 2em;
}

.story p:last-child { margin-bottom: 0; }

.story strong {
  color: var(--pink-d);
  font-weight: 700;
}

.story em {
  color: var(--blue-d);
  font-style: italic;
}

.story blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(255,255,255,.65);
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

.story q { color: var(--pink-d); font-style: italic; }

/* ---------- 2. 分隔线 —— 日常接续 ---------- */
hr, .separator {
  border: none;
  height: auto;
  margin: 28px 0;
  text-align: center;
  position: relative;
  overflow: visible;
}

hr::before, .separator::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76,91,111,.28) 50%, transparent);
  transform: translateY(-50%);
}

hr::after, .separator::after {
  content: "剧本终 · 故事始";
  position: relative;
  display: inline-block;
  padding: 0 16px;
  background: var(--bg);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--ink-l);
  animation: fadeInLine .7s ease .15s both;
}

@keyframes fadeInLine {
  from { opacity: 0; letter-spacing: .5em; }
  to { opacity: 1; letter-spacing: .3em; }
}

/* ---------- 3. 裁决块 —— 墨蓝灰便签 ---------- */
details { margin: 8px 0; animation: fadeInDetails .4s ease both; }

@keyframes fadeInDetails {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

details summary {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--ink);
  background: var(--pink);
  border: 1px solid var(--pink-line);
  border-bottom: 3px solid #e0b9c2;
  border-radius: 9px;
  cursor: pointer;
  padding: 9px 14px;
  position: relative;
  list-style: none;
  user-select: none;
}

details summary::-webkit-details-marker { display: none; }

details summary::before {
  content: "●";
  display: inline-block;
  margin-right: 8px;
  font-size: 8px;
  color: var(--rose);
  animation: pulseIndicator 2.4s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes pulseIndicator {
  0%, 100% { opacity: .4; }
  50% { opacity: 1; }
}

details summary:hover { background: #f2f7fa; }

details[open] { margin-bottom: 18px; }

.judge[open] > .judge-body {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink);
  padding: 12px 16px;
  background: #fdf6f7;
  border: 1px solid var(--pink-line);
  border-top: none;
  border-radius: 0 0 10px 10px;
}

.judge-body > .judge-line,
.judge-body > .judge-meta {
  margin: 6px 0;
  padding-left: 12px;
  border-left: 2px solid rgba(39,153,228,.22);
}

.judge-body > :first-child {
  border-left-color: var(--blue);
  color: var(--blue-d);
  font-weight: 600;
}

/* ---------- 4. 状态面板 —— 粉色系（固定行序 <p><b>标签：</b>值</p>） ---------- */
.panel {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--pink);
  background-image: radial-gradient(rgba(252,135,155,.10) 1.2px, transparent 1.2px);
  background-size: 16px 16px;
  background-position: right top;
  border: 1px solid var(--pink-line);
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink);
  box-shadow: var(--shadow);
  animation: slideUpPanel .45s ease both;
}

@keyframes slideUpPanel {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.panel summary {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 9px 14px;
  color: #fff;
  background: var(--pink-btn);
  border: 1px solid var(--pink-btn);
  border-bottom: 3px solid #a98888;
  border-radius: 9px;
  box-shadow: 0 2px 5px rgba(180,60,80,.14);
  transition: transform .12s, background .15s;
}
.panel summary:hover { background: var(--pink-d); }
.panel summary:active { transform: scale(.98); }

.panel summary::-webkit-details-marker { display: none; }

/* 固定行序：每行 <p><b>标签：</b>值</p> */
details.panel.world > p,
details.panel.player > p,
details.panel.npc > p {
  margin: 2px 0;
  padding: 2px 0;
  line-height: 1.55;
  color: var(--ink);
}

/* 标签配色：同粉色系，按面板微区分 */
details.panel.world > p b { color: var(--rose); }
details.panel.player > p b { color: var(--blue); }
details.panel.npc > p b { color: var(--pink-d); }

details.panel.world > p b,
details.panel.player > p b,
details.panel.npc > p b {
  margin-right: 4px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* NPC 状态栏头像 */
details.panel.npc > img.npc-avatar {
  display: block;
  margin: 2px auto 10px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pink-btn);
  background: var(--white);
  box-shadow: 0 3px 8px rgba(180,60,80,.18);
}

/* ---------- 5. 行动建议 —— 白色 3D 按钮 ---------- */
.suggestions {
  display: block;
  margin: 18px 0 8px;
  padding: 0;
  background: transparent;
  border: none;
  animation: slideUpPanel .45s ease .1s both;
  counter-reset: sug;
}

.suggestions::before {
  content: "可选行动";
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--ink-l);
  margin-bottom: 10px;
  padding-left: 4px;
}

.suggestions :is(p, button) {
  position: relative;
  padding: 12px 16px 12px 44px;
  margin: 8px 0;
  background: var(--pink);
  border: 1px solid var(--pink-line);
  border-bottom: 3px solid #dfbcc5;
  border-radius: 9px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(60,80,100,.08);
  counter-increment: sug;
}

.suggestions :is(p, button)::before {
  content: "[" counter(sug, decimal-leading-zero) "]";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-l);
  letter-spacing: .06em;
}

.suggestions :is(p, button):hover {
  background: #fbe4e9;
  border-color: var(--rose);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(252,135,155,.18);
}

.suggestions :is(p, button):active {
  transform: scale(.98);
  border-bottom-width: 1px;
}

.suggestions :is(p, button):hover::before {
  color: var(--blue-d);
}

/* ---------- 6. 通用元素 ---------- */
p { margin: 0 0 12px; }
ul, ol { padding-left: 20px; margin: 10px 0; }
li { margin: 5px 0; color: var(--ink); }

code, pre {
  font-size: 12px;
  background: #fdf6f7;
  border: 1px solid var(--pink-line);
  border-radius: 6px;
  color: var(--ink);
}
code { padding: 2px 6px; }
pre { padding: 12px 16px; overflow-x: auto; margin: 12px 0; }

a {
  color: var(--blue-d);
  text-decoration: none;
  border-bottom: 1px solid rgba(39,153,228,.3);
}
a:hover { color: var(--pink-d); border-bottom-color: var(--pink-d); }

/* ---------- 7. 响应式 ---------- */
@media (max-width: 480px) {
  .story { padding: 16px 14px; font-size: 15px; line-height: 1.85; }
  .story p { text-indent: 1.5em; }
  .panel { padding: 12px 14px; }
  .panel summary { font-size: 13px; letter-spacing: .08em; }
  .suggestions :is(p, button) {
    padding: 11px 12px 11px 40px;
    font-size: 13px;
  }
  details summary { font-size: 11px; letter-spacing: .1em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}