:root {
  --bg: #f1e8d4;
  --panel: #fbf6e9;
  --panel-2: #f5ecd9;
  --border: #dccba6;
  --border-strong: #c2ab7d;
  --accent: #9a3b2c;
  --accent-hi: #b04a35;
  --accent-soft: #f3e2da;
  --black: #2b2417;
  --gold: #a3803a;
  --text: #3b3121;
  --muted: #7d6d4f;
  --shadow: 0 1px 2px rgba(84, 62, 26, .1);
  --shadow-lg: 0 6px 22px rgba(84, 62, 26, .18);
  --serif: Georgia, "Songti SC", "SimSun", serif;
  --mono: "Consolas", "Courier New", monospace;
}

[data-theme="dark"] {
  --bg: #171310;
  --panel: #211c15;
  --panel-2: #2a241b;
  --border: #3d3526;
  --border-strong: #5a4d36;
  --accent: #c76a52;
  --accent-hi: #e0856c;
  --accent-soft: #3a241d;
  --black: #0f0d09;
  --gold: #c9a65e;
  --text: #e6dcc6;
  --muted: #a3936f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-lg: 0 6px 22px rgba(0, 0, 0, .6);
}

[data-theme="dark"] .nav-card .nav-title,
[data-theme="dark"] .toc .toc-title { background: #241e14; color: #b3a37f; }
[data-theme="dark"] .sidebar .mini-card { background: #1d1812; color: #9c8c6b; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Trebuchet MS", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  transition: background .3s, color .3s;
}

::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); }

/* ---------- 阅读进度条（品牌渐变合一，替代原静态顶条） ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hi) 55%, var(--gold) 100%);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px var(--accent-hi);
  z-index: 200;
  transition: width .18s ease-out;
  opacity: 0;
}
.progress-bar.on { opacity: 1; }
/* 原静态顶条退役：品牌渐变职能并入进度条，避免顶部双细条叠压 */
.scp-topline { display: none; }

/* ---------- SCP 顶部：红色细条 + 黑色导航 ---------- */
.scp-topline {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
}

.scp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
  border-bottom: 3px solid var(--accent);
  box-shadow: var(--shadow-lg);
}

.scp-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 62px;
}

.scp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 1px;
  white-space: nowrap;
}
.scp-logo small {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  color: #a39470;
  letter-spacing: 3px;
  font-weight: normal;
}
.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.scp-menu {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
}
.scp-menu a {
  color: #d8ccae;
  text-decoration: none;
  font-size: 13px;
  padding: 8px 12px;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: all .15s;
}
.scp-menu a:hover { color: #fff; background: #3a3222; }
.scp-menu a.active {
  color: var(--accent-hi);
  font-weight: 600;
}

.theme-btn {
  border: 1px solid #4a4030;
  background: #322a1c;
  color: #d8ccae;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  font-family: inherit;
  flex-shrink: 0;
}
.theme-btn:hover { border-color: var(--accent-hi); color: var(--accent-hi); }

/* ---------- 公告条 ---------- */
.notice-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  padding: 5px 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.notice-bar .clev { color: var(--accent); font-weight: bold; }

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  padding: 12px 28px 0;
  max-width: 1280px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 8px; color: var(--border-strong); }
.breadcrumbs .here { color: var(--accent); font-weight: 600; }

/* ---------- 搜索 ---------- */
.search-wrap { position: relative; max-width: 320px; flex-shrink: 0; }
.search-wrap input[type="search"] {
  width: 100%;
  padding: 7px 30px 7px 12px;
  border: 1px solid #4a4030;
  background: #322a1c;
  color: #f0e8d4;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.search-wrap input[type="search"]:focus { border-color: var(--accent-hi); }
.search-wrap .icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #a39470;
  font-size: 12px;
  pointer-events: none;
}

