@import url('https://fonts.googleapis.com/css2?family=VT323&family=Space+Mono:wght@400;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');

/* ══════════════════════════════════════════════════════════════
   像素终端主题（默认版） — 复古黑白 / CRT 扫描线 / 点阵
   独立完整样式，与 style.css（经典版）互斥加载
   ══════════════════════════════════════════════════════════════ */

/* === 基础重置与变量 === */
:root {
  --bg: #050505;
  --bg-elevated: #0b0b0b;
  --bg-hover: #161616;
  --border: #ffffff;
  --border-light: #2e2e2e;
  --border-dash: #3d3d3d;
  --text: #d6d6d6;
  --text-dim: #7d7d7d;
  --text-muted: #7d7d7d;
  --text-head: #ffffff;
  --accent: #ffffff;
  --accent-hover: #ffffff;
  --link: #ffffff;
  --link-hover: #ffffff;
  --wiki-link: #ffffff;
  --warn: #bfbfbf;
  --surface: #0a0a0a;
  --radius: 0;
  --sidebar-width: 270px;
  --header-height: 50px;
  --font-body: 'Space Mono', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', monospace;
  --font-disp: 'VT323', 'Space Mono', 'Noto Sans SC', monospace;
  --font-mono: 'Space Mono', 'Noto Sans SC', monospace;
  --dots: radial-gradient(rgba(255,255,255,0.055) 1px, transparent 1.4px);
}

* { box-sizing: border-box; border-radius: 0 !important; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

/* ── CRT 扫描线（覆盖全站，含灯箱；不拦截点击） ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.028) 0px,
    rgba(255,255,255,0.028) 1px,
    transparent 1px,
    transparent 3px
  );
}
/* ── 缓移扫描带 ── */
body::before {
  content: '';
  position: fixed;
  left: 0; right: 0; top: 0;
  height: 140px;
  z-index: 9998;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.035), transparent);
  animation: px-scanband 9s linear infinite;
}
@keyframes px-scanband {
  0%   { transform: translateY(-30vh); }
  100% { transform: translateY(130vh); }
}
/* ── 光标闪烁 ── */
@keyframes px-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
/* ── 页面载入：CRT 点亮 ── */
@keyframes px-poweron {
  0%   { opacity: 0; filter: brightness(2.4); transform: translateY(4px); }
  60%  { opacity: 1; filter: brightness(1.15); }
  100% { opacity: 1; filter: brightness(1); transform: none; }
}
/* ── 滚动浮现 ── */
.rv { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.rv.in { opacity: 1; transform: none; }

/* === 图片：黑白化，悬停显色 === */
article img, .newspaper img, .char-gallery img {
  filter: grayscale(1) contrast(1.06);
  transition: filter .25s ease, opacity .15s ease;
}
article img:hover, .newspaper img:hover, .char-gallery img:hover {
  filter: none;
}

/* === 顶部状态栏 === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: #000;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 16px;
  z-index: 100;
  gap: 14px;
}
/* 状态栏内沿虚线（图纸框线感） */
.site-header::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; bottom: 3px;
  border-bottom: 1px dashed var(--border-dash);
  pointer-events: none;
}
.menu-toggle {
  display: none;
  background: #000; border: 1px solid var(--border); color: var(--text-head);
  font-size: 15px; cursor: pointer; padding: 2px 9px;
  font-family: var(--font-mono);
}
.menu-toggle:hover { background: var(--text-head); color: #000; }
.site-icon { display: none; } /* 像素版隐藏 emoji */
.site-title {
  display: inline-block;
  font-size: 17px; font-weight: 700;
  color: var(--text-head); text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  line-height: 1.25;
  padding: 1px 4px;
}
.site-title::before {
  content: '▓▓';
  font-size: 11px;
  letter-spacing: 2px;
  margin-right: 9px;
  vertical-align: 1px;
}
.site-name::after {
  content: '█';
  margin-left: 7px;
  font-size: 13px;
  animation: px-blink 1.06s steps(1) infinite;
}
.site-title:hover { background: var(--text-head); color: #000; }
.site-title:hover .site-name::after { animation: none; opacity: 0; }
.site-title small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: -2px;
  line-height: 1.1;
  font-family: var(--font-disp);
}
.site-title:hover small { color: #000; }

.header-search {
  flex: 1; display: flex; justify-content: flex-end; position: relative;
  max-width: 300px; margin-left: auto;
}
#searchInput {
  width: 100%;
  background: #000;
  border: 1px solid var(--border-dash);
  padding: 6px 12px;
  color: var(--text-head);
  font-size: 13px;
  font-family: var(--font-mono);
  outline: none;
}
#searchInput::placeholder { color: var(--text-dim); }
#searchInput:focus {
  border-color: var(--border);
  box-shadow: 0 0 0 1px var(--border);
}
.search-results {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  width: min(430px, 92vw);
  max-height: 60vh;
  overflow-y: auto;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: 6px 6px 0 rgba(255,255,255,0.14);
  z-index: 200;
  display: none;
}
.search-results:has(*) { display: block; }
.search-item {
  display: block; padding: 10px 14px;
  text-decoration: none; color: var(--text);
  border-bottom: 1px dashed var(--border-light);
  font-family: var(--font-mono);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--text-head); color: #000; }
