/* 青梧市图书馆信息网 · 2005-2010 千禧古早政务门户风格 + 21:30 闭馆异化演出 */
:root {
  --bg: #dfe5ed;
  --page: #ffffff;
  --ink: #222222;
  --muted: #666666;
  --link: #003399;
  --link-hover: #cc0000;
  --navy: #16467a;
  --navy-dark: #0e2f54;
  --navy-light: #28629c;
  --border: #b3c5d9;
  --border-soft: #d4dfe9;
  --panel-bg: #f6f9fc;
  --red: #b22222;
  --song: "SimSun", "NSimSun", "Songti SC", "Noto Serif SC", serif;
  --hei: "SimHei", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "Courier New", "SimSun", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg) repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.22) 0px,
    rgba(255,255,255,0.22) 2px,
    transparent 2px,
    transparent 6px
  );
  color: var(--ink);
  font-family: var(--song);
  font-size: 13px;
  line-height: 1.75;
}

/* ---------- 里世界（21:30 闭馆接管态）视觉异化 ---------- */
body.closed {
  --bg: #aeb6ae;
  --page: #e8ece7;
  --ink: #1a1e1a;
  --muted: #4c544c;
  --link: #1c3a56;
  --link-hover: #8e1b1b;
  --navy: #243442;
  --navy-dark: #141e26;
  --navy-light: #34495a;
  --border: #8b968e;
  --border-soft: #b6bfb8;
  --panel-bg: #dde3dc;
  background: #aeb6ae;
}
body.closed::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  box-shadow: inset 0 0 90px rgba(10, 18, 14, 0.32);
}
body.closed.flicker {
  animation: lampFlicker 0.24s steps(2) 2;
}
@keyframes lampFlicker {
  0% { filter: brightness(1); }
  25% { filter: brightness(0.76) contrast(1.08); }
  50% { filter: brightness(1.03); }
  75% { filter: brightness(0.84); }
  100% { filter: brightness(1); }
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: var(--song); font-size: 13px; }
h1, h2, h3, h4, p, ul, ol { margin-top: 0; }

