/* 青梧市图书馆信息网 · 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-intranet {
  margin-left: auto;
  background: #3d4f3c;
  color: #e6f2d5 !important;
  border-left: 1px solid #6a8268;
}
.portal-nav .nav-intranet::before { display: none; }
.portal-nav .nav-intranet:hover, .portal-nav .nav-intranet.active { background: #4d634b; color: #ffeb8a !important; }
.portal-nav .nav-exit {
  margin-left: auto;
  background: #8e1b1b;
  color: #fff2cc !important;
  border-left: 1px solid #c95858;
}
.portal-nav .nav-intranet + .nav-exit { margin-left: 0; }
.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;
}

/* ---------- 入馆须知红头文件排版 + 异化 Glitch 演出 ---------- */
.doc-paper {
  background: #fffefc;
  border: 1px solid #b5b0a4;
  padding: 24px 32px;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
body.closed .doc-paper {
  background: #eaeee8;
  border-color: #89948b;
  box-shadow: inset 0 0 28px rgba(24, 30, 26, 0.1);
}
.doc-paper.glitch-pulse {
  animation: rulesTear 0.65s steps(1, end) both;
  box-shadow: 0 0 0 2px rgba(142, 27, 27, 0.38), inset 0 0 42px rgba(32, 8, 8, 0.22);
}
.doc-paper.glitch-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: repeating-linear-gradient(
    0deg,
    rgba(142, 27, 27, 0.09) 0px,
    rgba(142, 27, 27, 0.09) 2px,
    transparent 2px,
    transparent 5px
  );
  mix-blend-mode: multiply;
}
@keyframes rulesTear {
  0%   { transform: translate(0, 0) skewX(0deg); filter: brightness(1) contrast(1); }
  12%  { transform: translate(-6px, 1px) skewX(-1.6deg); filter: brightness(0.42) contrast(1.52); }
  24%  { transform: translate(7px, -1px) skewX(2deg); filter: brightness(1.18) contrast(1.28); }
  38%  { transform: translate(-5px, 0) skewX(-1.1deg); filter: brightness(0.3) contrast(1.65) saturate(0.35); }
  52%  { transform: translate(4px, 1px) skewX(0.9deg); filter: brightness(0.92) contrast(1.2); }
  66%  { transform: translate(-3px, -1px) skewX(-0.6deg); filter: brightness(0.5) contrast(1.42); }
  82%  { transform: translate(2px, 0) skewX(0.3deg); filter: brightness(1.06) contrast(1.1); }
  100% { transform: translate(0, 0) skewX(0deg); filter: brightness(1) contrast(1); }
}
.doc-stamp-overlay {
  position: absolute;
  top: 16px;
  right: 22px;
  width: 138px;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: multiply;
  filter: contrast(1.08) saturate(0.9);
  animation: stampFadeIn 0.6s ease-out forwards;
}
.doc-stamp-overlay img {
  width: 100%;
  height: auto;
  display: block;
}
@keyframes stampFadeIn {
  0%   { opacity: 0; transform: rotate(-13deg) scale(1.12); }
  60%  { opacity: 0.86; transform: rotate(-7.5deg) scale(0.98); }
  100% { opacity: 0.78; transform: rotate(-8.5deg) scale(1); }
}
.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;
  position: relative;
  z-index: 2;
}
.doc-meta {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}
.rule-ol { padding-left: 0; list-style: none; margin: 0; position: relative; z-index: 2; }
.rule-ol li {
  padding: 9px 8px;
  border-bottom: 1px dashed #d5d0c5;
  font-size: 13.5px;
  line-height: 1.85;
  position: relative;
}
.rule-ol li.glitching {
  background: rgba(142, 27, 27, 0.14);
  border-left: 3px solid #a81616;
  padding-left: 11px;
  animation: clauseCorrupt 0.7s steps(2, end) both;
  text-shadow: -2px 0 rgba(178, 24, 24, 0.82), 2px 0 rgba(18, 24, 22, 0.72);
}
@keyframes clauseCorrupt {
  0%   { transform: translateX(0); opacity: 1; text-shadow: 0 0 transparent; }
  14%  { transform: translateX(-8px) skewX(-3.2deg); opacity: 0.72; text-shadow: 4px 0 #b21818, -3px 0 #111111; }
  28%  { transform: translateX(9px) skewX(3.8deg); opacity: 0.92; text-shadow: -5px 0 #991111, 3px 1px #0d1410; }
  42%  { transform: translateX(-6px) skewX(-2.2deg); opacity: 0.46; text-shadow: 3px -1px #c41e1e, -4px 0 #111111; }
  58%  { transform: translateX(7px) skewX(2.4deg); opacity: 0.88; text-shadow: -3px 0 #a81616, 2px 0 #1a1e1a; }
  74%  { transform: translateX(-4px) skewX(-1deg); opacity: 0.78; text-shadow: 2px 0 #8e1b1b, -2px 0 #111111; }
  88%  { transform: translateX(2px); opacity: 0.96; text-shadow: -1px 0 rgba(142, 27, 27, 0.55); }
  100% { transform: translateX(0); opacity: 1; text-shadow: none; }
}
.rule-ol li.mutated {
  font-family: "SimSun", serif;
  color: #241313;
  background: linear-gradient(
    90deg,
    rgba(138, 24, 24, 0.09) 0%,
    rgba(118, 96, 74, 0.05) 62%,
    rgba(118, 96, 74, 0.02) 100%
  );
  border-left: 3px solid #8a1818;
  padding: 10px 10px 10px 12px;
  margin: 4px 0;
  box-shadow: inset 2px 2px 6px rgba(66, 36, 28, 0.13), inset 0 -1px 0 rgba(138, 24, 24, 0.18);
  animation: mutatedBreath 6.8s steps(1, end) infinite;
}
@keyframes mutatedBreath {
  0%, 92%, 100% { transform: translateX(0); text-shadow: none; }
  94% { transform: translateX(-1.5px); text-shadow: 1px 0 rgba(142, 27, 27, 0.42); }
  96% { transform: translateX(1px); text-shadow: -1px 0 rgba(20, 20, 20, 0.34); }
  98% { transform: translateX(0); text-shadow: none; }
}
.rule-ghost-del {
  display: block;
  color: #8f1d1d;
  text-decoration: line-through;
  text-decoration-color: #bd1414;
  text-decoration-thickness: 2px;
  font-size: 12.5px;
  margin-bottom: 3px;
  pointer-events: none;
  animation: ghostStrikeFlash 0.7s steps(2, end) forwards;
}
@keyframes ghostStrikeFlash {
  0%   { opacity: 0.94; transform: translateX(0); }
  28%  { opacity: 0.82; transform: translateX(-4px); }
  56%  { opacity: 0.54; transform: translateX(3px); }
  84%  { opacity: 0.28; transform: translateX(-2px); }
  100% { opacity: 0.12; transform: translateX(0); }
}
.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 硫酸纸三层叠图（Win2000 灰色面板复古质感） ---------- */
.win-subbar {
  background: linear-gradient(90deg, #4b6584 0%, #8aa2bd 100%);
  color: #ffffff;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: bold;
  font-family: var(--song);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #404040;
  user-select: none;
}
body.closed .win-subbar {
  background: linear-gradient(90deg, #2d3e4f 0%, #617485 100%);
}
.map-layout {
  display: grid;
  grid-template-columns: 1fr 258px;
  gap: 10px;
  align-items: start;
  background: #d4d0c8;
  border: 2px outset #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: inset 1px 1px 0 #f4f2ec, inset -1px -1px 0 #808080;
  padding: 8px;
  color: #111111;
}
.map-layout fieldset {
  border: 2px groove #f0ede6;
  background: #d4d0c8;
  padding: 7px 9px;
  margin: 0 0 8px;
  font-size: 12px;
  color: #111111;
}
.map-layout fieldset:last-child { margin-bottom: 0; }
.map-layout legend {
  padding: 0 5px;
  font-size: 12px;
  font-weight: bold;
  color: #0a246a;
  background: #d4d0c8;
}
.map-stage-win {
  background: #d4d0c8;
  border: 2px outset #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  padding: 2px;
}
.blueprint-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f5f2e8;
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  overflow: hidden;
}
.bp-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.1s linear;
}
.bp-img-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 0.1s linear;
}
.bp-control {
  border: 2px groove #f0ede6;
  background: #d4d0c8;
  padding: 7px 9px;
  margin: 0 0 8px;
  font-size: 12px;
  color: #111111;
}
.bp-control legend {
  padding: 0 4px;
  font-size: 11.5px;
  font-weight: bold;
  color: #0a246a;
  background: #d4d0c8;
}
.bp-control label { display: flex; align-items: center; gap: 6px; font-weight: bold; cursor: pointer; color: #111111; }
.bp-control input[type="range"] { width: 100%; margin-top: 4px; accent-color: #0a246a; }

/* ---------- 可拖拽/旋转 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; }

/* ---------- 广播功放台（Windows 2000 ActiveX 机房控制台窗口 + CRT 示波器） ---------- */
.pa-rack {
  background: #d4d0c8;
  color: #111111;
  border: 2px outset #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: inset 1px 1px 0 #f4f2ec, inset -1px -1px 0 #808080, 2px 2px 0 rgba(0, 0, 0, 0.25);
  padding: 10px;
  font-family: var(--song);
  font-size: 12px;
}
.pa-rack > .win-titlebar,
.pa-rack > h3 {
  margin: -8px -8px 10px;
  padding: 4px 8px;
  background: linear-gradient(90deg, #0a246a 0%, #a6caf0 100%);
  color: #ffffff;
  font-family: var(--song);
  font-size: 12.5px;
  font-weight: bold;
  border-bottom: 1px solid #404040;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
body.closed .pa-rack > .win-titlebar,
body.closed .pa-rack > h3 {
  background: linear-gradient(90deg, #162a48 0%, #647d96 100%);
}
.pa-rack-body { padding: 0; }
.pa-hw-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px;
  background: #c8c4bc;
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}
.pa-hw-item,
.pa-hw-strip figure {
  margin: 0;
  background: #d4d0c8;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #ffffff;
  padding: 4px;
  text-align: center;
}
.pa-hw-item img,
.pa-hw-strip figure img,
.pa-hw-strip > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #101210;
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  cursor: pointer;
}
.pa-hw-cap,
.pa-hw-strip figcaption {
  margin-top: 4px;
  font-size: 11px;
  color: #222222;
  line-height: 1.35;
}
.pa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pa-mod {
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #ffffff, 1px 1px 0 #ffffff;
  background: #dedad2;
  padding: 9px 10px;
  color: #111111;
  margin: 0;
}
.pa-mod > legend {
  padding: 0 5px;
  font-size: 12px;
  font-weight: bold;
  color: #0a246a;
  background: #dedad2;
  font-family: var(--song);
}
.pa-mod-title {
  color: #0a246a;
  font-weight: bold;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #9e9a90;
  font-size: 12px;
  letter-spacing: 0.3px;
}
.pa-note { color: #444444; font-size: 11.5px; }
.jack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.jack-btn {
  background: #d4d0c8;
  color: #111111;
  border: 2px outset #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  padding: 5px 4px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  line-height: 1.35;
  border-radius: 0;
}
.jack-btn::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  vertical-align: 1px;
  background: #5a5a5a;
  border: 1px inset #404040;
}
.jack-btn:hover { background: #e3e0d8; color: #000000; }
.jack-btn:active {
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}
.jack-btn.plugged {
  background: #1b3d22;
  color: #dcffdc;
  border: 2px inset #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.68);
  font-weight: bold;
}
.jack-btn.plugged::before {
  background: #33ff33;
  border-color: #0e4a0e;
  box-shadow: 0 0 4px #33ff33;
}
.jack-btn.plugged:hover { background: #234c2b; color: #efffef; }
.vu-wrap {
  display: grid;
  grid-template-columns: 24px 1fr 48px;
  gap: 6px;
  align-items: center;
  margin: 6px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: #111111;
}
.vu-bar {
  height: 15px;
  background: #080a08;
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  position: relative;
  overflow: hidden;
}
.vu-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 6px,
    #080a08 6px,
    #080a08 8px
  );
}
.vu-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(
    90deg,
    #18c92e 0%,
    #2be63c 56%,
    #e6d422 58%,
    #f0c018 80%,
    #e62929 82%,
    #ff3333 100%
  );
  background-size: 300px 100%;
  transition: width 0.08s linear;
}
.pa-screen {
  background: #080d08;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  padding: 10px 12px;
  margin-top: 10px;
  min-height: 82px;
  color: #33ee55;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
}
.pa-screen .err { color: #ff5544; }
.pa-screen .warn { color: #ffcc33; }
.pa-screen .ok { color: #55ff66; }
.scope-module {
  margin-top: 12px;
  border: 2px outset #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: inset 1px 1px 0 #ebe8e0, inset -1px -1px 0 #808080;
  background: #c8c4ba;
  color: #111111;
  padding: 10px;
}
.scope-module .pa-mod-title {
  background: #1f2b22;
  color: #a8f0b0;
  border: 2px inset #606860;
  border-right-color: #e8e4da;
  border-bottom-color: #e8e4da;
  padding: 4px 8px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
}
.scope-crt-frame {
  background: #161d17;
  border: 3px inset #606860;
  border-right-color: #ece9e0;
  border-bottom-color: #ece9e0;
  padding: 4px;
}
.scope-canvas {
  width: 100%;
  height: 136px;
  background: #041207;
  background-image:
    linear-gradient(rgba(51, 255, 102, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 255, 102, 0.11) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 2px inset #284a2d;
  box-shadow: inset 0 0 18px rgba(40, 220, 90, 0.22);
  display: block;
}
.scope-photo-box {
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  background: #0a100b;
  padding: 3px;
}
.scope-photo-box img { width: 100%; height: auto; display: block; cursor: pointer; }

/* ---------- DOS 离馆自检终端（Windows 2000 命令提示符窗口 C:\QWLIB\EXITCHK.EXE） ---------- */
.dos-win {
  background: #d4d0c8;
  border: 2px outset #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: inset 1px 1px 0 #f4f2ec, inset -1px -1px 0 #808080, 3px 3px 0 rgba(0, 0, 0, 0.35);
  padding: 2px;
  border-radius: 0;
}
.dos-titlebar {
  background: linear-gradient(90deg, #0a246a 0%, #a6caf0 100%);
  color: #ffffff;
  padding: 3px 4px 3px 6px;
  margin-bottom: 2px;
  font-family: var(--song);
  font-size: 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.dos-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.dos-ico {
  display: inline-block;
  width: 16px;
  height: 14px;
  line-height: 12px;
  text-align: center;
  background: #000000;
  color: #c0c0c0;
  border: 1px solid #d4d0c8;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: bold;
  flex: 0 0 auto;
}
.dos-win-btns {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.dos-win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 14px;
  background: #d4d0c8;
  color: #000000;
  border: 2px outset #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
  padding: 0;
  cursor: default;
}
.dos-terminal {
  background: #000000;
  color: #c0c0c0;
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  padding: 14px 16px;
  font-family: "Courier New", "SimSun", monospace;
  font-size: 13px;
  line-height: 1.8;
  border-radius: 0;
}
.dos-terminal .winput {
  background: #000000;
  color: #33ff33;
  border: 1px solid #808080;
  font-family: "Courier New", "SimSun", monospace;
  border-radius: 0;
}
.dos-log { border-bottom: 1px dashed #404040; padding-bottom: 10px; margin-bottom: 12px; }
.dos-prompt, .dos-green { color: #33ff33; }
.dos-warn { color: #ffff55; }
.dos-err { color: #ff5555; }
.dos-ok { color: #33ff33; }
.dos-muted { color: #808080; }
.dos-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #c0c0c0;
  vertical-align: -2px;
  margin-left: 3px;
  animation: blinkStep 0.9s steps(1) infinite;
}
.route-svg-box { background: #000000; border: 1px solid #404040; padding: 8px; margin: 10px 0; }
.route-node { cursor: pointer; }
.route-node:hover rect, .route-node:hover circle { stroke: #ffff55; stroke-width: 2.5; }
.dos-route-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #080808;
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  overflow: hidden;
  margin: 10px 0;
}
.dos-route-bg,
.dos-route-stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.88;
  filter: contrast(1.06) brightness(0.92);
  pointer-events: none;
}
.dos-route-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.dos-route-btn {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  background: #d4d0c8;
  color: #000000;
  border: 2px outset #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  padding: 2px 7px;
  font-family: "Courier New", "SimSun", monospace;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.75);
  border-radius: 0;
}
.dos-route-btn:hover { background: #ffffcc; color: #000000; }
.dos-route-btn:active {
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}
.dos-route-btn.selected,
.dos-route-btn.active {
  background: #0a246a;
  color: #33ff33;
  border: 2px inset #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}
.dos-route-btn.visited {
  background: #144d14;
  color: #d8ffd8;
  border-color: #55aa55 #0a260a #0a260a #55aa55;
}
.dos-route-btn.danger {
  background: #800000;
  color: #ffff55;
  border-color: #d45555 #380000 #380000 #d45555;
}
.dos-route-step-tag {
  display: inline-block;
  background: #000000;
  color: #33ff33;
  padding: 0 3px;
  margin-right: 4px;
  font-size: 10px;
}

/* 门外手电冷光特效 */
.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; }

/* ---------- 物证 / 失物缩略图与档案留影图集 ---------- */
.lf-thumb {
  width: 48px;
  height: 36px;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  background: #14181a;
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  padding: 1px;
  cursor: pointer;
}
.lf-thumb:hover {
  border-color: #0a246a;
  filter: contrast(1.08) brightness(1.05);
}
.lf-thumb-cell { width: 60px; text-align: center; vertical-align: middle; }

.arch-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 8px;
  background: #eef2f6;
  border: 1px solid var(--border);
}
body.closed .arch-photo-strip {
  background: #d3dad3;
  border-color: #8b968e;
}
.arch-photo-card,
.arch-photo-strip figure {
  margin: 0;
  background: #ffffff;
  border: 1px solid #b5c3d1;
  padding: 5px;
  text-align: center;
  font-size: 11.5px;
  color: #444444;
}
body.closed .arch-photo-card,
body.closed .arch-photo-strip figure {
  background: #e5eae4;
  border-color: #8d9890;
  color: #2b332c;
}
.arch-photo-card img,
.arch-photo-strip figure img,
.arch-photo-strip > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px inset #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  background: #14181a;
  cursor: pointer;
}
.arch-photo-cap,
.arch-photo-strip figcaption {
  margin-top: 5px;
  line-height: 1.45;
  font-family: var(--song);
}
.apache-page .arch-photo-strip {
  background: #f4f4ee;
  border: 1px solid #999999;
  font-family: var(--song);
}

/* ---------- 终局归档 ---------- */
.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; }

/* ---------- 21:30 闭馆世界切换（豹变）CRT 断电与 Win2000 级联冻结演出 ---------- */
body.takeover-crack .portal-wrap {
  animation: takeoverCrack 0.42s steps(3) infinite;
  filter: saturate(0.45) contrast(1.18) brightness(0.92);
}
@keyframes takeoverCrack {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2px, 1px) skewX(-0.6deg); }
  50%  { transform: translate(3px, -1px) skewX(0.8deg); filter: saturate(0.25) contrast(1.32) hue-rotate(-14deg); }
  75%  { transform: translate(-1px, 0); }
  100% { transform: translate(0, 0); }
}

.takeover-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: all;
  overflow: hidden;
}
.takeover-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  opacity: 0.85;
}
.takeover-cascade-win {
  position: absolute;
  width: 340px;
  max-width: 88vw;
  background: #d4d0c8;
  border: 2px outset #ffffff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55);
  color: #111;
  font-family: var(--song);
  font-size: 12px;
  animation: cascadePop 0.08s steps(2) both;
}
@keyframes cascadePop {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
.takeover-cascade-win .tw-bar {
  background: linear-gradient(90deg, #0a246a 0%, #a6caf0 100%);
  color: #fff;
  padding: 3px 7px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}
.takeover-cascade-win.red .tw-bar {
  background: linear-gradient(90deg, #7a1010 0%, #c85a5a 100%);
}
.takeover-cascade-win .tw-bd {
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.65;
}
.takeover-cascade-win .tw-ico {
  flex: none;
  width: 24px;
  height: 24px;
  background: #b22222;
  color: #fff;
  border: 1px solid #550000;
  text-align: center;
  line-height: 22px;
  font-family: var(--mono);
  font-weight: bold;
  font-size: 15px;
}

/* 经典 CRT 断电横向坍缩黑屏 */
.takeover-blackout {
  position: absolute;
  inset: 0;
  background: #020403;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.08s linear;
}
.takeover-blackout.on { opacity: 1; }
.takeover-crt-beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 100vh;
  transform: translateY(-50%);
  background: #e6f7ee;
  opacity: 0;
  pointer-events: none;
}
.takeover-crt-beam.collapse {
  animation: crtPowerOff 0.42s cubic-bezier(0.22, 0.9, 0.36, 1) forwards;
}
@keyframes crtPowerOff {
  0%   { opacity: 0.95; transform: translateY(-50%) scaleY(1) scaleX(1); }
  38%  { opacity: 1;    transform: translateY(-50%) scaleY(0.008) scaleX(1); background: #ffffff; }
  76%  { opacity: 0.9;  transform: translateY(-50%) scaleY(0.006) scaleX(0.04); background: #d6ffe8; }
  100% { opacity: 0;    transform: translateY(-50%) scaleY(0.002) scaleX(0.004); }
}

.takeover-bootlog {
  width: min(560px, 90vw);
  color: #88c990;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2.05;
  letter-spacing: 0.5px;
  padding: 16px;
}
.takeover-bootlog .tb-line {
  opacity: 0;
  animation: tbFade 0.12s linear forwards;
}
.takeover-bootlog .tb-line.warn { color: #d8a45c; }
.takeover-bootlog .tb-line.err  { color: #d96b60; }
@keyframes tbFade { to { opacity: 1; } }

/* 日光灯启辉管闪烁点亮里世界 */
.takeover-blackout.sputter-reveal {
  animation: tubeSputter 0.92s steps(1) forwards;
  pointer-events: none;
}
@keyframes tubeSputter {
  0%   { opacity: 1; }
  12%  { opacity: 0.18; }
  22%  { opacity: 0.96; }
  34%  { opacity: 0.88; }
  45%  { opacity: 0.08; }
  56%  { opacity: 0.72; }
  68%  { opacity: 0.12; }
  78%  { opacity: 0.42; }
  88%  { opacity: 0.04; }
  100% { opacity: 0; }
}

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