.search-item-title { font-weight: 700; color: var(--text-head); font-size: 14px; }
.search-item:hover .search-item-title { color: #000; }
.search-item-snippet { font-size: 12px; color: var(--text-dim); margin-top: 3px; line-height: 1.5; }
.search-item:hover .search-item-snippet { color: #222; }
.no-result { padding: 14px; color: var(--text-dim); font-size: 13px; text-align: center; font-family: var(--font-mono); }

/* 主题切换按钮 */
.theme-switch {
  flex-shrink: 0;
  background: #000;
  border: 1px solid var(--border);
  color: var(--text-head);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  padding: 6px 12px;
  cursor: pointer;
}
.theme-switch::before { content: '[ '; color: var(--text-dim); }
.theme-switch::after  { content: ' ]'; color: var(--text-dim); }
.theme-switch:hover { background: var(--text-head); color: #000; }
.theme-switch:hover::before, .theme-switch:hover::after { color: #555; }

/* === 布局 === */
.layout {
  display: flex;
  padding-top: var(--header-height);
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background-color: #070707;
  background-image: var(--dots);
  background-size: 8px 8px;
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--header-height); bottom: 0; left: 0;
  overflow-y: auto;
  padding: 18px 0 40px;
}
.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 30px 30px 90px;
  background-color: var(--bg);
  background-image: var(--dots);
  background-size: 26px 26px;
  min-width: 0;
  position: relative;
}

/* 角色词条：article 靠左 + 半透明（让水印从后方透出） */
.content:has(.char-watermark) article {
  margin-left: 0;
  margin-right: auto;
  background: rgba(5, 5, 5, 0.82);
}

article {
  max-width: 1060px;
  margin: 0 auto;
  background: #070707;
  padding: 38px 46px;
  border: 1px solid var(--border);
  outline: 1px dashed var(--border-dash);
  outline-offset: 5px;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  animation: px-poweron .5s ease both;
}
/* 四角定位十字（图纸感） */
article::before {
  content: '+';
  position: absolute;
  top: 6px; left: 10px;
  color: var(--border-dash);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
}

/* === 像素版专属固定装饰 === */
.px-edge {
  position: fixed;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-disp);
  font-size: 15px;
  letter-spacing: 5px;
  color: #4a4a4a;
  text-transform: uppercase;
  z-index: 50;
  pointer-events: none;
  user-select: none;
}
.px-coord {
  position: fixed;
  left: calc(var(--sidebar-width) + 14px); bottom: 10px;
  font-family: var(--font-disp);
  font-size: 14px;
  letter-spacing: 2px;
  color: #4a4a4a;
  z-index: 50;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 1200px) {
  .px-edge, .px-coord { display: none; }
}

/* === 侧边栏导航（终端目录树） === */
.nav-tree { padding: 0 12px; }

.nav-group {
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.nav-group-title {
  display: flex; align-items: center;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 7px 12px;
  cursor: pointer; user-select: none;
  font-family: var(--font-mono);
  background: #000;
  border: 1px solid var(--border-dash);
  color: var(--text-dim);
}
/* 经典版的斜边标签伪元素在像素版中禁用 */
.nav-group-title::before, .nav-group-title::after { content: none; }
.nav-group-title:hover { color: var(--text-head); border-color: var(--border); }
.nav-group-title .arrow {
  display: inline-block; margin-right: 8px;
  font-size: 10px; transition: transform 0.15s;
  font-family: var(--font-mono);
}
.nav-group.collapsed .arrow { transform: rotate(-90deg); }
.nav-group.collapsed .nav-list { display: none; }

/* 当前分组：反相 */
.nav-group.current .nav-group-title {
  background: var(--text-head);
  color: #000;
  border-color: var(--text-head);
}

.nav-list {
  list-style: none;
  margin: -1px 0 0;
  padding: 8px 6px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border-light);
  position: relative;
  z-index: 1;
}
.nav-list > li {
  margin: 0;
  border-bottom: none;
}
.nav-list a {
  display: block; padding: 3px 8px;
  color: var(--text); text-decoration: none;
  font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-mono);
}
.nav-list a::before {
  content: '· ';
  color: var(--text-dim);
}
.nav-list a:hover {
  background: var(--text-head); color: #000; text-decoration: none;
}
.nav-list a:hover::before { color: #000; content: '> '; }
.nav-list a.active {
  background: var(--text-head); color: #000; font-weight: 700;
}
.nav-list a.active::before { content: '> '; color: #000; }

/* === 二级子分组 === */
.nav-subgroup { list-style: none; margin: 2px 0; border-bottom: none !important; }
.nav-subgroup-title {
  display: flex; align-items: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-dim);
  padding: 4px 8px 3px 6px;
  cursor: pointer; user-select: none;
  letter-spacing: 1.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  border-left: 1px dashed var(--border-dash);
  margin-left: 4px;
}
.nav-subgroup-title:hover { color: var(--text-head); border-left-color: var(--border); }
.nav-subgroup-title .subarrow {
  display: inline-block; margin-right: 6px;
  font-size: 8px; font-family: var(--font-mono);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.nav-subgroup.open .subarrow { transform: rotate(90deg); }
.nav-subgroup:not(.open) .nav-sublist { display: none; }
.nav-sublist {
  list-style: none; margin: 2px 0 4px;
  padding: 0 0 0 12px;
  border-left: 1px dashed var(--border-dash);
  margin-left: 7px;
}
.nav-sublist li { margin: 0; border-bottom: none !important; }
.nav-sublist a {
  display: block; padding: 2px 8px;
  color: var(--text); text-decoration: none;
  font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-mono);
}
.nav-sublist a:hover { background: var(--text-head); color: #000; }
.nav-sublist a.active { background: var(--text-head); color: #000; font-weight: 700; }

/* === 面包屑 === */
.breadcrumbs {
  font-size: 12px; color: var(--text-dim);
  margin-bottom: 22px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}
.breadcrumbs::before { content: '~/ '; color: var(--border-dash); }
.breadcrumbs a { color: var(--text-dim); text-decoration: none; }
.breadcrumbs a:hover { color: #000; background: var(--text-head); text-decoration: none; }
.breadcrumbs span { margin: 0 4px; color: var(--border-dash); }

/* ══════════════════════════════════════════════
   报纸首页（像素版：终端速报）
   ══════════════════════════════════════════════ */
.newspaper {
  max-width: 1060px;
  margin: 0 auto;
  padding: 30px 38px;
  background: #070707;
  border: 1px solid var(--border);
  outline: 1px dashed var(--border-dash);
  outline-offset: 5px;
  animation: px-poweron .5s ease both;
}

/* ── 报头 ── */
.masthead {
  text-align: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-bottom: 24px;
  position: relative;
}
.masthead::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  border-bottom: 1px dashed var(--border-dash);
}
.masthead h1 {
  font-family: var(--font-disp);
  font-size: 54px;
  font-weight: 400;
  letter-spacing: 4px;
  margin: 0;
  color: #000;
  background: var(--text-head);
  padding: 4px 22px 0;
  display: inline-block;
  text-transform: uppercase;
  line-height: 1.05;
  box-shadow: 6px 6px 0 rgba(255,255,255,0.18);
}
.masthead-sub {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 8px;
  margin: 14px 0 0;
  font-weight: 400;
  font-family: var(--font-mono);
}
.masthead-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px dashed var(--border-dash);
  border-bottom: 1px dashed var(--border-dash);
  padding: 6px 4px;
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-mono);
}

/* ── 头条区 ── */
.np-headline {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.np-hl-main {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.np-hl-img-wrap {
  flex-shrink: 0;
  display: flex;
}
.np-hl-img {
  width: 170px;
  height: 240px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--border);
  display: block;
  cursor: zoom-in;
}
.np-hl-img:hover { opacity: .9; }
.np-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-head);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}
.np-kicker::before { content: '■ '; }
.np-hl-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.np-hl-text h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
  font-family: var(--font-mono);
  color: var(--text-head);
}
.np-hl-text h2 a { color: var(--text-head); text-decoration: none; }
.np-hl-text h2 a:hover { background: var(--text-head); color: #000; }
.np-hl-text p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-dim);
  margin: 0 0 12px;
  flex: 1;
}
.np-hl-text .read-more {
  display: inline-block;
  font-size: 12px;
  color: var(--text-head);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}