/* 经典 Windows 98/XP 灰色立体按钮 */
.wbtn {
  display: inline-block;
  padding: 3px 11px;
  background: #ece9d8;
  color: #111;
  border: 2px outset #ffffff;
  border-right-color: #7f7c72;
  border-bottom-color: #7f7c72;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
}
.wbtn:hover { background: #f4f2e8; color: #000; text-decoration: none; }
.wbtn:active { border-style: inset; }
.wbtn.primary { background: #1e548a; color: #fff; border-color: #4d88c4 #0e2e52 #0e2e52 #4d88c4; }
.wbtn.primary:hover { background: #2664a3; color: #fff; }
.wbtn.danger { background: #8e1b1b; color: #fff; border-color: #c74a4a #4d0c0c #4d0c0c #c74a4a; }
.wbtn:disabled { opacity: 0.5; cursor: not-allowed; }

.winput, .wselect, .wtextarea {
  border: 1px solid #7f9db9;
  background: #ffffff;
  color: #111;
  padding: 3px 6px;
  outline: none;
}
.winput:focus, .wselect:focus, .wtextarea:focus { border-color: #16467a; }

/* ---------- 外框壳体（960px 经典定宽居中） ---------- */
.portal-wrap {
  width: 960px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--page);
  border-left: 1px solid #9eb0c4;
  border-right: 1px solid #9eb0c4;
  min-height: 100vh;
}

/* 顶部细工具条 */
.top-strip {
  background: #f1f5fa;
  border-bottom: 1px solid var(--border-soft);
  padding: 4px 14px;
  font-size: 12px;
  color: #445566;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
body.closed .top-strip {
  background: #1b252c;
  color: #c4d4c6;
  border-bottom-color: #0e1418;
  font-family: var(--mono);
}
.top-strip a, .top-strip button.link-btn {
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
}
.top-strip button.link-btn:hover { text-decoration: underline; color: var(--link-hover); }
body.closed .top-strip button.link-btn:hover { color: #ff8c7a; }
.status-led {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #338a3e;
  margin-right: 6px;
  vertical-align: middle;
}
body.closed .status-led {
  background: #c92a2a;
  animation: blinkStep 1.2s steps(1) infinite;
}
@keyframes blinkStep { 50% { opacity: 0.25; } }

/* 顶部机构横幅 Banner */
.portal-banner {
  position: relative;
  height: 118px;
  background: linear-gradient(90deg, #103a68 0%, #1d5894 52%, #296eb0 100%);
  overflow: hidden;
  border-bottom: 1px solid #0e2e52;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}
body.closed .portal-banner {
  background: linear-gradient(90deg, #152028 0%, #23333e 55%, #1c2830 100%);
}
.portal-banner .banner-photo {
  position: absolute;
  right: 0;
  top: 0;
  width: 440px;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 35%);
}
body.closed .portal-banner .banner-photo {
  opacity: 0.48;
  filter: grayscale(0.35) contrast(1.15);
}
.banner-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  text-decoration: none;
}
.banner-brand:hover { color: #ffffff; text-decoration: none; }
.banner-brand img {
  width: 62px;
  height: 62px;
  background: rgba(255,255,255,0.92);
  padding: 3px;
  border: 1px solid #9dc0e2;
}
.banner-title {
  font-family: "FZXiaoBiaoSong-B05S", var(--song);
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.55);
  line-height: 1.2;
}
.banner-sub {
  font-size: 11px;
  color: #d6e8f8;
  letter-spacing: 1px;
  margin-top: 4px;
  font-family: var(--mono);
}
.banner-right-meta {
  position: relative;
  z-index: 2;
  text-align: right;
  color: #e4f0fb;
  font-size: 12px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.65);
}

/* 经典深蓝单行导航条 */
.portal-nav {
  background: linear-gradient(180deg, #27629e 0%, #174678 52%, #133c68 100%);
  border-top: 1px solid #5b93cb;
  border-bottom: 2px solid #0d2b4c;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 8px;
}
body.closed .portal-nav {
  background: linear-gradient(180deg, #2e3e4a 0%, #1d2932 100%);
  border-top-color: #4b5d6b;
  border-bottom-color: #0e151a;
}
.portal-nav a {
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 7px 14px;
  position: relative;
  text-decoration: none;
}
.portal-nav a + a::before {
  content: "|";
  position: absolute;
  left: 0;
  color: rgba(255,255,255,0.35);
  font-weight: normal;
}
.portal-nav a:hover, .portal-nav a.active {
  background: rgba(255,255,255,0.16);
  color: #ffeb8a;
  text-decoration: none;
}
.portal-nav .nav-exit {
  margin-left: auto;
  background: #8e1b1b;
  color: #fff2cc !important;
  border-left: 1px solid #c95858;
}
.portal-nav .nav-exit::before { display: none; }
.portal-nav .nav-exit:hover { background: #ab2424; }

/* 经典滚动通告栏 */
.marquee-bar {
  background: #f5f9fe;
  border-bottom: 1px solid var(--border);
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  overflow: hidden;
}
body.closed .marquee-bar {
  background: #d8ded7;
  border-bottom-color: #8b968e;
}
.marquee-tag {
  color: var(--red);
  font-weight: bold;
  white-space: nowrap;
}
.marquee-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-inner {
  display: inline-block;
  padding-left: 100%;
  animation: marqueeScroll 34s linear infinite;
}
.marquee-inner:hover { animation-play-state: paused; }
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ---------- 页面主内容与门户方框 ---------- */
.portal-main { padding: 12px 14px 28px; }
.portal-cols {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 12px;
  align-items: start;
}
.box {
  border: 1px solid var(--border);
  background: var(--page);
  margin-bottom: 12px;
}
.box:last-child { margin-bottom: 0; }
.box-hd {
  background: linear-gradient(180deg, #e7f0fa 0%, #cfe0f3 100%);
  border-bottom: 1px solid var(--border);
  padding: 5px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: bold;
  color: var(--navy-dark);
}
body.closed .box-hd {
  background: linear-gradient(180deg, #d3dad3 0%, #bcc6be 100%);
  color: #162128;
}
.box-hd.blue {
  background: linear-gradient(180deg, #2b67a4 0%, #1a4d82 100%);
  color: #ffffff;
}
body.closed .box-hd.blue {
  background: linear-gradient(180deg, #324452 0%, #202e38 100%);
  color: #eef4f2;
}
.box-hd .more { font-size: 12px; font-weight: normal; color: inherit; }
.box-bd { padding: 10px 12px; }

/* 左侧读者查询框 */
.login-row { margin-bottom: 7px; display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 4px; font-size: 12px; }
.login-row input { width: 100%; }
.hit-counter {
  display: inline-block;
  background: #111;
  color: #52ff6e;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 3px;
  padding: 2px 8px;
  border: 2px inset #666;
}
body.closed .hit-counter { color: #ff5544; }

/* 新闻/公告经典列表 */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 2px;
  border-bottom: 1px dotted #ccd6e2;
  font-size: 13px;
}
.news-list li:last-child { border-bottom: 0; }
.news-list .n-date { color: var(--muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.badge-new {
  display: inline-block;
  background: #cc0000;
  color: #fff;
  font-size: 10px;
  padding: 0 3px;
  margin-left: 4px;
  line-height: 1.3;
  vertical-align: 1px;
}
.badge-tag {
  display: inline-block;
  font-size: 11px;
  padding: 0 5px;
  border: 1px solid var(--border);
  background: #f0f5fa;
  color: var(--navy);
}
.badge-tag.red { border-color: #c77; background: #fff0f0; color: #a00; }
.badge-tag.green { border-color: #7a7; background: #f0fff0; color: #1a661a; }

.thumb-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.thumb-item { border: 1px solid var(--border-soft); padding: 4px; background: #fbfcfe; text-align: center; font-size: 12px; }
.thumb-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; margin-bottom: 5px; border: 1px solid #ccc; }

/* 页脚 */
.portal-footer {
  background: #eef2f7;
  border-top: 2px solid var(--navy);
  padding: 12px 16px 18px;
  text-align: center;
  font-size: 12px;
  color: #555;
  line-height: 1.9;
}
body.closed .portal-footer {
  background: #cfd6cf;
  border-top-color: #243442;
  color: #364038;
}

/* 经典表格 */
.ptable { width: 100%; border-collapse: collapse; font-size: 12.5px; background: #fff; }
body.closed .ptable { background: #edf1ec; }
.ptable th, .ptable td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
.ptable th { background: #e3edf7; color: var(--navy-dark); font-weight: bold; }
body.closed .ptable th { background: #cdd6ce; color: #162128; }
.ptable tr.row-click:hover td { background: #fff9e6; cursor: pointer; }

.crumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-soft);
}
.notice-box {
  border: 1px solid #d7c08e;
  background: #fffbeb;
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 12.5px;
}
.notice-box.red { border-color: #c88; background: #fff2f0; color: #6c1414; }
.notice-box.blue { border-color: #9cb8d4; background: #f0f6fc; color: #163b63; }

/* 反白隐写（轻度 Steg：肉眼不可见，鼠标划选浮现！） */
.stealth-whisper {
  color: var(--page);
  font-size: 12px;
  letter-spacing: 1px;
  user-select: text;
  margin: 4px 0;
}
.stealth-whisper::selection {
  background: #7a1212;
  color: #fff6d6;
}

/* ---------- 入馆须知红头文件排版 ---------- */
.doc-paper {
  background: #fffefc;
  border: 1px solid #b5b0a4;
  padding: 24px 32px;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}
body.closed .doc-paper { background: #eaeee8; border-color: #89948b; }
.doc-redhead {
  text-align: center;
  color: #b21818;
  font-family: "FZXiaoBiaoSong-B05S", var(--song);
  font-size: 22px;
  letter-spacing: 3px;
  padding-bottom: 10px;
  border-bottom: 3px double #b21818;
  margin-bottom: 10px;
}
.doc-meta { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.rule-ol { padding-left: 0; list-style: none; margin: 0; }
.rule-ol li {
  padding: 9px 6px;
  border-bottom: 1px dashed #d5d0c5;
  font-size: 13.5px;
  line-height: 1.85;
}
.rule-ol li.mutated {
  font-family: "SimSun", serif;
  color: #211919;
  background: rgba(142, 27, 27, 0.04);
}
.rule-stamp-old {
  display: inline-block;
  font-size: 11px;
  color: #9c2323;
  border: 1px solid #9c2323;
  padding: 0 4px;
  margin-left: 6px;
  font-family: var(--mono);
}

/* ---------- 3F 硫酸纸三层叠图 ---------- */
.map-layout { display: grid; grid-template-columns: 1fr 250px; gap: 12px; align-items: start; }
.blueprint-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f5f2e8;
  border: 2px solid #5c6f82;
  overflow: hidden;
}
.bp-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.1s linear;
}
.bp-control {
  border: 1px solid var(--border);
  background: var(--panel-bg);
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 12px;
}
.bp-control label { display: flex; align-items: center; gap: 6px; font-weight: bold; cursor: pointer; }
.bp-control input[type="range"] { width: 100%; margin-top: 4px; }

/* ---------- 可拖拽/旋转 1998 打孔卡 ---------- */
.punch-card-float {
  position: fixed;
  z-index: 800;
  width: 390px;
  background: rgba(232, 219, 184, 0.94);
  border: 2px solid #7d6844;
  box-shadow: 4px 6px 18px rgba(0,0,0,0.35);
  user-select: none;
  cursor: move;
}
.punch-card-bar {
  background: #5b492c;
  color: #f6ebd1;
  padding: 3px 8px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.punch-card-bar button {
  background: #e5d8b8;
  color: #222;
  border: 1px solid #332917;
  font-size: 11px;
  padding: 1px 6px;
  cursor: pointer;
}
.punch-card-body { position: relative; padding: 0; }
.punch-grid-box {
  font-family: "SimSun", monospace;
  font-size: 16px;
  line-height: 28px;
  letter-spacing: 2px;
  background: #faf5e6;
  border: 1px solid #9d8b6b;
  padding: 14px 16px;
  position: relative;
  display: inline-block;
  margin: 10px 0;
}
.punch-stamp-corner {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-top: 2px solid #a82828;
  border-left: 2px solid #a82828;
}

/* ---------- 电子书阅读器 ---------- */
.reader-grid { display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 12px; align-items: start; }
.reader-paper {
  background: #f9f4e7;
  border: 1px solid #b8ab92;
  padding: 24px 30px;
  position: relative;
  min-width: 0;
  overflow-wrap: anywhere;
}
.reader-text { font-family: "FangSong_GB2312", var(--song); font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; word-break: break-word; }
.reader-text p { margin: 0 0 12px; text-indent: 2em; }
.reader-text .p-num {
  display: inline-block;
  text-indent: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: #998e7b;
  margin-right: 6px;
  user-select: none;
}
mark.hl-yellow { background: rgba(232, 198, 86, 0.45); color: inherit; }
mark.hl-blue { background: rgba(94, 162, 232, 0.30); color: inherit; }
mark.hl-gray { background: rgba(180, 180, 180, 0.38); color: inherit; }
.book-note {
  border: 1px dashed #a8997d;
  background: #f2ebd8;
  padding: 8px 12px;
  margin: 12px 0;
  font-size: 12.5px;
}
.book-note.margin { border-left: 3px solid #2b67a4; border-style: solid; background: #eef4fa; }

/* ---------- 广播功放台（极简工业风 + 二周目外接示波器） ---------- */
.pa-rack {
  background: #232a25;
  color: #cfe0ce;
  border: 2px solid #121714;
  padding: 14px;
  font-family: var(--mono);
  font-size: 12px;
}
.pa-rack h3 { color: #b7d9b4; border-bottom: 1px solid #3c4d40; padding-bottom: 6px; margin-bottom: 10px; font-size: 14px; }
.pa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pa-mod { border: 1px solid #3b4b3f; background: #19201b; padding: 10px; }
.pa-mod-title { color: #8fb490; font-weight: bold; margin-bottom: 8px; font-size: 11px; letter-spacing: 1px; }
.jack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.jack-btn {
  background: #101511;
  color: #9db79e;
  border: 1px solid #445848;
  padding: 6px 4px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
}
.jack-btn.plugged { background: #2d5932; color: #e8ffe8; border-color: #7ad882; font-weight: bold; }
.vu-wrap { display: grid; grid-template-columns: 24px 1fr 42px; gap: 6px; align-items: center; margin: 5px 0; }
.vu-bar { height: 12px; background: #0b0f0c; border: 1px solid #3c4d40; position: relative; overflow: hidden; }
.vu-fill { height: 100%; width: 10%; background: linear-gradient(90deg, #3da84a 0%, #c8b636 72%, #d13838 100%); transition: width 0.08s linear; }
.pa-screen {
  background: #0b110d;
  border: 1px solid #38503c;
  padding: 10px;
  margin-top: 10px;
  min-height: 76px;
  color: #b4dfb0;
  line-height: 1.7;
}
.pa-screen .err { color: #e86f5f; }
.pa-screen .warn { color: #e6b85c; }
.scope-module {
  margin-top: 12px;
  border: 2px solid #46684a;
  background: #0c160e;
  padding: 12px;
}
.scope-canvas { width: 100%; height: 130px; background: #061008; border: 1px solid #2b4e30; display: block; }

/* ---------- DOS 离馆自检终端 + 敲门压迫演出 ---------- */
.dos-terminal {
  background: #0e1410;
  color: #b9e0b5;
  border: 2px solid #2f4234;
  padding: 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.85;
}
.dos-log { border-bottom: 1px dashed #2d4433; padding-bottom: 10px; margin-bottom: 12px; }
.dos-warn { color: #f0be59; }
.dos-err { color: #f06e60; }
.dos-ok { color: #7ae880; }
.route-svg-box { background: #070c08; border: 1px solid #2e4c35; padding: 8px; margin: 10px 0; }
.route-node { cursor: pointer; }
.route-node:hover rect, .route-node:hover circle { stroke: #ffeb8a; stroke-width: 2.5; }

/* 门外手电冷光特效 */
.flashlight-fx {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  pointer-events: none;
  z-index: 950;
  background: radial-gradient(ellipse at 0% 42%, rgba(220, 245, 255, 0.34) 0%, rgba(200, 230, 240, 0.08) 45%, transparent 72%);
  animation: beamSweep 3.2s ease-in-out infinite alternate;
}
@keyframes beamSweep {
  0% { transform: translateY(-10%) scaleY(0.92); opacity: 0.55; }
  100% { transform: translateY(14%) scaleY(1.1); opacity: 0.9; }
}

/* ---------- 经典 Win2000 弹窗（用于豹变警告 & 敲门陷阱 & 原图暗部检视） ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 18, 0.62);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.win-dialog {
  width: min(520px, 96vw);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: #d4d0c8;
  border: 2px outset #ffffff;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.45);
  color: #111;
  font-family: var(--song);
}
.win-dialog.wide { width: min(760px, 96vw); }
.win-titlebar {
  flex: 0 0 auto;
  background: linear-gradient(90deg, #0a246a 0%, #a6caf0 100%);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.win-titlebar.red { background: linear-gradient(90deg, #7a1010 0%, #c85a5a 100%); }
.win-body { padding: 14px 16px; font-size: 13px; line-height: 1.75; overflow-y: auto; flex: 1 1 auto; }
.win-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ---------- Apache 2005 目录索引风格 ---------- */
.apache-page {
  background: #ffffff;
  color: #000000;
  font-family: "Courier New", "SimSun", monospace;
  padding: 20px 26px;
  min-height: 75vh;
  font-size: 13px;
}
.apache-page h1 { font-family: "Times New Roman", "SimSun", serif; font-size: 22px; margin-bottom: 10px; }
.apache-page a { color: #0000ee; text-decoration: underline; }
.apache-page a:visited { color: #551a8b; }
.apache-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.apache-table th, .apache-table td { padding: 3px 10px 3px 0; text-align: left; border: 0; font-size: 13px; }
.apache-doc {
  background: #f8f8f5;
  border: 1px solid #999;
  padding: 16px 20px;
  margin-top: 14px;
  font-family: var(--song);
  line-height: 1.85;
}

/* ---------- 留言板 ---------- */
.bbs-post { border: 1px solid var(--border); background: #fff; margin-bottom: 10px; }
body.closed .bbs-post { background: #edf1ec; }
.bbs-head {
  background: #eaf1f8;
  border-bottom: 1px solid var(--border-soft);
  padding: 5px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #445566;
}
body.closed .bbs-head { background: #d4dcd4; color: #243028; }
.bbs-post.old-era { border-color: #999; background: #f6f6f0; }
.bbs-post.old-era .bbs-head { background: #deded6; color: #333; }
.bbs-avatar { width: 26px; height: 26px; border: 1px solid #aaa; object-fit: cover; }
.bbs-body { padding: 10px 12px; font-size: 13px; }
.bbs-replies { border-top: 1px dashed var(--border); background: #f8fafd; padding: 6px 12px; }
body.closed .bbs-replies { background: #e2e8e1; }
.bbs-reply { display: grid; grid-template-columns: 140px 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px dotted #d4dce4; font-size: 12px; }
.bbs-reply:last-child { border-bottom: 0; }
.bbs-att { margin-top: 8px; border: 1px solid #b5c3d1; padding: 6px; background: #f5f7fa; display: inline-block; max-width: 360px; }
.bbs-att img { max-height: 210px; cursor: pointer; border: 1px solid #888; }

/* ---------- 终局归档 ---------- */
.ending-box {
  max-width: 760px;
  margin: 12px auto;
  border: 1px solid var(--border);
  background: #fffefc;
  padding: 28px 34px;
}
body.closed .ending-box { background: #eaeee8; }
.ending-box.bad-2005 { background: #f4f4ee; border-color: #888; font-family: "SimSun", serif; }
.ending-body { font-family: "FangSong_GB2312", var(--song); font-size: 15.5px; line-height: 2.05; }
.ending-body p { text-indent: 2em; margin-bottom: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 1200;
  background: #1b242c;
  color: #f4f6f2;
  border: 1px solid #8fa3b5;
  padding: 7px 14px;
  font-size: 12.5px;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.35);
}

/* ---------- 世界观之外：游玩须知引入页 (/intro) ---------- */
.intro-screen {
  min-height: 100vh;
  background: #14181c;
  color: #dfe4e8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  font-family: var(--song);
}
.intro-card {
  width: min(680px, 100%);
  background: #1b2127;
  border: 1px solid #35414d;
  padding: 32px 36px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.intro-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: #8fa6bc;
  margin-bottom: 10px;
}
.intro-card h1 {
  font-family: "FZXiaoBiaoSong-B05S", var(--song);
  font-size: 26px;
  color: #f4f7fa;
  margin: 0 0 8px;
  letter-spacing: 2px;
}
.intro-sub { color: #9fb0bf; font-size: 13px; margin-bottom: 18px; }
.intro-list {
  list-style: none;
  padding: 14px 16px;
  margin: 0 0 20px;
  background: #14191e;
  border: 1px solid #2b353f;
  font-size: 13px;
  line-height: 1.85;
}
.intro-list li { padding: 4px 0; border-bottom: 1px dotted #28323c; }
.intro-list li:last-child { border-bottom: 0; }
.intro-list strong { color: #e8c78a; font-weight: normal; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.intro-enter {
  background: #1f5387;
  color: #fff;
  border: 1px solid #4e89c4;
  padding: 9px 22px;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 1px;
}
.intro-enter:hover { background: #2967a6; }
.intro-foot { margin-top: 18px; font-size: 11.5px; color: #7b8c9c; line-height: 1.7; }

@media (max-width: 820px) {
  .portal-cols, .map-layout, .reader-grid, .pa-grid { grid-template-columns: 1fr; }
  .thumb-row { grid-template-columns: 1fr; }
  .bbs-reply { grid-template-columns: 1fr; gap: 2px; }
  .intro-card { padding: 22px 20px; }
}