.search-result {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: none;
  overflow: hidden;
  z-index: 60;
}
.search-result.show { display: block; }
.search-result a {
  display: block;
  padding: 9px 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.search-result a:last-child { border-bottom: none; }
.search-result a:hover { background: var(--accent-soft); color: var(--accent); }
.search-result .empty { padding: 10px 14px; color: var(--muted); font-size: 12px; }

/* ---------- 布局 ---------- */
.layout {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 28px 40px;
  gap: 24px;
}

.sidebar { width: 220px; flex-shrink: 0; align-self: flex-start; position: sticky; top: 140px; }

.sidebar .nav-card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.nav-card .nav-title {
  padding: 9px 14px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 3px;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--accent);
  font-family: var(--mono);
}
.nav-card a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: all .15s;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .5px;
}
.nav-card a .dot {
  width: 6px;
  height: 6px;
  background: var(--border-strong);
  flex-shrink: 0;
  transition: background .15s;
}
.nav-card a:hover { background: var(--accent-soft); color: var(--accent); }
.nav-card a:hover .dot { background: var(--accent); }
.nav-card a.active {
  background: var(--accent-soft);
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.nav-card a.active .dot { background: var(--accent); }

.nav-card .nav-random {
  margin: 8px 10px;
  border: 1px dashed var(--border-strong);
  padding: 6px;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  justify-content: center;
  letter-spacing: 1px;
  font-family: var(--mono);
}
.nav-card .nav-random:hover { border-style: solid; border-color: var(--accent); color: var(--accent); }

.nav-card .sb-ico {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  line-height: 1;
  border-radius: 2px;
}
.nav-card .sb-ico .icon { width: 10px; height: 10px; stroke-width: 2.6; }
.nav-card .sb-ico.home { background: #2b2417; }
.nav-card .sb-ico.help { background: #3a6ea5; }
.nav-card .sb-ico.main { background: #3a7a3a; }
.nav-card .sb-ico.default { background: #7a7a7a; }
.nav-card .sb-ico.series { background: #7a2a2a; }
.nav-card .sb-ico.forum { background: #b8701a; }
.nav-card .sb-ico.shuffle { background: #5f3f8f; }
.nav-card .sb-ico.star { background: #a3803a; }
.nav-card .sb-ico.clock { background: #4c6a82; }
.nav-card .sb-ico.history { background: #4c6a82; }
.nav-card .sb-ico.steam { background: #1b2838; }
.nav-card .sb-staff { margin-top: 8px; border-top: 1px solid var(--border); }
.nav-card .sb-staff::after { content: " ADMIN"; color: var(--accent); }

.sidebar .mini-card {
  margin-top: 14px;
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.7;
  font-family: var(--mono);
}
.sidebar .mini-card b { color: var(--accent); display: block; margin-bottom: 4px; letter-spacing: 2px; font-size: 10px; }
.sidebar .mini-card .divider { border-top: 1px dashed var(--border); margin: 8px 0; }

/* ---------- 内容 ---------- */
.content { flex: 1; min-width: 0; }

article.card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px 32px 34px;
  animation: fadeUp .45s ease both;
}

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

/* 页面工具条（wikidot tabs） */
.page-options {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--panel-2);
  font-size: 12px;
}
.page-options .po-item {
  padding: 6px 14px;
  color: var(--muted);
  cursor: default;
  font-family: var(--mono);
  letter-spacing: 1px;
  border-right: 1px solid var(--border);
}
.page-options .po-item:hover { color: var(--accent); background: var(--accent-soft); }
.page-options .po-item.active {
  background: var(--black);
  color: #fff;
  font-weight: bold;
}

/* 分类条 */
.cat-line {
  font-size: 12px;
  color: var(--muted);
  margin: -6px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.cat-line a { color: var(--accent); text-decoration: none; }
.cat-line a:hover { text-decoration: underline; }
.cat-line .sep { margin: 0 6px; color: var(--border-strong); }

/* 文档头：评分 + 标题 */
.doc-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.rate-mod {
  flex-shrink: 0;
  width: 54px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  text-align: center;
  padding: 6px 0;
}
.rate-num {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: bold;
  color: var(--accent);
}
.rate-lbl {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 2px;
  font-family: var(--mono);
}
.rate-btns { display: block; margin-top: 4px; }
.rate-btn {
  width: 24px;
  height: 18px;
  margin: 1px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 9px;
  line-height: 16px;
  cursor: pointer;
  font-family: var(--mono);
}
.rate-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.rate-mod.rated .rate-btn { color: var(--accent); }

.doc-title h1 {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--text);
  letter-spacing: .5px;
  line-height: 1.3;
  margin: 0;
  padding: 0;
  border: none;
}
.doc-title .code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

article h1.doc {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: .5px;
}

.lead {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 22px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

article h2 {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
  margin: 32px 0 14px;
  scroll-margin-top: 120px;
  letter-spacing: .5px;
}
article h2::before {
  content: "▮";
  color: var(--accent);
  margin-right: 8px;
  font-size: 16px;
}

article h3 { font-size: 15px; color: var(--text); margin: 20px 0 10px; }

article p, article li { font-size: 14.5px; }
article ul, article ol { padding-left: 24px; margin: 10px 0; }
article li { margin-bottom: 6px; }
article li::marker { color: var(--accent); }

strong { color: var(--text); font-weight: 700; }

a { color: var(--accent); }

/* ---------- 目录 ---------- */
.toc {
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 0 0 12px;
  margin: 0 0 26px;
  font-size: 12px;
}
.toc .toc-title {
  padding: 8px 16px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 3px;
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--accent);
  font-family: var(--mono);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.toc .toc-title::after { content: "TOC"; opacity: .5; font-size: 9px; }
.toc ol { list-style: none; padding: 8px 16px 0; margin: 0; counter-reset: toc; }
.toc li { margin: 3px 0; }
.toc a {
  display: flex;
  gap: 8px;
  align-items: baseline;
  text-decoration: none;
  color: var(--text);
  padding: 3px 6px;
  transition: all .15s;
  border-left: 2px solid transparent;
  font-family: var(--mono);
  font-size: 12px;
}
.toc a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  font-size: 11px;
  flex-shrink: 0;
}
.toc a:hover { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); }
.toc a.on { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); }
.toc ol ol { padding: 2px 0 2px 20px; }
.toc ol ol a { font-size: 11px; }
.toc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 3px;
  color: var(--muted);
}
.toc-fold {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 22px;
  height: 22px;
  line-height: 1;
  cursor: pointer;
  font-size: 12px;
}
.toc-fold:hover { border-color: var(--accent); color: var(--accent); }
.toc.collapsed .toc-body { display: none; }

/* ---------- 引用块 ---------- */
blockquote {
  border-left: 4px solid var(--accent);
  background: var(--panel-2);
  padding: 12px 16px 12px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--muted);
  position: relative;
}
blockquote cite {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--accent);
  font-family: var(--mono);
  letter-spacing: 1px;
}

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); margin: 14px 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td {
  padding: 9px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
th {
  background: #eadfc4;
  color: #4a3d26;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  font-family: var(--mono);
}
tbody tr:nth-child(even) { background: var(--panel-2); }
tbody tr:hover { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: none; }
tbody td:first-child { font-weight: 600; color: var(--text); }
[data-theme="dark"] th { background: #2e271c; color: #e0d5bc; }

/* ---------- 提示框 ---------- */
.callout {
  padding: 12px 16px;
  margin: 20px 0;
  font-size: 13px;
  border: 1px solid;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.callout .ic {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  font-family: var(--mono);
}
.callout a { font-weight: 600; }

.callout.info { background: var(--panel-2); border-color: var(--border-strong); }
.callout.info .ic { background: var(--accent); }
.callout.note { background: #fdf6e3; border-color: #e0c37a; }
[data-theme="dark"] .callout.note { background: #2a2415; border-color: #6a5520; }
.callout.note .ic { background: #b8860b; }
.callout.warn { background: #fbeaea; border-color: #dfa1a1; }
[data-theme="dark"] .callout.warn { background: #331b1b; border-color: #5c2f2f; }
.callout.warn .ic { background: #c0392b; }

/* ---------- 徽章 ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.chip {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: .5px;
}
.chip.gold { background: #f5ead0; border-color: #b8860b; color: #7a5d1e; }
[data-theme="dark"] .chip.gold { background: #33291a; color: var(--gold); }
.chip.red { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- 首页公告（SCP 通告条） ---------- */
.scp-notice {
  background: var(--black);
  color: #f0e8d4;
  border-left: 6px solid var(--accent);
  padding: 26px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.scp-notice .n-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-hi);
  letter-spacing: 3px;
}
.scp-notice h1 {
  font-family: var(--serif);
  font-size: 32px;
  color: #f5ead0;
  margin: 8px 0 10px;
  letter-spacing: 1px;
}
.scp-notice .sub { font-size: 14px; color: #cbbc98; max-width: 640px; }
.scp-notice .meta-line { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.scp-notice .tag {
  background: rgba(255, 255, 255, .07);
  border: 1px solid #4a4030;
  color: #e0d5bc;
  padding: 2px 10px;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 1px;
}
.scp-notice .tag.red { border-color: var(--accent); color: var(--accent-hi); }

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}
.stat {
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 16px 14px;
  text-align: center;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
}
.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.stat:hover::before { transform: scaleX(1); }
.stat .num {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: bold;
  color: var(--text);
  line-height: 1.2;
}
.stat .num small { font-size: 14px; }
.stat .lbl { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: 1px; font-family: var(--mono); }

/* ---------- 入口卡片 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  background: var(--panel-2);
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: border-color .2s, background .2s;
}
.cat-card:hover { border-top-color: var(--accent-hi); background: var(--accent-soft); }
.cat-card .cc-code { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--accent); }
.cat-card b { font-family: var(--serif); font-size: 15px; }
.cat-card .cc-desc { color: var(--muted); line-height: 1.6; min-height: 2.6em; }
.cat-card .cc-num { font-family: var(--mono); font-size: 11px; color: var(--gold); }
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.entry-card {
  display: block;
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
  position: relative;
}
.entry-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--border-strong);
  transition: background .2s;
}
.entry-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.entry-card:hover::before { background: var(--accent); }
.entry-card .e-code {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.entry-card h3 { font-size: 14px; color: var(--text); margin-bottom: 6px; padding-left: 8px; }
.entry-card p { font-size: 12.5px; color: var(--muted); line-height: 1.6; padding-left: 8px; }
.entry-card .go {
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--accent);
  font-weight: bold;
  font-size: 13px;
  transition: transform .2s;
}
.entry-card:hover .go { transform: translateX(4px); }

/* ---------- 时间线 ---------- */
.timeline { margin: 20px 0; position: relative; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-strong);
}
.timeline .tl-item { position: relative; padding: 0 0 22px 6px; }
.timeline .tl-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 7px;
  width: 11px;
  height: 11px;
  background: var(--accent);
  border: 2px solid var(--panel);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline .tl-date {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  background: var(--accent);
  padding: 1px 10px;
  margin-bottom: 6px;
  letter-spacing: 1px;
  font-family: var(--mono);
}
.timeline .tl-body {
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 13.5px;
  transition: border-color .2s;
}
.timeline .tl-item:hover .tl-body { border-color: var(--accent); }

/* ---------- 人物卡 ---------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.person {
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 14px 16px;
  transition: all .2s;
}
.person:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.person .p-code { font-family: var(--mono); font-size: 10px; color: var(--accent); letter-spacing: 2px; }
.person .p-name { font-size: 14px; font-weight: 700; color: var(--text); margin: 4px 0 2px; }
.person .p-role { font-size: 11px; color: var(--muted); margin-bottom: 8px; font-family: var(--mono); letter-spacing: 1px; }
.person p { font-size: 12.5px; color: var(--muted); }

/* ---------- 上下篇导航 ---------- */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.article-nav a {
  display: block;
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 12px 16px;
  background: var(--panel-2);
  transition: all .2s;
}
.article-nav a:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.article-nav .dir { font-size: 10px; color: var(--accent); letter-spacing: 2px; margin-bottom: 4px; font-family: var(--mono); }
.article-nav .t { font-size: 13px; color: var(--text); font-weight: 600; }
.article-nav .next { text-align: right; }
.article-nav a.disabled { opacity: .4; pointer-events: none; border-style: dashed; }

/* ---------- 滚动渐入 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 页面底部元信息（wikidot footer） ---------- */
.page-meta {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  font-family: var(--mono);
}
.page-meta .pm-row { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.page-meta .pm-tags { margin-top: 6px; }
.page-meta .chip { font-size: 10px; padding: 1px 8px; }

/* ---------- 讨论区（wikidot comments） ---------- */
.discuss {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.d-head {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.d-count { color: var(--accent); }
.c-sort { float: right; display: inline-flex; gap: 4px; }
.c-sort-btn {
  padding: 1px 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
  cursor: pointer;
}
.c-sort-btn.on { border-color: var(--accent); color: var(--accent); }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.comment-form textarea {
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form button {
  align-self: flex-end;
  padding: 6px 18px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}
.comment-form button:hover { background: var(--black); border-color: var(--black); }
.c-guest {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  font-size: 13px;
  color: var(--muted);
}
.c-guest a { color: var(--accent); font-weight: bold; }
.comment-list { display: flex; flex-direction: column; gap: 10px; }
.load-more-cmts {
  align-self: center;
  padding: 4px 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}
.load-more-cmts:hover { border-color: var(--accent); color: var(--accent); }
.c-empty { font-size: 13px; color: var(--muted); padding: 8px 0; }
.comment-item { border: 1px solid var(--border); background: var(--panel-2); padding: 10px 14px; }
.comment-item .c-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 6px;
}
.comment-item .c-head b { color: var(--accent); font-family: var(--mono); }
.comment-item .c-head .c-floor { color: var(--muted); font-family: var(--mono); font-size: 10px; border: 1px solid var(--border); padding: 0 4px; }
.comment-item .c-head span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.comment-item .c-head .del-comment {
  margin-left: auto;
  padding: 1px 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.comment-item .c-head .del-comment:hover { border-color: var(--accent); color: var(--accent); }
.comment-item .c-head .c-actions { margin-left: auto; display: flex; gap: 6px; }
.comment-item .c-head .c-actions .del-comment { margin-left: 0; }
.comment-item .c-head .c-actions button {
  padding: 1px 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.comment-item .c-head .c-actions button:hover { border-color: var(--accent); color: var(--accent); }
.comment-item p { font-size: 13px; line-height: 1.8; word-break: break-word; }
.c-avatar {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--border); background: var(--panel); display: inline-flex;
  align-items: center; justify-content: center; margin-right: 10px; vertical-align: middle;
}
.c-avatar img { width: 100%; height: 100%; object-fit: cover; }
.c-avatar.ph {
  font-family: var(--mono); font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-hi));
}
.c-avatar-link { text-decoration: none; margin-right: 10px; display: inline-block; }
.c-avatar-link:hover .c-avatar { border-color: var(--accent); }
.comment-item { display: flex; }
.comment-item > .c-main { flex: 1; min-width: 0; }
.comment-replies {
  margin-top: 8px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-replies .comment-item { background: var(--panel); }
.reply-box { display: none; margin-top: 8px; }
.reply-box.open { display: block; }
.reply-form { display: flex; flex-direction: column; gap: 6px; }
.reply-form textarea {
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}
.reply-form textarea:focus { outline: none; border-color: var(--accent); }
.reply-form button {
  align-self: flex-end;
  padding: 4px 14px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

/* ---------- 账户中心（个人中心） ---------- */
.me-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  margin-bottom: 18px;
}
.me-head h2 { margin: 0 0 8px; font-size: 20px; }
.me-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.me-actions { display: flex; gap: 8px; align-items: center; }
.me-actions a { text-decoration: none; }
.me-unread {
  padding: 10px 14px;
  border: 1px dashed var(--accent);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 18px;
}
.me-unread b { color: var(--accent); }
.me-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.me-list .rank-item small { display: block; color: var(--muted); }
.me-list .rank-item.unread { border-left: 2px solid var(--accent); }
.doc-title.sub { margin-top: 6px; }
.sr-dyn {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 10px;
  font-family: var(--mono);
}
#searchResult a small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.po-settings { cursor: pointer; }

/* ---------- 管理面板统计 / 状态标记 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 12px 0; }
.stat-card {
  border: 1px solid var(--border);
  background: var(--panel-2);
  padding: 12px;
  text-align: center;
}
.stat-card b { display: block; font-size: 22px; font-family: var(--mono); color: var(--accent); }
.stat-card span { font-size: 12px; color: var(--muted); }
.stat-card.small b { font-size: 15px; }
.hot-head { padding: 8px 12px 2px; font-size: 10px; letter-spacing: 2px; color: var(--muted); font-family: var(--mono); }
.hot-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--mono);
}
.hot-item:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- 版本对比（diff） ---------- */
.hist-tip { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.hist-diff { margin: 10px 0; }
.diff-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-family: var(--mono); }
.diff-stat.add { color: #2e7d32; }
.diff-stat.del { color: #c62828; }
.diff-body {
  border: 1px solid var(--border);
  background: var(--panel);
  max-height: 340px;
  overflow: auto;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
}
.diff-l { padding: 1px 8px; white-space: pre-wrap; word-break: break-all; }
.diff-eq { color: var(--muted); }
.diff-add { background: rgba(46, 125, 50, 0.18); }
.diff-del { background: rgba(198, 40, 40, 0.18); }

/* ---------- 标签云 ---------- */
.tag-cloud-inner { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 12px; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.2s, color 0.2s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.big { font-size: 17px; }
.tag-chip.mid { font-size: 14px; }
.tag-chip.small { font-size: 12px; }
.tag-chip .tag-n { color: var(--muted); font-size: 11px; font-family: var(--mono); }
.pm-tags a.tag-chip { padding: 1px 8px; font-size: 11px; border: 1px dashed var(--border); }

/* ---------- 写作系统（编辑器 / 弹窗） ---------- */
.editor { border: 1px solid var(--accent); background: var(--panel-2); padding: 12px; margin-bottom: 8px; }
.ed-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ed-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}
.ed-btn:hover { border-color: var(--accent); color: var(--accent); }
.ed-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ed-btn.primary:hover { background: var(--black); border-color: var(--black); color: #fff; }
.ed-btn.danger:hover { border-color: var(--accent); color: var(--accent); }
.ed-hint { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.editor textarea {
  width: 100%;
  min-height: 320px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--black);
  color: #e8e0c8;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  white-space: pre;
}
.editor textarea:focus { outline: none; border-color: var(--accent); }
.ed-preview {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--border);
  background: var(--panel);
}
.ed-preview h2 { border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.ed-status { margin-top: 8px; font-size: 12px; font-family: var(--mono); color: var(--accent); }
.ed-status.err { color: #b3302a; }
.ed-status.ok { color: #2e8b57; }
.preview-standalone { background: #f5f1e6; }
.preview-standalone .preview-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  background: #fff;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  color: #1c1a17;
  line-height: 1.8;
  font-size: 15px;
}
body.ed-fullscreen .editor {
  position: fixed;
  inset: 0;
  z-index: 999;
  border: none;
  margin: 0;
  background: var(--black);
  display: flex;
  flex-direction: column;
}
body.ed-fullscreen .editor textarea { flex: 1; min-height: 0; border: none; font-size: 15px; }
body.ed-fullscreen .ed-preview { flex: 1; min-height: 0; }
.adm-pending { margin-bottom: 22px; }
.adm-pending h3 { font-family: var(--serif); font-size: 17px; margin-bottom: 8px; }
.adm-pending .table-wrap { border-color: var(--gold); }
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(20, 16, 8, .62);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  width: min(680px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--accent);
  background: var(--panel);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--black);
  color: #f5ead0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 2px;
}
.modal-x {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}
.modal-x:hover { color: var(--accent); }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.modal-body label { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.modal-body input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.modal-body input:focus { outline: none; border-color: var(--accent); }
.modal-body textarea {
  min-height: 200px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}
.modal-body .ed-btn { align-self: flex-end; margin-top: 4px; padding: 8px 22px; }
.hist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  font-size: 12px;
}
.hist-item .h-id { font-family: var(--mono); color: var(--accent); font-weight: bold; }
.hist-item .h-user { font-family: var(--mono); }
.hist-item .h-time { color: var(--muted); font-family: var(--mono); }
.hist-item .ed-btn { margin-left: auto; }

/* ---------- 分类系统 ---------- */
.nav-card .cat-sep { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.cat-count { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.cat-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: border-color .2s;
}
.cat-item:hover { border-color: var(--accent); }
.cat-item b { font-weight: 600; }
.cat-item-tag {
  flex-shrink: 0;
  padding: 1px 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
}
.cat-item .go { margin-left: auto; color: var(--accent); }
.cat-grid { margin-top: 4px; }

/* ---------- 角色体系与管理面板 ---------- */
.role-badge {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  vertical-align: 1px;
}
.role-badge.member { color: var(--muted); border-color: var(--border); }
.role-badge.moderator { color: #b87a1e; border-color: #b87a1e; }
.role-badge.admin { color: var(--accent); border-color: var(--accent); font-weight: bold; }
.auth-roles { margin-top: 18px; }
.role-table { display: flex; flex-direction: column; margin-top: 4px; }
.role-row {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: var(--panel-2);
}
.role-row .r-name { flex-shrink: 0; min-width: 110px; display: flex; align-items: center; gap: 8px; }
.role-row .r-en { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.role-row .r-desc { font-size: 13px; line-height: 1.7; color: var(--text); }
.admin-notice .n-code { color: var(--accent); }
.adm-dim { color: var(--muted); font-size: 12px; }
.adm-role {
  padding: 3px 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}
.adm-content { max-width: 320px; word-break: break-all; font-size: 12px; }
.admin-body .table-wrap table th { background: var(--black); color: #f5ead0; }
.admin-body .table-wrap table td { font-size: 13px; }

/* ---------- 站长设置（管理面板） ---------- */
.adm-owner {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 14px;
  margin-bottom: 16px;
}
.adm-owner-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.adm-owner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 13px;
}
.adm-owner-row b { min-width: 96px; }
.adm-input {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 8px;
  width: 210px;
}
.adm-hint { color: var(--muted); font-size: 12px; }
.adm-rank-list { display: flex; flex-direction: column; gap: 6px; }
.adm-rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px dashed var(--border);
  background: var(--panel-2);
}
.adm-dim { color: var(--muted); font-size: 12px; }

/* ---------- 排行 / 动态列表 ---------- */
.rank-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: border-color .2s;
}
.rank-item:hover { border-color: var(--accent); }
.rank-item b { font-weight: 600; }
.rank-score { margin-left: auto; font-family: var(--mono); color: var(--accent); font-weight: bold; }
.rank-meta { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-time { flex-shrink: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ---------- 侧边栏折叠按钮 ---------- */
.sidebar-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  padding: 3px 10px;
}

/* ---------- RP 服务器主页（军装绿主题） ---------- */
body.rp-page {
  background-color: #f0f0e6;
  background-image: radial-gradient(#d4d0c7 1px, transparent 1px);
  background-size: 20px 20px;
}
body.rp-page a { color: #4b5320; }
body.rp-page a:hover { color: #8b0000; }
.rp-server-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  border: 1px solid #d1d1c6;
  background: #fff;
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.rp-server-bar .st-label { color: #888; }
.rp-server-bar .st-online { color: #4cd137; font-weight: bold; }
.rp-server-bar .st-offline { color: var(--accent); font-weight: bold; }
.rp-ip {
  margin-left: auto;
  padding: 5px 14px;
  border: 1px dashed #666;
  background: #333;
  color: #fff;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
}
.rp-ip:hover { background: #444; }
.rp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 18px 0;
}
.rp-card {
  position: relative;
  background: #fff;
  border: 1px solid #ccc;
  padding: 18px 18px 14px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .1);
  transition: transform .2s, box-shadow .2s;
}
.rp-card:hover { transform: translateY(-3px); box-shadow: 5px 5px 0 rgba(0, 0, 0, .15); }
.rp-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  padding: 2px 8px;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  font-family: var(--mono);
  letter-spacing: 1px;
}
.rp-badge.german { background: #555; }
.rp-badge.soviet { background: #8b0000; }
.rp-badge.civilian { background: #c5a059; }
.rp-card h3 { margin: 4px 0 8px; font-family: var(--serif); }
.rp-card.german h3 { color: #555; }
.rp-card.soviet h3 { color: #8b0000; }
.rp-card.civilian h3 { color: #c5a059; }
.rp-card p { font-size: 13px; line-height: 1.7; color: #333; }
.rp-alert {
  padding: 13px 16px;
  margin: 16px 0;
  border-left: 4px solid;
  background: #f9f9f9;
  font-size: 13px;
  line-height: 1.7;
}
.rp-alert.warning { border-color: #8b0000; background: #fff0f0; }
.rp-alert.info { border-color: #4b5320; background: #f0fff0; }
.rp-news {
  padding: 10px 0;
  border-bottom: 1px dashed #ccc;
  font-size: 14px;
  line-height: 1.8;
}
.rp-news .n-date { font-family: var(--mono); color: var(--accent); font-weight: bold; }

/* ---------- 组织档案页（六套独立主题） ---------- */
/* 党卫军 SS：黑银冷酷 */
body.org-ss {
  --bg: #15151b; --panel: #1e1e26; --panel-2: #272730;
  --border: #3a3a48; --border-strong: #555566;
  --accent: #c0c0d0; --accent-hi: #dcdce8; --accent-soft: #2b2b37;
  --black: #0c0c10; --gold: #9a9aaa; --text: #ddddE6; --muted: #9494a3;
}
/* 国防军 Wehrmacht：军灰绿 */
body.org-wh {
  --bg: #e7e4d8; --panel: #f4f1e6; --panel-2: #eae7da;
  --border: #c9c4ae; --border-strong: #a8a28a;
  --accent: #4b5320; --accent-hi: #5c6530; --accent-soft: #e1e3cf;
  --black: #2f3224; --gold: #8a7a3a; --text: #33362a; --muted: #707360;
}
/* 苏军与抵抗 Soviet：革命红 */
body.org-sov {
  --bg: #efe6e0; --panel: #faf3ee; --panel-2: #f3e7e0;
  --border: #d8bfb2; --border-strong: #bf9c8d;
  --accent: #8b1a1a; --accent-hi: #a52a1f; --accent-soft: #f4ddda;
  --black: #2c1a17; --gold: #a35f2a; --text: #3a2c26; --muted: #8a6a5f;
}
/* 占领区政府 Gov：官僚黄褐 */
body.org-gov {
  --bg: #f0ead8; --panel: #faf6ea; --panel-2: #f2ecd9;
  --border: #d6c9a0; --border-strong: #bfae7d;
  --accent: #7a5c2e; --accent-hi: #8f6f3c; --accent-soft: #ece2c8;
  --black: #33291a; --gold: #9a7b3e; --text: #403722; --muted: #837558;
}
/* 纳粹党部 Partei：深红法西斯 */
body.org-partei {
  --bg: #241011; --panel: #2e1516; --panel-2: #3a1d1e;
  --border: #5c2f30; --border-strong: #7a4040;
  --accent: #c8322e; --accent-hi: #e04a3f; --accent-soft: #451d1c;
  --black: #150707; --gold: #b08a3a; --text: #ead8d4; --muted: #a08a86;
}
/* 德私人俱乐部 Club：暗金黑市 */
body.org-club {
  --bg: #151410; --panel: #1f1d17; --panel-2: #28251c;
  --border: #453f2c; --border-strong: #5c5438;
  --accent: #c9a44b; --accent-hi: #e0bd5c; --accent-soft: #3a3320;
  --black: #0e0d08; --gold: #c9a44b; --text: #e2d9c0; --muted: #96896a;
}
body.org-ss .scp-header,
body.org-partei .scp-header,
body.org-club .scp-header { background: #000; }
body.org-ss .scp-header .scp-logo,
body.org-partei .scp-header .scp-logo,
body.org-club .scp-logo { color: #eee; }
body.org-ss .scp-header .scp-logo .logo-mark,
body.org-partei .scp-header .scp-logo .logo-mark,
body.org-club .scp-header .scp-logo .logo-mark { background: var(--accent); color: #111; }
body.org-ss .site-footer,
body.org-partei .site-footer,
body.org-club .site-footer { background: #000; }

/* 组织徽章与横幅 */
.org-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.org-emblem {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: bold;
  font-size: 26px;
  letter-spacing: 1px;
  color: #fff;
  border: 3px solid var(--gold);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  background: var(--black);
}
body.org-wh .org-emblem, body.org-sov .org-emblem, body.org-gov .org-emblem { border-radius: 8px; }
.org-head .org-name { font-family: var(--serif); font-size: 26px; line-height: 1.3; }
.org-head .org-code { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--muted); }
.org-motto {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 14px;
  margin: 6px 0 16px;
}
.org-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.org-meta .tag { border-color: var(--border-strong); background: var(--panel-2); }
.org-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.org-info {
  border: 1px solid var(--border);
  background: var(--panel-2);
  padding: 10px 12px;
  font-size: 13px;
}
.org-info b { display: block; font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 1px; margin-bottom: 4px; }
.org-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.org-card {
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  background: var(--panel);
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
}
.org-card h4 { font-family: var(--serif); font-size: 15px; margin-bottom: 6px; }
.org-ranks { margin: 14px 0; }
.org-ranks .org-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.org-rank .r-bar {
  width: 6px;
  height: 22px;
  background: var(--accent);
  opacity: .55;
  border-radius: 2px;
}
.org-join {
  border: 1px dashed var(--border-strong);
  background: var(--panel-2);
  padding: 14px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.8;
}
.org-join b { color: var(--accent); }
.org-owner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  background: var(--panel-2);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.org-owner .oo-text b { color: var(--accent); }
.org-roster { margin: 16px 0; }
.roster-body { display: flex; flex-direction: column; gap: 8px; }
.roster-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--panel-2);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
}
.roster-item:hover { border-left-color: var(--accent-hi); background: var(--accent-soft); }
.roster-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 1px 7px;
  border-radius: 2px;
}
.roster-meta { margin-left: auto; font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* ---------- 认证页 ---------- */
.auth-wrap { justify-content: center; }
.auth-card { max-width: 460px; margin: 24px auto; }
.auth-tabs { display: flex; border: 1px solid var(--border); border-bottom: none; }
.auth-tabs button {
  flex: 1;
  padding: 10px;
  background: var(--panel-2);
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 2px;
}
.auth-tabs button:last-child { border-right: none; }
.auth-tabs button.active { background: var(--black); color: #f5ead0; font-weight: bold; }
.auth-form { padding: 22px 26px 26px; }
.auth-form label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 6px;
  font-family: var(--mono);
  letter-spacing: 1px;
}
.auth-form input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-btn {
  width: 100%;
  margin-top: 20px;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--mono);
  letter-spacing: 3px;
}
.auth-btn:hover { background: var(--accent-hi); }
.auth-steam { margin: 0 26px; }
.steam-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0 2px; }
.steam-sep::before, .steam-sep::after { content: ""; flex: 1; border-top: 1px dashed var(--border); }
.steam-btn { display: block; text-align: center; text-decoration: none; background: #1b2838; letter-spacing: 1px; }
.steam-btn:hover { background: #2a475e; }
.auth-hint { font-size: 11px; color: var(--muted); margin: 6px 0 0; line-height: 1.6; }
.auth-msg { margin: 12px 26px 0; font-size: 13px; min-height: 20px; color: var(--muted); }
.me-rename { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; padding: 10px 14px; border: 1px dashed var(--border); }
.me-rename input {
  flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 13px; font-family: var(--mono);
}
.me-rename input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.me-rename-msg { font-size: 12px; color: var(--muted); white-space: nowrap; }
.auth-msg.err { color: #b03a2e; }
.auth-note { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 0 22px; }

/* ---------- 社群链接 ---------- */
.community {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0 8px;
}
.cm-card {
  display: block;
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
  position: relative;
}
.cm-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  transition: background .2s;
}
.cm-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.cm-name { font-size: 14px; font-weight: 700; color: var(--text); display: block; margin-bottom: 4px; }
.cm-desc { font-size: 12px; color: var(--muted); display: block; line-height: 1.6; margin-bottom: 8px; }
.cm-go {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1px;
}

/* ---------- 页脚 ---------- */
.site-footer { background: var(--black); color: #a8996f; border-top: 3px solid var(--accent); }
.wikiwalk {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 8px 20px;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 2px;
}
.foot-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 26px;
  font-size: 12px;
  padding: 26px 28px 18px;
}
.foot-grid h4 {
  font-size: 10px;
  color: var(--accent-hi);
  letter-spacing: 3px;
  margin-bottom: 10px;
  font-family: var(--mono);
}
.foot-grid p { line-height: 1.8; }
.foot-grid a {
  display: block;
  color: #a8996f;
  text-decoration: none;
  padding: 2px 0;
  font-size: 12px;
}
.foot-grid a:hover { color: var(--accent-hi); }
.foot-grid .f-logo { font-family: var(--serif); font-size: 18px; color: #f5ead0; font-weight: bold; margin-bottom: 6px; letter-spacing: 1px; }
.foot-bottom {
  border-top: 1px solid #3a3120;
  text-align: center;
  padding: 14px 0;
  font-size: 11px;
  color: #8a7a58;
  font-family: var(--mono);
  letter-spacing: 1px;
}
.cc-line {
  text-align: center;
  padding: 12px 20px;
  font-size: 11px;
  color: #9c8c68;
  background: #14100b;
  font-family: var(--mono);
  letter-spacing: 1px;
}
.cc-line b { color: var(--accent-hi); }

/* ---------- 回到顶部 ---------- */
#backTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 40px;
  height: 40px;
  border: 2px solid var(--accent);
  background: var(--black);
  color: var(--accent-hi);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 80;
}
#backTop.show { opacity: 1; pointer-events: auto; }
#backTop:hover { background: var(--accent); color: #fff; transform: translateY(-3px); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .layout { flex-direction: column; padding: 12px 14px 30px; }
  .sidebar { position: static; width: 100%; }
  .sidebar .nav-card { display: flex; flex-wrap: wrap; }
  .sidebar .nav-card .nav-title { width: 100%; }
  .nav-card a { border-left: none; border-bottom: 1px solid var(--border); }
  .scp-nav { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
  .scp-menu { order: 3; flex-basis: 100%; }
  .search-wrap { max-width: 100%; order: 4; flex-basis: 100%; }
  article.card { padding: 20px 18px; }
  .foot-grid { grid-template-columns: 1fr; gap: 16px; }
  .article-nav { grid-template-columns: 1fr; }
  .sidebar-toggle { display: inline-block; }
  .sidebar { display: none; }
  .sidebar.open { display: block; }
}

/* ---------- 组织专属主题 ---------- */
[data-org="ss"] { --accent: #8d949e; --accent-hi: #aab2bc; --accent-soft: #e3e6ea; --gold: #a9aeb8; }
[data-org="wehrmacht"] { --accent: #5f7450; --accent-hi: #7a9168; --accent-soft: #e4e9de; --gold: #8a7a4a; }
[data-org="soviet"] { --accent: #a93226; --accent-hi: #c4543f; --accent-soft: #f5e0da; --gold: #b08a3a; }
[data-org="gov"] { --accent: #4c6a82; --accent-hi: #67879f; --accent-soft: #dde6ec; --gold: #8a7f6a; }
[data-org="partei"] { --accent: #8f1d1d; --accent-hi: #b03131; --accent-soft: #f3dfdc; --gold: #b08a3a; }
[data-org="club"] { --accent: #5f3f8f; --accent-hi: #7a56b3; --accent-soft: #e8e0f5; --gold: #b39344; }

[data-theme="dark"][data-org="ss"] { --accent-soft: #262b31; }
[data-theme="dark"][data-org="wehrmacht"] { --accent-soft: #252b1e; }
[data-theme="dark"][data-org="soviet"] { --accent-soft: #3a201c; }
[data-theme="dark"][data-org="gov"] { --accent-soft: #1e2731; }
[data-theme="dark"][data-org="partei"] { --accent-soft: #38201c; }
[data-theme="dark"][data-org="club"] { --accent-soft: #2a2138; }

/* 组织横幅 */
.org-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 6px solid var(--accent);
  box-shadow: var(--shadow);
}
.org-badge {
  flex: 0 0 auto;
  min-width: 58px;
  text-align: center;
  padding: 8px 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 1px;
  border-radius: 3px;
}
.org-b-title { display: flex; flex-direction: column; line-height: 1.5; }
.org-b-title b { font-family: var(--serif); font-size: 17px; color: var(--accent); }
.org-b-title span { font-size: 12px; color: var(--muted); }

/* 组织专属元素微调 */
[data-org="ss"] .scp-topline { background: linear-gradient(90deg, #5a5f66, #aab2bc); }
[data-org="wehrmacht"] .scp-topline { background: linear-gradient(90deg, #3f4f33, #7a9168); }
[data-org="soviet"] .scp-topline { background: linear-gradient(90deg, #7c1f16, #c4543f); }
[data-org="gov"] .scp-topline { background: linear-gradient(90deg, #33475a, #67879f); }
[data-org="partei"] .scp-topline { background: linear-gradient(90deg, #6b1414, #b03131); }
[data-org="club"] .scp-topline { background: linear-gradient(90deg, #3d2858, #7a56b3); }

[data-org] .scp-header { border-bottom-color: var(--accent); }
[data-org] .logo-mark { background: var(--accent); }
[data-org="ss"] .notice-bar { background: #2c3138; }
[data-org="wehrmacht"] .notice-bar { background: #3c4a31; }
[data-org="soviet"] .notice-bar { background: #5c241d; }
[data-org="gov"] .notice-bar { background: #33475a; }
[data-org="partei"] .notice-bar { background: #5c1a1a; }
[data-org="club"] .notice-bar { background: #3d2858; }
[data-org] .notice-bar span { color: #fff; }

/* ---------- 条目专属主题 ---------- */
[data-page-theme="story"] .editable-body {
  background: #1d1a16;
  color: #e8dcc8;
  border: 1px solid #4a3f2e;
  padding: 22px 24px;
  border-radius: 4px;
}
[data-page-theme="story"] .editable-body h2 {
  color: #d9b36a;
  border-bottom-color: #6a5a3a;
}
[data-page-theme="story"] .editable-body a { color: #d9b36a; }
[data-theme="dark"][data-page-theme="story"] .editable-body { background: #12100d; border-color: #38301f; }

[data-page-theme="char"] .editable-body {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--panel-2);
  border: 2px double var(--border-strong);
  padding: 22px 24px;
}
[data-page-theme="char"] .editable-body table { border-color: var(--border-strong); }
[data-page-theme="char"] .editable-body th { background: var(--accent-soft); }

[data-page-theme="dark"] .editable-body {
  background: #17130f;
  color: #e6dcc6;
  border: 1px solid #3a3325;
  padding: 22px 24px;
}
[data-page-theme="dark"] .editable-body h2 { color: var(--gold); }
[data-theme="dark"][data-page-theme="dark"] .editable-body { background: #0f0d0a; }

/* ---------- 收藏 / 相关 / 高亮 / 点赞 / 提及 ---------- */
.fav-btn {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: flex-start;
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--muted);
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--mono);
  letter-spacing: 1px;
  transition: all .15s;
}
.fav-btn:hover { border-color: var(--gold); color: var(--gold); }
.fav-btn.on { border-color: var(--gold); color: var(--gold); background: var(--accent-soft); }

.related { margin: 26px 0 0; }
.related .cat-item { margin-bottom: 4px; }

mark {
  background: #ffd75e;
  color: #3a2c00;
  padding: 0 2px;
  border-radius: 2px;
}
[data-theme="dark"] mark { background: #8a6a1a; color: #fff; }

.at {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
  padding: 0 3px;
  border-radius: 2px;
  white-space: nowrap;
}

.like-comment {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 1px 5px;
}
.like-comment:hover { color: var(--gold); }
.like-comment.on { color: var(--gold); }

/* ---------- 移动端顶栏汉堡 ---------- */
.nav-burger {
  display: none;
  border: 1px solid #4a4030;
  background: #322a1c;
  color: #d8ccae;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .nav-burger { display: inline-block; order: 5; }
  .scp-menu { display: none; order: 6; flex-basis: 100%; flex-direction: column; }
  .scp-menu.open { display: flex; }
}

/* ---------- 打印样式 ---------- */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .scp-header, .scp-topline, .notice-bar, .sidebar, .site-footer,
  .search-wrap, #backTop, .page-options, .rate-mod, .progress-bar,
  .discuss .comment-form, .reply-box, .c-actions, .breadcrumbs,
  .article-nav, .theme-btn, .ed-toolbar, .d-head .d-count {
    display: none !important;
  }
  .layout { max-width: none !important; padding: 0 !important; }
  .content { width: 100% !important; max-width: none !important; }
  .card, article.card {
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    padding: 0 !important;
  }
  .discuss, .comment-item, .comment-replies { break-inside: avoid; }
  a { color: #000 !important; text-decoration: underline; }
h1, h2, h3 { break-after: avoid; }
  img { max-width: 100% !important; }
}

/* ---------- 正文插图 ---------- */
.article-img { margin: 18px 0; text-align: center; }
.article-img img { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.article-img figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); letter-spacing: .3px; }
.img-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 18px 0; }
.img-row .article-img { margin: 0; }

/* ---------- 相关条目卡片（四联） ---------- */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 18px; }
.rel-card { display: flex; flex-direction: column; gap: 6px; background: var(--panel-2); border: 1px solid var(--border); padding: 10px; text-decoration: none; color: var(--text); transition: all .2s; }
.rel-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.rel-thumb { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.rel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rel-thumb.ph { background: var(--accent-soft); color: var(--accent); font-weight: bold; font-size: 20px; font-family: var(--mono); }
.rel-card b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-card .go { color: var(--accent); font-size: 12px; }

/* ---------- 排行周/月切换 ---------- */
.top-tabs { display: flex; gap: 8px; margin: 4px 0 14px; }
.top-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 灯箱 ---------- */
.csl-lightbox { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.88); align-items: center; justify-content: center; flex-direction: column; padding: 20px; }
.csl-lightbox .lb-stage { display: flex; flex-direction: column; align-items: center; max-width: 92vw; max-height: 84vh; }
.csl-lightbox .lb-stage img { max-width: 92vw; max-height: 78vh; object-fit: contain; border-radius: 4px; box-shadow: 0 8px 40px rgba(0,0,0,.6); }
.lb-caption { margin-top: 10px; color: #bbb; font-size: 13px; max-width: 80vw; text-align: center; }
.lb-close, .lb-prev, .lb-next { position: fixed; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; font-size: 20px; line-height: 1; padding: 8px 14px; cursor: pointer; z-index: 10000; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- 私信 ---------- */
.msg-item.unread { border-left: 2px solid var(--accent); }
.msg-item b + .rank-meta { max-width: 55%; }
.msg-form { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-top: 12px; }
.msg-form textarea { width: 100%; box-sizing: border-box; min-height: 60px; padding: 8px 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 13px; border-radius: 4px; resize: vertical; }
.msg-form textarea:focus { border-color: var(--accent); outline: none; }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(20px); background: var(--black); color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 10001; box-shadow: 0 4px 20px rgba(0,0,0,.35); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 个人主页行 ---------- */
.entry-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: border-color .2s; }
.entry-row:hover { border-color: var(--accent); }
.entry-row b { font-size: 14px; font-weight: 600; }
.row-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); flex-shrink: 0; }

/* ---------- 顶栏登录态 ---------- */
.h-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.h-uname { color: var(--text); text-decoration: none; font-size: 13px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel-2); transition: border-color .2s; }
.h-uname:hover { border-color: var(--accent); color: var(--accent); }
.h-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
'@

/* ============================================================
 * v1.2 UI 组件：toast 通知 / 确认对话框 / 按钮加载态（ui.js）
 * ============================================================ */
#ui-toast-wrap {
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(340px, calc(100vw - 36px));
}
.ui-toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--muted);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  opacity: 0;
  transform: translateX(14px);
  transition: opacity .2s, transform .2s;
  pointer-events: auto;
}
.ui-toast.show { opacity: 1; transform: none; }
.ui-toast-ico {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  line-height: 17px;
  text-align: center;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: bold;
  margin-top: 2px;
}
.ui-toast.error   { border-left-color: #a63a2e; }
.ui-toast.error   .ui-toast-ico { background: #a63a2e; }
.ui-toast.success { border-left-color: #4a7d3a; }
.ui-toast.success .ui-toast-ico { background: #4a7d3a; }
.ui-toast.warn    { border-left-color: var(--gold); }
.ui-toast.warn    .ui-toast-ico { background: var(--gold); }
.ui-toast.info    { border-left-color: #4c6a82; }
.ui-toast.info    .ui-toast-ico { background: #4c6a82; }
.ui-toast-msg { word-break: break-word; }

/* 确认对话框 */
.ui-modal {
  position: fixed;
  inset: 0;
  z-index: 410;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 19, 12, .48);
  opacity: 0;
  transition: opacity .18s;
}
.ui-modal.show { opacity: 1; }
.ui-dialog {
  min-width: 300px;
  max-width: 440px;
  margin: 20px;
  padding: 22px 24px 18px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-top: 4px solid var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  transition: transform .18s;
}
.ui-modal.show .ui-dialog { transform: none; }
.ui-dialog-msg { white-space: pre-line; line-height: 1.75; font-size: 14px; color: var(--text); }
.ui-dialog-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.ui-btn {
  padding: 7px 18px;
  font-size: 13px;
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.ui-btn:hover { border-color: var(--accent); color: var(--accent); }
.ui-btn.danger { background: var(--accent); border-color: var(--accent); color: #fff; }
.ui-btn.danger:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: #fff; }

/* 按钮加载态 */
button.ui-busy, .ui-busy[type="submit"] { opacity: .68; cursor: wait; pointer-events: none; }

/* 搜索结果键盘导航高亮 */
#searchResult a.active { background: var(--accent-soft); color: var(--accent); }

/* ============================================================
 * v1.2 排版优化：中文长文可读性
 * ============================================================ */

/* 键盘焦点可见性（全局） */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 运动敏感用户：关闭动画与平滑滚动 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* 正文：字号 14.5→16px，行距放宽，字距微调 */
article p, article li { font-size: 16px; line-height: 1.95; letter-spacing: .2px; }
article li { margin-bottom: .5em; }
article p + p, .editable-body p + p { margin-top: .85em; }
.editable-body p { text-align: justify; }

/* 标题节奏：更充分的呼吸感 */
article h2 { font-size: 21px; margin: 38px 0 16px; }
article h3 { font-size: 16px; margin: 26px 0 12px; font-weight: 700; }

/* 引用块与正文协调 */
blockquote { font-size: 14.5px; line-height: 1.9; }
blockquote p { line-height: 1.9; }

/* 代码块（原先无样式） */
article pre, .editable-body pre {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 13px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  margin: 18px 0;
}
article code, .editable-body code {
  font-family: var(--mono);
  font-size: .92em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 2px;
  word-break: break-all;
}
article pre code, .editable-body pre code { background: none; border: none; padding: 0; word-break: normal; }
[data-theme="dark"] article code, [data-theme="dark"] .editable-body code { background: #1d1812; }

/* 表格行距微调 */
th, td { line-height: 1.7; }

/* 移动端 toast 移到底部 */
@media (max-width: 900px) {
  #ui-toast-wrap { top: auto; bottom: 18px; left: 14px; right: 14px; max-width: none; }
  article p, article li { font-size: 15.5px; }
}

/* 模态框仅在显示后拦截交互（防止后台标签页 rAF 节流时透明层卡住挡页面） */
.ui-modal { pointer-events: none; }
.ui-modal.show { pointer-events: auto; }

/* 顶栏通知条内的登录态入口（userStatus 复用 hUser 逻辑） */
.notice-bar #userStatus { display: flex; align-items: center; gap: 8px; }
.notice-bar .h-uname { font-size: 11px; letter-spacing: 1px; padding: 2px 10px; }
.notice-bar .h-avatar { width: 18px; height: 18px; }
.notice-bar .ed-btn { font-size: 10px; padding: 2px 8px; }

/* ---------- 认证页 v1.2.6：精简注册 + 可选资料折叠 ---------- */
.auth-card { border-top: 4px solid var(--accent); }
.auth-lite {
  margin-top: 16px;
  padding: 9px 12px;
  background: var(--panel-2);
  border-left: 3px solid var(--gold);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.75;
}
.auth-lite a { color: var(--accent); font-weight: 600; }
.auth-lite .ic {
  display: inline-block;
  width: 15px; height: 15px;
  line-height: 15px;
  margin-right: 6px;
  text-align: center;
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-family: var(--mono);
  font-style: normal;
}
.auth-optional { margin-top: 14px; border: 1px dashed var(--border-strong); }
.auth-optional summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 12px;
  font-family: var(--mono);
  letter-spacing: 1px;
  user-select: none;
}
.auth-optional summary:hover { color: var(--accent); }
.auth-optional[open] summary { border-bottom: 1px dashed var(--border); }
.auth-optional-body { padding: 0 12px 8px; }
.auth-optional-body label:first-of-type { margin-top: 10px; }
.auth-roles .doc-head { margin-bottom: 10px; }

/* ---------- v1.2.7 内联 SVG 图标系统（icons.js sprite） ---------- */
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.135em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.scp-menu a .icon { width: 13px; height: 13px; margin-right: 5px; opacity: .75; }
.page-options .po-item .icon { width: 12px; height: 12px; margin-right: 5px; vertical-align: -0.15em; }
.site-footer h4 .icon { width: 12px; height: 12px; margin-right: 4px; vertical-align: -0.1em; }
#backTop .icon { width: 16px; height: 16px; }
.community .cm-name .icon { width: 14px; height: 14px; margin-right: 6px; vertical-align: -0.15em; }
.steam-btn .icon { width: 15px; height: 15px; margin-right: 6px; vertical-align: -0.2em; }

/* 品牌图标（官方 logo，填充式渲染）与品牌色方块 */
.nav-card .sb-ico.qq { background: #12b7f5; }
.nav-card .sb-ico.kook { background: #5b5bef; }
.site-footer a .icon.brand { margin-right: 5px; vertical-align: -0.15em; }

/* ---------- v1.2.9 编辑器格式工具条 ---------- */
.ed-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-top: none;
  background: var(--panel-2);
}
.ed-tool {
  min-width: 30px;
  height: 26px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all .12s;
}
.ed-tool:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ed-tool .icon { width: 13px; height: 13px; }

/* ---------- RP 页：开发组更新日志 ---------- */
.rp-devlog { margin-top: 26px; }
.rp-devlog-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
.rp-devlog-head h2 { margin: 0; font-size: 19px; }
.rp-devlog-head .rp-devlog-more { font-size: 12px; color: var(--muted); }
.rp-devlog-head .rp-devlog-more a { color: var(--accent); }
.rp-devlog-body { font-size: 14.5px; line-height: 1.9; }
.rp-devlog-body h2 { font-size: 17px; margin: 22px 0 10px; }
.rp-devlog-empty { color: var(--muted); font-size: 13px; padding: 14px 0; }

/* ---------- v1.3.0 站长两步验证 / 徽章 ---------- */
.ui-input {
  width: 100%;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-family: var(--mono);
  letter-spacing: 1px;
  outline: none;
}
.ui-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.me-totp { border: 1px dashed var(--border-strong); padding: 14px 16px; margin-bottom: 8px; }
.me-totp p { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 0 0 8px; }
.totp-secret {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--accent);
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 8px 12px;
  margin: 8px 0;
  user-select: all;
}
.totp-otpauth {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  word-break: break-all;
  user-select: all;
  margin-bottom: 8px;
}