.np-hl-text .read-more:hover { background: var(--text-head); color: #000; }

/* ── 分割线 ── */
.np-section-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.np-section-rule::before,
.np-section-rule::after {
  content: '';
  flex: 1;
  height: 0;
  border-top: 1px dashed var(--border-dash);
}

/* ── 故事卡片网格 ── */
.np-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
  background: #000;
}
.np-story {
  background: #070707;
  padding: 13px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  border-right: 1px solid var(--border-light);
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  transition: background .15s;
}
.np-story:hover { background: #0d0d0d; }
.np-story:last-child { border-right: none; }
.np-story:nth-child(-n+3) { border-bottom: 1px solid var(--border-light); }
.newspaper[data-tmpl="1"] .np-story:nth-child(-n+3) { border-bottom: none; }
.newspaper[data-tmpl="1"] .np-story:nth-child(-n+2) { border-bottom: 1px solid var(--border-light); }

.np-card-img-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 74px;
  overflow: hidden;
  border: 1px solid var(--border-dash);
}
.np-card-img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  object-position: top center;
  display: block;
  cursor: zoom-in;
}
.np-card-img:hover { opacity: .92; }

.np-story-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.np-story h3 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 5px;
  line-height: 1.3;
  color: var(--text-head);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-story h3 a { color: inherit; text-decoration: none; }
.np-story h3 a:hover { background: var(--text-head); color: #000; }
.np-story p {
  font-size: 11px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}
.np-story .read-more {
  font-size: 11px;
  color: var(--text-head);
  text-decoration: none;
  font-weight: 700;
  margin-top: auto;
  font-family: var(--font-mono);
}
.np-story .read-more:hover { background: var(--text-head); color: #000; }

/* ── 报纸底栏 ── */
.newspaper-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 13px;
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.np-brief-inline { flex: 1; }
.np-footer-reload { flex-shrink: 0; white-space: nowrap; }
.newspaper-footer a { color: var(--text-head); text-decoration: none; }
.newspaper-footer a:hover { background: var(--text-head); color: #000; }

/* ── 三种每日模板变体（像素版反相配平） ── */
/* 模板1：空心报头 */
.newspaper[data-tmpl="1"] .masthead h1 {
  background: transparent;
  color: var(--text-head);
  border-top: 3px solid var(--text-head);
  border-bottom: 3px solid var(--text-head);
  padding: 6px 0 2px;
  letter-spacing: 8px;
  box-shadow: none;
}
.newspaper[data-tmpl="1"] .masthead { border-bottom: 1px solid var(--border); }
.newspaper[data-tmpl="1"] .np-grid { grid-template-columns: repeat(2, 1fr); }
.newspaper[data-tmpl="1"] .np-card-img-wrap { width: 70px; height: 92px; }
.newspaper[data-tmpl="1"] .np-card-img { width: 70px; height: 92px; }
.newspaper[data-tmpl="1"] .np-story h3 { font-size: 14px; }
.newspaper[data-tmpl="1"] .np-story p { font-size: 12px; line-height: 1.7; -webkit-line-clamp: 6; }

/* 模板2：速报 */
.newspaper[data-tmpl="2"] .masthead h1 {
  background: var(--text-head);
  color: #000;
  font-size: 40px;
  letter-spacing: 10px;
  padding: 6px 26px 2px;
  outline: 2px solid var(--text-head);
  outline-offset: 4px;
  box-shadow: none;
}
.newspaper[data-tmpl="2"] .masthead { border-bottom: 3px solid var(--border); }
.newspaper[data-tmpl="2"] .np-grid { grid-template-columns: repeat(3, 1fr); border: 2px solid var(--border); }
.newspaper[data-tmpl="2"] .np-story { padding: 10px; gap: 8px; }
.newspaper[data-tmpl="2"] .np-card-img-wrap { width: 50px; height: 66px; }
.newspaper[data-tmpl="2"] .np-card-img { width: 50px; height: 66px; }
.newspaper[data-tmpl="2"] .np-story h3 { font-size: 12px; }
.newspaper[data-tmpl="2"] .np-story p { font-size: 10px; line-height: 1.6; -webkit-line-clamp: 4; }
.newspaper[data-tmpl="2"] .np-hl-text h2 { font-size: 20px; }
.newspaper[data-tmpl="2"] .np-section-rule::before,
.newspaper[data-tmpl="2"] .np-section-rule::after {
  border-top: 2px solid var(--border);
}

/* ── 报纸移动端 ── */
@media (max-width: 1200px) {
  .newspaper { max-width: 100%; }
}
@media (max-width: 768px) {
  .newspaper { padding: 18px 14px; }
  .masthead h1 { font-size: 30px; padding: 4px 12px 0; letter-spacing: 2px; }
  .masthead-sub { font-size: 11px; letter-spacing: 3px; }
  .masthead-meta { font-size: 10px; padding: 4px; }
  .np-hl-main { align-items: flex-start; }
  .np-hl-img { width: 120px; min-height: 160px; height: auto; }
  .np-grid,
  .newspaper[data-tmpl="1"] .np-grid,
  .newspaper[data-tmpl="2"] .np-grid { grid-template-columns: repeat(2, 1fr); }
  .np-card-img-wrap { width: 56px; height: 74px; }
  .np-card-img { width: 56px; height: 74px; }
  .newspaper-footer { flex-direction: column; gap: 12px; }
}
@media (max-width: 480px) {
  .np-hl-main { flex-direction: column; }
  .np-hl-img { width: 100%; height: 200px; }
  .np-grid,
  .newspaper[data-tmpl="1"] .np-grid,
  .newspaper[data-tmpl="2"] .np-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   文章排版（终端文档）
   ══════════════════════════════════════════════ */
article { color: var(--text); }
article h1 {
  font-size: 28px; font-weight: 700;
  color: var(--text-head); margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  line-height: 1.3;
  letter-spacing: 1px;
}
article h1::after {
  content: ' ▒▒▒';
  color: var(--border-dash);
  font-size: 18px;
  letter-spacing: 2px;
}
article h2 {
  font-size: 19px; font-weight: 700;
  color: var(--text-head); margin: 38px 0 14px;
  padding: 4px 0 6px 12px;
  border-bottom: 1px dashed var(--border-dash);
  border-left: 4px solid var(--text-head);
  font-family: var(--font-mono);
  line-height: 1.35;
  letter-spacing: 0.5px;
}
article h3 {
  font-size: 16px; font-weight: 700;
  color: var(--text-head); margin: 26px 0 10px;
  font-family: var(--font-mono);
}
article h3::before { content: '▸ '; color: var(--text-dim); }
article h4 {
  font-size: 15px; font-weight: 700;
  color: var(--text); margin: 20px 0 8px;
  font-family: var(--font-mono);
}
article p { margin: 0 0 14px; }
article a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
article a:hover {
  background: var(--text-head); color: #000;
  text-decoration: none;
}
article a.wiki-link { color: var(--wiki-link); }
article ul, article ol { margin: 0 0 14px; padding-left: 26px; }
article ul { list-style: square; }
article li { margin: 4px 0; }
article li::marker { color: var(--text-dim); }
article blockquote {
  margin: 16px 0; padding: 12px 18px;
  border: 1px dashed var(--border-dash);
  border-left: 4px solid var(--text-head);
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-style: normal;
}
article blockquote p:last-child { margin-bottom: 0; }
article hr {
  border: none;
  border-top: 1px dashed var(--border-dash);
  margin: 28px 0;
}
article strong { color: var(--text-head); }

/* === 表格（终端线框表） === */
article table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0; font-size: 13px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}
article th, article td {
  border: 1px solid var(--border-light);
  padding: 7px 12px; text-align: left;
}
article th {
  background: var(--text-head);
  color: #000;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
article tr:nth-child(even) { background: rgba(255,255,255,0.03); }
article tbody tr:hover { background: var(--bg-hover); }

/* === 代码 === */
article code {
  background: #000;
  padding: 2px 7px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-head);
  border: 1px solid var(--border-dash);
}
article pre {
  background: #000;
  padding: 14px 16px;
  overflow-x: auto; margin: 16px 0;
  border: 1px solid var(--border-dash);
}
article pre code { background: none; padding: 0; color: var(--text); border: none; }

/* === Frontmatter 信息条（技术读数框） === */
.meta-bar {
  display: flex; flex-wrap: wrap; gap: 0 18px;
  margin-bottom: 20px; font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  background-color: #000;
  background-image: var(--dots);
  background-size: 6px 6px;
  padding: 8px 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.meta-tag {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}
.meta-tag .label { color: var(--border-dash); font-weight: 400; margin-right: 5px; }
.meta-tag .label::before { content: '[ '; }
.meta-tag .label::after { content: ' ]'; }

/* === 页脚 === */
.page-footer {
  margin-top: 60px; padding-top: 22px;
  border-top: 1px dashed var(--border-dash);
  font-size: 12px; color: var(--text-dim);
  text-align: center; line-height: 1.8;
  font-family: var(--font-mono);
}
.page-footer::after {
  content: '— EOF ▮ —';
  display: block;
  margin-top: 14px;
  color: var(--border-dash);
  letter-spacing: 3px;
}

/* === 洞悉水印（黑底反白：screen 混合让线稿发光） === */
.char-watermark {
  position: absolute;
  right: 0;
  top: 0;
  width: clamp(700px, 58%, 1500px);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.char-watermark img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.30;
  filter: grayscale(1) contrast(1.1) !important;
  mix-blend-mode: screen; /* 黑底上只留亮色线条 */
}
@media (max-width: 768px) {
  .char-watermark { display: none; }
}

/* === 画廊页卡（方形终端按钮） === */
.gallery-tab-group { }
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.gallery-tab {
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  color: var(--text-dim);
  cursor: pointer;
  background: #000;
  border: 1px solid var(--border-dash);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  line-height: 1.6;
}
.gallery-tab::before { content: '[ '; color: var(--border-dash); }
.gallery-tab::after { content: ' ]'; color: var(--border-dash); }
.gallery-tab:hover {
  border-color: var(--border);
  color: var(--text-head);
}
.gallery-tab.active {
  background: var(--text-head);
  color: #000;
  border-color: var(--text-head);
}
.gallery-tab.active::before, .gallery-tab.active::after { color: #555; }
.gallery-panel { display: none; }
.gallery-panel.active { display: block; }

.gallery-divider {
  border: none;
  border-top: 1px dashed var(--border-dash);
  margin: 14px 0 16px;
}

/* === 剧情图行内注入 === */
.story-img-float {
  float: left;
  margin: 3px 20px 10px 0;
  max-width: 180px;
  border: 1px solid var(--border-dash);
  background: #000;
  clear: left;
  padding: 4px;
}
.story-img-float img {
  width: 100%;
  display: block;
  cursor: zoom-in;
}
.story-img-float img:hover { opacity: 0.9; }
.story-img-block {
  clear: both;
  margin: 28px auto;
  text-align: center;
  max-width: 640px;
}
.story-img-block img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
  border: 1px solid var(--border-dash);
  padding: 5px;
  background: #000;
}
article h2, article h3 { clear: both; }
@media (max-width: 768px) {
  .story-img-float {
    float: none;
    max-width: 100%;
    margin: 0 0 14px;
  }
}

/* === 角色画廊 === */
.char-gallery {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.gallery-section { margin-bottom: 18px; }
.gallery-section:last-child { margin-bottom: 0; }
.gallery-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--border-dash);
  padding-bottom: 5px; margin-bottom: 12px;
  font-family: var(--font-mono);
}
.gallery-label::before { content: '■ '; }
.portraits-row {
  display: flex; flex-wrap: nowrap;
  gap: 12px; overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.portrait-fig {
  flex-shrink: 0; margin: 0; text-align: center;
}
.portrait-fig img {
  max-height: 240px; width: auto; display: block;
  cursor: zoom-in;
  border: 1px solid var(--border-dash);
  background: #000;
  padding: 4px;
}
.portrait-fig img:hover { border-color: var(--border); }
.portrait-fig figcaption {
  font-size: 10px; color: var(--text-dim); margin-top: 5px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}
/* 签名收藏 */
.signature-section {
  display: flex; justify-content: center;
  padding: 18px 10px;
  background: var(--surface);
  border: 1px dashed var(--border-dash);
}
.signature-fig { margin: 0; text-align: center; }
.signature-fig img {
  max-height: 280px; max-width: 100%;
  cursor: zoom-in;
  border: 1px solid var(--border-dash);
  background: #000;
  padding: 4px;
}
.signature-fig img:hover { border-color: var(--border); }
/* 单品小图行 */
.items-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start;
}
.item-fig { margin: 0; text-align: center; }
.item-fig img {
  max-height: 88px; width: auto; display: block;
  cursor: zoom-in;
  border: 1px solid var(--border-dash);
  background: #000;
  padding: 3px;
}
.item-fig img:hover { border-color: var(--border); }
.item-fig figcaption {
  font-size: 10px; color: var(--text-dim); margin-top: 3px;
  max-width: 100px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-mono);
}
/* 时装区块 */
.costume-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 12px 14px;
}
.costume-layout {
  display: flex; flex-wrap: wrap;
  gap: 16px; align-items: flex-start;
}
.costume-arts {
  display: flex; gap: 10px; align-items: flex-end; flex-shrink: 0;
}
.scene-fig img  { max-height: 180px; width: auto; }
.costume-items  { align-self: center; }

/* 行内单品 / 尤提姆图片 */
.item-inline-img {
  float: left;
  width: 68px;
  height: 68px;
  object-fit: contain;
  object-position: center;
  background: #000;
  margin: 2px 14px 4px 0;
  cursor: zoom-in;
  border: 1px solid var(--border-dash);
  padding: 3px;
  display: block;
  flex-shrink: 0;
}
.item-inline-img:hover { border-color: var(--border); }
article li:has(.item-inline-img) { overflow: hidden; }

/* 单品卡片 */
.items-tab-group .item-cards {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.item-card {
  display: flex;
  gap: 14px;
  padding: 13px 15px;
  background: #000;
  border: 1px solid var(--border-light);
  transition: border-color .15s;
}
.item-card:hover { border-color: var(--border-dash); }
.item-card-img {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  object-fit: contain;
  object-position: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-dash);
  padding: 4px;
  cursor: zoom-in;
}
.item-card-img:hover { border-color: var(--border); }
.item-card-body { flex: 1 1 auto; min-width: 0; }
.item-card-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-head);
  font-family: var(--font-mono);
}
.item-card-meta {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: normal;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}
.item-card-body p {
  margin: 0 0 6px;
  line-height: 1.6;
  font-size: 13px;
}
.item-card-body p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
  .item-card { flex-direction: column; }
  .item-card-img { width: 100%; height: auto; max-height: 180px; }
}

/* === 灯箱（像素版加边框） === */
#lbImg {
  border: 1px solid var(--border);
  outline: 1px dashed var(--border-dash);
  outline-offset: 6px;
  background: #000;
}

/* === 响应式断点 === */
@media (max-width: 1200px) {
  :root { --sidebar-width: 240px; }
  .content { padding: 24px 20px 80px; }
  article { padding: 28px 30px; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 260px; }
  .menu-toggle { display: block; }
  .sidebar {
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    z-index: 90;
    box-shadow: 6px 0 0 rgba(255,255,255,0.10);
    background-color: #000;
    border-right: 1px solid var(--border);
  }
  .sidebar.open { transform: translateX(0); }
  .content {
    margin-left: 0;
    padding: 16px 12px 60px;
  }
  article {
    padding: 20px 16px;
    outline-offset: 3px;
  }
  .site-title { font-size: 14px; }
  .site-title small { display: none; }
  .site-title::before { margin-right: 6px; }
  .header-search { max-width: 140px; }
  #searchInput { font-size: 12px; padding: 5px 9px; }
  .theme-switch { font-size: 11px; padding: 5px 8px; }
  article h1 { font-size: 21px; }
  article h2 { font-size: 17px; }
  article h3 { font-size: 15px; }
  article h4 { font-size: 14px; }
  article table { font-size: 12px; }
  article th, article td { padding: 6px 8px; }
  article ul, article ol { padding-left: 20px; }
  .portraits-row { flex-wrap: wrap; }
  .portrait-fig img { max-height: 160px; }
  .item-fig img { max-height: 70px; }
  .scene-fig img { max-height: 130px; }
  .item-inline-img { width: 52px; height: 52px; margin-right: 8px; }
}

/* === 滚动条（方形） === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #000; border-left: 1px solid var(--border-light); }
::-webkit-scrollbar-thumb { background: #2c2c2c; border: 1px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #ffffff; }

/* === 选中高亮：反相 === */
::selection { background: #ffffff; color: #000000; }

/* === 焦点可见性 === */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 1px dashed var(--text-head);
  outline-offset: 2px;
}

/* === 减少动态偏好：关闭全部动效 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .rv { opacity: 1 !important; transform: none !important; }
}
