/* ============ 华信大厦值班系统 · 样式 ============ */

:root {
  --ink: #1a1a1a;
  --ink-2: #444;
  --paper: #f4f1e8;
  --paper-2: #ece8dc;
  --line: #c9c2b0;
  --red: #a80000;
  --red-deep: #6b0000;
  --blue: #2c3e50;
  --blue-2: #3d5168;
  --sys-bg: #e9edf1;
  --sys-panel: #f7f8fa;
  --sys-line: #b9c2cc;
  --night: #050505;
  --mono: "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "SimSun", "Songti SC", serif;
  color: var(--ink);
  background: var(--sys-bg);
  font-size: 15px;
  line-height: 1.9;
}

/* ============ 招聘页 ============ */

body.recruit {
  background: #e8e4d8 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCI+PGZpbHRlciBpZD0iZyI+PGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjAuOCIgbnVtT2N0YXZlcz0iMiIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNnKSIgb3BhY2l0eT0iMC4wNSIvPjwvc3ZnPg==);
}

.recruit-head {
  background: var(--blue);
  color: #fff;
  padding: 18px 0;
  border-bottom: 3px solid var(--red);
}
.recruit-head-inner { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.recruit-head h1 { font-size: 22px; letter-spacing: 6px; font-weight: normal; }
.recruit-head .sub { font-size: 11px; letter-spacing: 2px; color: #b7c4d3; font-family: var(--mono); }

.recruit-main {
  max-width: 960px; margin: 24px auto 40px; padding: 0 16px;
  display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start;
}

.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 36px 40px 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  position: relative;
}
.paper-title {
  font-size: 24px; text-align: center; letter-spacing: 10px; padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.paper-no { text-align: right; font-size: 12px; color: var(--ink-2); margin: 8px 0 20px; font-family: var(--mono); }
.paper h2 { font-size: 16px; margin: 18px 0 6px; font-weight: normal; }
.paper p { text-indent: 2em; margin-bottom: 8px; }
.cond { margin: 0 0 8px 3em; }
.cond li { margin-bottom: 2px; }

.hr { border-top: 1px dashed var(--line); margin: 24px 0 18px; }

.form-box { background: var(--paper-2); border: 1px solid var(--line); padding: 14px 16px; margin-top: 12px; }
.form-box label { display: block; margin-bottom: 10px; }
.form-box input {
  font-family: inherit; font-size: 15px; padding: 4px 8px; border: 1px solid #999;
  background: #fff; width: 240px; max-width: 90%;
}
.btn-official {
  font-family: inherit; font-size: 15px; padding: 6px 22px; cursor: pointer;
  background: var(--blue); color: #fff; border: none; letter-spacing: 2px;
}
.btn-official:hover { background: var(--blue-2); }
.app-result { margin-top: 12px; font-size: 14px; }
.app-result .err { color: var(--red); }
.app-result .ok p { text-indent: 0; margin-bottom: 6px; }

.hist { list-style: none; margin: 6px 0 12px 1em; }
.hist li { margin-bottom: 4px; }
.hist-date { font-family: var(--mono); color: var(--ink-2); margin-right: 10px; }

.notice-note { background: #fbf9f2; border: 1px dashed var(--line); padding: 10px 14px; margin: 14px 0; }
.notice-note p { text-indent: 0; font-size: 13px; color: var(--ink-2); }

.seal {
  text-align: center; margin-top: 26px; color: var(--red); font-size: 13px;
  border: 3px double var(--red); display: inline-block; padding: 8px 22px;
  transform: rotate(-2deg); letter-spacing: 2px; line-height: 1.6;
}

.side .card {
  background: var(--paper); border: 1px solid var(--line); padding: 14px 16px;
  margin-bottom: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.card-title { font-size: 14px; letter-spacing: 3px; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 10px; }
.night-photo {
  width: 100%; height: 170px; background: #000; border: 1px solid #333;
  position: relative; overflow: hidden;
}
.night-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 30% 8% at 50% 62%, rgba(255,255,255,.05), transparent),
    radial-gradient(ellipse 20% 5% at 42% 55%, rgba(255,255,255,.04), transparent);
}
.card-caption { font-size: 12px; color: var(--ink-2); margin-top: 8px; text-indent: 0; }

.recruit-foot { text-align: center; color: #777; font-size: 12px; padding: 20px 0 30px; line-height: 1.8; }

/* ============ 404 ============ */

body.err404 { background: #0a0a0a; color: #cfcfcf; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.err-box { text-align: center; padding: 30px; }
.err-code { font-size: 64px; font-family: var(--mono); color: #666; letter-spacing: 6px; }
.err-note { margin: 18px 0; color: #8a8a8a; font-size: 14px; }
.err-foot { margin-top: 26px; font-size: 12px; color: #555; letter-spacing: 2px; }
.err404 .btn-official { background: #333; color: #ddd; margin: 0 6px; }

/* ============ 值班系统框架 ============ */

body.sys { background: var(--sys-bg); }

.sys-wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: 168px; background: var(--blue); color: #dfe6ee; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .logo {
  padding: 14px 14px 10px; border-bottom: 1px solid rgba(255,255,255,.15);
  font-size: 14px; letter-spacing: 3px; line-height: 1.5;
}
.sidebar .logo small { display: block; font-size: 10px; letter-spacing: 1px; color: #93a6bb; font-family: var(--mono); }
.nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.nav button {
  display: block; width: 100%; text-align: left; padding: 9px 16px;
  background: none; border: none; color: #dfe6ee; font-family: inherit; font-size: 14px;
  cursor: pointer; letter-spacing: 2px; border-left: 3px solid transparent;
}
.nav button:hover { background: rgba(255,255,255,.08); }
.nav button.active { background: rgba(255,255,255,.14); border-left-color: #e8b64c; color: #fff; }
.sidebar .sys-foot { padding: 10px 14px; font-size: 10px; color: #7d91a6; border-top: 1px solid rgba(255,255,255,.12); line-height: 1.7; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: #fff; border-bottom: 1px solid var(--sys-line);
  padding: 8px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.topbar .t-title { font-size: 15px; letter-spacing: 2px; color: var(--blue); white-space: nowrap; }
.topbar .t-clock { font-family: var(--mono); font-size: 18px; color: #222; white-space: nowrap; }
.topbar .t-night { font-size: 13px; color: var(--red); letter-spacing: 1px; white-space: nowrap; }
.topbar .search-box { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar .search-box input {
  font-family: var(--mono); font-size: 14px; width: 220px; padding: 5px 10px;
  border: 1px solid var(--sys-line); border-radius: 2px; background: #fff;
}
.topbar .search-box button {
  font-family: inherit; padding: 5px 14px; background: var(--blue); color: #fff; border: none; cursor: pointer;
}
.vol-btn { background: none; border: 1px solid var(--sys-line); padding: 4px 10px; cursor: pointer; font-size: 13px; color: var(--blue-2); }
.vol-btn.off { color: #999; }

.content { flex: 1; padding: 20px 26px 60px; max-width: 1000px; width: 100%; }

/* 视图标题 */
.view-title { font-size: 20px; letter-spacing: 4px; border-bottom: 2px solid var(--blue); padding-bottom: 8px; margin-bottom: 18px; color: var(--blue); }
.view-sub { font-size: 13px; color: #777; margin: -12px 0 16px; }

/* 值班台 */
.desk-card {
  background: #fff; border: 1px solid var(--sys-line); margin-bottom: 16px;
}
.desk-card .dc-head {
  background: var(--blue-2); color: #fff; padding: 8px 14px; font-size: 14px; letter-spacing: 2px;
}
.desk-card .dc-body { padding: 14px 18px; }
.desk-card .dc-body p { margin-bottom: 8px; }
.desk-card .dc-body .mono { font-family: var(--mono); font-size: 13px; color: #333; }

/* 守则页 */
.rules-sheet { background: var(--paper); border: 1px solid var(--line); padding: 30px 34px; position: relative; }
.rules-sheet .rs-title { text-align: center; font-size: 20px; letter-spacing: 8px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 8px; }
.rules-sheet .rs-no { text-align: center; font-size: 12px; color: var(--ink-2); margin-bottom: 20px; }
.rule-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dotted var(--line); align-items: baseline; }
.rule-item .r-no { font-family: var(--mono); color: var(--ink-2); flex-shrink: 0; }
.rule-item .r-text { flex: 1; }
.rule-item .r-note { font-size: 12px; color: #888; margin-left: 12px; flex-shrink: 0; }
.rule-item.red { background: rgba(168,0,0,.05); }
.rule-item.red .r-text { color: var(--red-deep); font-family: "KaiTi", "楷体", serif; }
.rule-item.rule-new .r-text { animation: blinkIn 2s ease; }
@keyframes blinkIn { 0% { opacity: 0; } 100% { opacity: 1; } }

/* 值班记录(笔记本) */
.notebook { background: #fbf9f0; border: 1px solid var(--line); padding: 26px 34px; }
.nb-entry { border-bottom: 1px solid var(--line); padding: 16px 0; }
.nb-entry:last-child { border-bottom: none; }
.nb-entry .nb-head { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin-bottom: 6px; display: flex; justify-content: space-between; }
.nb-entry .nb-body { font-size: 15px; }
.nb-entry .nb-body p { text-indent: 2em; margin-bottom: 8px; }
.nb-entry .nb-body .hint { color: #777; font-size: 13px; }
.nb-entry.pen-red { background: rgba(168,0,0,.04); }
.nb-entry.pen-red .nb-head, .nb-entry.pen-red .nb-body { color: var(--red-deep); font-family: "KaiTi", "楷体", serif; }
.nb-entry.auto { border-left: 3px solid var(--red); padding-left: 14px; }
.nb-entry .sel, .sel { background: #ffe9a8; padding: 0 2px; border-radius: 2px; }
.nb-meta { margin-top: 14px; font-size: 12px; color: #999; }

/* 档案室 */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.arch-card { background: #fff; border: 1px solid var(--sys-line); padding: 12px 14px; cursor: pointer; }
.arch-card:hover { border-color: var(--blue); }
.arch-card .ac-t { font-size: 14px; color: var(--blue); margin-bottom: 4px; }
.arch-card .ac-s { font-size: 12px; color: #777; }
.arch-card.locked { background: #f3f3f3; }
.arch-card.locked .ac-t { color: #999; }

.doc-view { background: #fff; border: 1px solid var(--sys-line); padding: 26px 32px; }
.doc-view .dv-title { font-size: 18px; letter-spacing: 2px; border-bottom: 1px solid var(--ink); padding-bottom: 8px; margin-bottom: 14px; }
.doc-view .dv-meta { font-size: 12px; color: #888; margin-bottom: 14px; font-family: var(--mono); }
.doc-view p { text-indent: 2em; margin-bottom: 10px; }
.doc-view .dv-red { color: var(--red-deep); font-family: "KaiTi", "楷体", serif; }
.doc-view table { border-collapse: collapse; margin: 12px auto; font-size: 14px; }
.doc-view table td, .doc-view table th { border: 1px solid var(--ink); padding: 6px 14px; }
.doc-view .note-box { background: #f5f3ea; border: 1px dashed var(--line); padding: 12px 16px; margin: 14px 0; font-size: 14px; }
.doc-view .note-box p { text-indent: 0; }

/* 锁定面板 */
.lock-panel {
  border: 1px dashed var(--red); background: #fdf5f2; padding: 26px 30px; margin-top: 14px;
}
.lock-panel .lp-t { color: var(--red); font-size: 17px; letter-spacing: 2px; margin-bottom: 10px; }
.lock-panel p { margin-bottom: 6px; color: #5a4440; }

/* 监控
 * 目标是"一段深夜的监控录像"：OSD 字符压在上面，画面底下有颗粒、
 * 扫描线、镜头暗角，还有一条不停往上爬的信号带。 */
.cctv-frame {
  background: #050505; border: 1px solid #1c1c1c; padding: 12px; position: relative;
  box-shadow: inset 0 0 60px 10px rgba(0,0,0,.7);
}
.cctv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cam {
  border: 1px solid #232323; background: #060606; position: relative;
  min-height: 176px; overflow: hidden;
  box-shadow: inset 0 0 34px 6px rgba(0,0,0,.85);
}
.cam .cam-head {
  font-family: var(--mono); font-size: 10.5px; color: #7ea87e; letter-spacing: 1.4px;
  padding: 5px 8px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #161616; background: rgba(0,0,0,.55);
  text-shadow: 0 0 4px rgba(120,190,120,.35);
}
.cam .cam-body {
  position: relative; height: calc(100% - 25px); min-height: 150px;
  background: #050505;
}
.cam .cam-body .scene { position: absolute; inset: 0; }
.cam .cam-body .scene svg { width: 100%; height: 100%; display: block; }
/* 摄像头的 REC 点 */
.cam .cam-rec {
  position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: #d33; box-shadow: 0 0 6px rgba(221,51,51,.7); animation: recPulse 1.2s infinite;
}
@keyframes recPulse { 0%,100% { opacity: 1; } 50% { opacity: .18; } }
/* OSD 时间戳：白字带一点辉光，压在画面左下 */
.cam .cam-time {
  position: absolute; bottom: 5px; left: 8px; z-index: 3;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.2px;
  color: #d6d6d6; text-shadow: 0 0 5px rgba(255,255,255,.45), 0 1px 2px #000;
}
/* 颗粒（SVG 滤镜产出）与整体叠加 */
.cam .cctv-grain { mix-blend-mode: overlay; pointer-events: none; }
.cctv-static {
  position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: .16;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.09) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
/* 一条不停往上爬的信号带 */
.cam .cctv-static::after {
  content: ""; position: absolute; left: 0; right: 0; height: 22%; opacity: .5;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.10), transparent);
  animation: camTrack 7.5s linear infinite;
}
@keyframes camTrack { 0% { top: -24%; } 100% { top: 104%; } }
/* 整格极轻的呼吸感：不是闪，是"信号在动" */
@media (prefers-reduced-motion: no-preference) {
  .cam .cam-body .scene { animation: camHiss 5.5s steps(1) infinite; }
}
@keyframes camHiss {
  0%, 96% { filter: none; }
  97% { filter: brightness(1.06); }
  99% { filter: brightness(.94); }
  100% { filter: none; }
}
.cam.anomaly { border-color: #7a2020; }
.cam .mark-tag { position: absolute; top: 30px; right: 8px; z-index: 4; font-size: 12px; color: #e8b64c; display: none; text-shadow: 0 1px 3px #000; }
.cam.marked .mark-tag { display: block; }
.cctv-tools { margin-top: 12px; text-align: center; }
.cctv-status { font-family: var(--mono); font-size: 12px; color: #888; margin-top: 10px; text-align: center; }

/* 电梯 */
.elevator-wrap { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.elev-panel {
  background: #3a3f45; border: 4px solid #222; border-radius: 8px; padding: 16px 12px;
  display: flex; flex-direction: column; gap: 6px; width: 120px;
}
.elev-panel .e-disp {
  background: #000; color: #ff6a3d; font-family: var(--mono); font-size: 20px;
  text-align: center; padding: 6px 0; margin-bottom: 8px; border: 1px solid #555;
}
.elev-panel .e-row { display: flex; gap: 6px; justify-content: center; }
.elev-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid #666;
  background: #55595f; color: #ddd; font-family: inherit; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.elev-btn:hover { background: #6a7078; }
.elev-btn.danger { border-color: #a33; color: #ff9a9a; }
.elev-btn.pressed { background: #c8b64c; color: #222; }
.elev-info { flex: 1; min-width: 260px; }
.elev-info p { margin-bottom: 10px; }
.elev-log { font-family: var(--mono); font-size: 13px; background: #0c0c0c; color: #9c9; padding: 12px; margin-top: 10px; min-height: 60px; }

/* 摩斯 */
.morse-panel { background: #0c0c0c; border: 1px solid #333; padding: 18px; font-family: var(--mono); }
.morse-line { color: #c8c8c8; font-size: 18px; letter-spacing: 4px; min-height: 30px; white-space: pre-wrap; word-break: break-all; }
.morse-controls { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.morse-controls button { font-family: var(--mono); padding: 6px 14px; background: #2a2a2a; color: #ddd; border: 1px solid #555; cursor: pointer; }
.morse-controls button:hover { background: #3a3a3a; }
.morse-input { margin-top: 12px; display: flex; gap: 8px; }
.morse-input input { font-family: var(--mono); flex: 1; padding: 6px 10px; background: #111; color: #eee; border: 1px solid #555; }
.morse-input button { font-family: var(--mono); padding: 6px 16px; background: var(--blue); color: #fff; border: none; cursor: pointer; }
.morse-hint { font-size: 12px; color: #888; margin-top: 8px; }
.morse-table { background: #fff; border: 1px solid var(--sys-line); padding: 14px; margin-top: 14px; font-family: var(--mono); font-size: 13px; }

/* 笔记 */
.notes-pad { background: #fdf9ec; border: 1px solid var(--line); padding: 24px 28px; min-height: 300px; max-height: 62vh; overflow-y: auto; }
.notes-pad .np-line { border-bottom: 1px solid #e3dcc8; padding: 10px 0; font-size: 15px; white-space: pre-wrap; }
.notes-pad .np-empty { color: #aaa; text-align: center; padding: 40px 0; }
.notes-tools { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; }
.notes-tools textarea { flex: 1; font-family: inherit; font-size: 14px; padding: 6px 10px; }
.pen-btn {
  background: none; border: 1px solid var(--line); padding: 5px 14px; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--blue);
}
.pen-btn:hover { background: #f0ead8; }

/* 设置 */
.settings-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--sys-line); }
.settings-row button { font-family: inherit; padding: 6px 18px; background: var(--blue); color: #fff; border: none; cursor: pointer; }
.settings-row button.danger { background: #7a2020; }
.set-note { font-size: 12px; color: #888; margin-top: 10px; }

/* 场景覆盖层(叙事) */
.scene-overlay {
  position: fixed; inset: 0; background: #030303; z-index: 100;
  display: flex; justify-content: center; padding: 40px; overflow-y: auto;
  animation: fadeIn 1.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.scene-box { max-width: 640px; margin: auto; color: #c9c9c9; font-size: 16px; line-height: 2.1; }
.scene-box p { margin-bottom: 14px; text-indent: 2em; }
.scene-box .scene-clock { font-family: var(--mono); color: #8a2c2c; font-size: 15px; margin-bottom: 18px; letter-spacing: 2px; }
.scene-box .scene-clock.red { color: #d33; animation: recPulse 1s infinite; }
.scene-box .scene-continue { margin-top: 24px; text-align: center; }
.scene-box .scene-continue button {
  font-family: inherit; background: none; border: 1px solid #555; color: #999;
  padding: 8px 26px; cursor: pointer; letter-spacing: 4px;
}
.scene-box .scene-continue button:hover { color: #fff; border-color: #999; }
.scene-type { min-height: 3.2em; }

/* 选择界面 */
.choice-panel { text-align: center; padding: 20px 0; }
.choice-panel .cp-q { font-size: 17px; margin-bottom: 20px; letter-spacing: 2px; }
.choice-btn {
  display: block; margin: 10px auto; min-width: 320px; max-width: 90%;
  padding: 12px 24px; background: var(--paper); border: 1px solid var(--line);
  font-family: inherit; font-size: 15px; cursor: pointer; text-align: center;
}
.choice-btn:hover { background: #eae5d5; border-color: var(--blue); }
.choice-btn.quiet { background: none; border-style: dashed; color: #888; font-size: 13px; }
.choice-btn.quiet:hover { color: var(--red); border-color: var(--red); }

/* 结局 */
/* 结局是直接切过来的一幕:固定全屏,像监控硬切——不是接在页面下面 */
.ending-wrap { position: fixed; inset: 0; z-index: 110; background: #060606; color: #c9c9c9;
  display: flex; justify-content: center; padding: 40px; overflow-y: auto;
  animation: endingCut .9s ease-out; }
@keyframes endingCut { 0% { opacity: 0; } 12% { opacity: 1; } 24% { opacity: .25; } 38% { opacity: 1; } 55% { opacity: .6; } 100% { opacity: 1; } }
.ending-box { max-width: 560px; text-align: center; margin: auto; }
.ending-box .en-t { font-size: 26px; letter-spacing: 10px; margin-bottom: 26px; }
.ending-box .en-t.bad { color: #8a2c2c; }
.ending-box .en-t.good { color: #c8b64c; }
.ending-box p { margin-bottom: 12px; text-indent: 2em; text-align: left; }
.ending-box .en-meta { font-family: var(--mono); font-size: 12px; color: #555; margin: 24px 0; }
.ending-box button {
  font-family: inherit; background: none; border: 1px solid #444; color: #777;
  padding: 10px 30px; cursor: pointer; letter-spacing: 4px; margin: 0 6px;
}
.ending-box button:hover { color: #ddd; border-color: #888; }

/* 红色印章 */
.stamp {
  display: inline-block; border: 3px double var(--red); color: var(--red);
  padding: 4px 14px; font-size: 13px; letter-spacing: 2px; transform: rotate(-4deg);
  margin-left: 10px; font-family: "KaiTi", "楷体", serif;
}

/* 通用工具 */
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: #888; }
.center { text-align: center; }
.mt { margin-top: 14px; }
/* 彩蛋：档案里能点进去的外部站 */
.egg-link { cursor: pointer; color: var(--blue); text-decoration: underline; }
.egg-link:hover { color: var(--blue-2); }
.egg-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .78);
  display: flex; align-items: center; justify-content: center; padding: 32px;
}
.egg-box {
  width: 92%; max-width: 940px; height: 86vh; background: #fff;
  border: 1px solid #666; display: flex; flex-direction: column;
  box-shadow: 0 12px 44px rgba(0, 0, 0, .65); animation: fadeIn .3s ease;
}
.egg-bar {
  background: var(--blue); color: #fff; display: flex; justify-content: space-between;
  align-items: center; padding: 8px 14px; font-size: 13px; letter-spacing: 1px;
}
.egg-bar .egg-close {
  background: none; border: 1px solid rgba(255, 255, 255, .55); color: #fff;
  padding: 2px 12px; cursor: pointer; font-family: inherit; font-size: 12px;
}
.egg-bar .egg-close:hover { background: rgba(255, 255, 255, .15); }
.egg-iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* 第三夜 · 白影瞬闪（凝视的余味）
 * 两个方向 + 两个高度：第二次才不会被看穿 */
.pass-sil {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  width: 72px; height: 180px; pointer-events: none; z-index: 85;
  background: radial-gradient(ellipse at 50% 35%, rgba(255,255,255,.16), rgba(255,255,255,0) 62%);
  opacity: 0; filter: blur(2px);
  animation: pass-slide 1.6s ease forwards;
}
.pass-sil.low { top: 68%; height: 150px; }
.pass-sil.from-right { animation-name: pass-slide-rev; }
@keyframes pass-slide {
  0% { left: -8%; opacity: 0; }
  25% { opacity: .9; }
  100% { left: 108%; opacity: 0; }
}
@keyframes pass-slide-rev {
  0% { left: 108%; opacity: 0; }
  25% { opacity: .9; }
  100% { left: -8%; opacity: 0; }
}

/* ============ 入档手写体：玩家的名字被"写进"公文里 ============ */
.dv-hand {
  font-family: "KaiTi", "楷体", serif; font-size: 17px; color: #1a2b3d;
  border-bottom: 1px solid #6b7f93; padding: 0 8px; margin: 0 2px;
}

/* ============ 摩斯：波形需听过才显现 ============ */
.morse-str.dim { color: #4a4a4a; letter-spacing: 1px; font-size: 13px; }
.morse-bad {
  font-family: var(--mono); font-size: 11px; color: #c47b2b;
  border: 1px solid #6a4a1c; padding: 1px 6px; margin-left: 6px; letter-spacing: 1px;
}

/* ============ 档案室：调阅进度与已读 ============ */
.arch-meta { font-family: var(--mono); font-size: 12px; color: #777; margin: -8px 0 12px; }
.arch-meta b { color: var(--blue); }
.arch-card.read { background: #f6f4ec; }
.arch-card.read .ac-t::after { content: ""; }
.arch-card.read .ac-s { color: #9b9184; }

/* ============ 设置：结局收集 ============ */
.settings-block { border-bottom: 1px solid var(--sys-line); padding: 12px 0; }
.settings-block .sb-head { font-size: 14px; letter-spacing: 2px; color: var(--blue); margin-bottom: 10px; }
.ending-list { display: flex; flex-direction: column; gap: 6px; }
.el-row {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--sys-line); padding: 8px 12px;
}
.el-row.locked { background: #f3f3f3; border-style: dashed; }
.el-row.locked .el-name, .el-row.locked .el-desc { color: #a9a9a9; }
.el-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px; padding: 2px 8px;
  border: 1px solid var(--sys-line); color: #777; flex-shrink: 0;
}
.el-tag.good { border-color: #b08a1f; color: #8a6a10; }
.el-tag.truth { border-color: var(--red); color: var(--red); }
.el-tag.bad { border-color: #444; color: #333; background: #e8e8e8; }
.el-name { font-size: 14px; color: var(--ink); letter-spacing: 1px; }
.el-desc { font-size: 12px; color: #888; }

/* ============ 结局类型标签 ============ */
.ending-box .en-tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 4px; margin-bottom: 14px;
  border: 1px solid #444; display: inline-block; padding: 3px 14px; color: #888;
}
.ending-box .en-tag.good { border-color: #6b5a1f; color: #8a7530; }
.ending-box .en-tag.truth { border-color: #5a1f1f; color: #a33; }
.ending-box .en-tag.bad { border-color: #333; color: #666; }
.ending-box .en-t.true { color: #8E1B1B; }
.ending-box .en-meta { line-height: 1.9; }

/* ============ 夜间插曲 ============ */
.il-box { max-width: 660px; }
.il-title {
  font-size: 20px; letter-spacing: 6px; color: #d8d8d8;
  border-bottom: 1px solid #2a2a2a; padding-bottom: 10px; margin-bottom: 20px;
}
.il-task { margin-top: 26px; border-top: 1px dashed #333; padding-top: 20px; }
.il-prompt { font-size: 16px; color: #ddd; margin-bottom: 14px; letter-spacing: 1px; }
.il-input { display: flex; gap: 8px; }
.il-input input {
  flex: 1; font-family: inherit; font-size: 15px; padding: 9px 12px;
  background: #0d0d0d; color: #eee; border: 1px solid #555;
}
.il-input input:focus { outline: none; border-color: #8a2c2c; }
.il-input button {
  font-family: inherit; font-size: 15px; padding: 9px 20px; letter-spacing: 2px;
  background: #2a2a2a; color: #ddd; border: 1px solid #666; cursor: pointer;
}
.il-input button:hover { background: #3a3a3a; color: #fff; }
.il-hint { font-family: var(--mono); font-size: 12px; color: #7a7a7a; margin-top: 10px; }
.il-box .choice-btn {
  background: #101010; border-color: #3a3a3a; color: #c8c8c8; min-width: 0; width: 100%;
}
.il-box .choice-btn:hover { background: #1a1a1a; border-color: #8a2c2c; color: #fff; }
.il-rule { font-size: 11px; color: #6a6a6a; letter-spacing: 1px; }
.il-ok { color: #7fae7f !important; }
.il-bad { color: #c06060 !important; }
.desk-card .dc-body .il-ok { color: #4e7a4e; }
.desk-card .dc-body .il-bad { color: #a33; }

/* ============ 它用你的记事簿回答你 ============ */
.ask-block { border: 1px dashed var(--red); background: #fdf5f2; padding: 12px 16px; margin-bottom: 12px; }
.ask-label { font-size: 13px; color: var(--red-deep); letter-spacing: 1px; margin-bottom: 8px; font-family: "KaiTi", "楷体", serif; }
.ask-label.muted { color: #a89a90; border: 1px dashed var(--line); background: none; padding: 10px 14px; margin-bottom: 12px; }
.pen-btn.red { border-color: var(--red); color: var(--red); }
.pen-btn.red:hover { background: #f7e4e0; }
.np-line.np-it {
  color: var(--red-deep); font-family: "KaiTi", "楷体", serif; font-size: 16px;
  background: rgba(168,0,0,.04); border-bottom-color: #e3cfc9;
  padding-left: 12px; border-left: 3px solid var(--red);
}
.np-line.np-it .np-stamp {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  color: #b07c7c; margin-bottom: 5px;
}
.np-line.np-it.thinking { color: #b07c7c; font-style: normal; opacity: .8; }
.np-line.np-sys { color: #7a6a72; }

/* ============ 手机 ============ */
.phone {
  max-width: 380px; margin: 0 auto; background: #101012;
  border: 1px solid #333; border-radius: 14px; padding: 14px 14px 18px;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.ph-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; color: #9a9a9a;
  padding: 0 4px 10px; border-bottom: 1px solid #242426;
}
.ph-time { color: #d8d8d8; font-size: 13px; }
.ph-apps { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0; }
.ph-app {
  position: relative; font-family: inherit; font-size: 13px; cursor: pointer;
  background: #1b1b1e; color: #b6b6b6; border: 1px solid #2e2e31;
  padding: 6px 14px; border-radius: 16px; letter-spacing: 1px;
}
.ph-app:hover { color: #fff; border-color: #4a4a4e; }
.ph-app.on { background: #2c2c30; color: #fff; border-color: #6a6a70; }
.ph-badge {
  display: inline-block; min-width: 15px; text-align: center;
  background: #8a2c2c; color: #fff; font-family: var(--mono);
  font-size: 10px; border-radius: 8px; padding: 0 4px; margin-left: 6px;
}
.ph-body { border-top: 1px solid #242426; padding-top: 10px; }
.ph-item { padding: 10px 4px; border-bottom: 1px solid #1c1c1e; }
.ph-item:last-child { border-bottom: none; }
.ph-head { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); font-size: 11px; color: #7d7d7d; }
.ph-from, .ph-num { color: #b8b8b8; }
.ph-title { color: #b8b8b8; }
.ph-at { margin-left: auto; color: #6a6a6a; }
.ph-dur { color: #6a6a6a; }
.ph-text { font-size: 14px; color: #dcdcdc; margin-top: 5px; line-height: 1.7; }
.ph-note { font-size: 12px; color: #8a8a8a; margin-top: 4px; line-height: 1.6; }
.ph-item.warn .ph-text { color: #e08a8a; }
.ph-item.warn .ph-at { color: #a05a5a; }
.ph-item.future { background: rgba(138,44,44,.07); }
.ph-item.future .ph-at { color: #c06060; letter-spacing: 1px; }
.ph-item.future .ph-text { font-style: normal; }
.ph-empty { font-size: 13px; color: #6a6a6a; padding: 18px 4px; text-align: center; }

/* ============ 值班纪律与结局结算 ============ */
.disc-list { display: flex; flex-direction: column; gap: 5px; }
.disc-row {
  display: flex; align-items: baseline; gap: 12px;
  background: #fff; border-left: 3px solid var(--brand);
  padding: 7px 12px; font-size: 13px;
}
.disc-rule { font-family: var(--mono); font-size: 12px; color: var(--brand); flex-shrink: 0; }
.en-disc {
  text-align: left; border: 1px solid #2a2a2a; background: #0b0b0b;
  padding: 14px 18px; margin: 8px 0 22px; max-height: 220px; overflow-y: auto;
}
.en-disc.clean { color: #6a8a6a; font-size: 13px; border-color: #232323; }
.en-disc .ed-head { font-family: var(--mono); font-size: 12px; color: #b33; letter-spacing: 2px; margin-bottom: 8px; }
.en-disc .ed-row { font-size: 13px; color: #9a9a9a; padding: 3px 0; }
.en-disc .ed-rule { font-family: var(--mono); font-size: 11px; color: #c06060; margin-right: 10px; }

/* ============ 其他 ============ */
.np-line.np-sys {
  color: #8a5a5a; font-family: "KaiTi", "楷体", serif;
  border-bottom-color: #e0cdcd;
}
.nb-entry.tampered { background: rgba(168,0,0,.06); }
.nb-entry.tampered .nb-body { color: var(--red-deep); }
.cam.nudge { animation: camNudge .36s ease; }
@keyframes camNudge {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  75% { transform: translate(2px, -1px); }
}

/* ============================================================
 * 视觉恐怖层
 * ============================================================ */

/* ---------- 场景插画 ---------- */
.scene-art {
  position: relative; width: 100%; height: 200px; margin: 0 0 22px;
  background: #050505; border: 1px solid #1c1c1c; overflow: hidden;
}
.scene-art svg { display: block; width: 100%; height: 100%; }
.scene-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 38%, rgba(0,0,0,.88) 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .scene-art { animation: fadeIn 1.6s ease; }
  .scene-art svg { animation: artDrift 28s ease-in-out infinite alternate; }
}
@keyframes artDrift { from { transform: scale(1); } to { transform: scale(1.08); } }
.doc-view .scene-art { height: 176px; margin-bottom: 18px; }

/* ---------- VHS 退化层（全页共用一层，强度随恐惧等级） ---------- */
.vhs { position: fixed; inset: 0; pointer-events: none; z-index: 88; box-shadow: inset 0 0 150px 44px rgba(0,0,0,.88); }
.vhs::before {
  content: ""; position: absolute; inset: 0; opacity: var(--scan, .08);
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.6) 0 1px, rgba(0,0,0,0) 1px 3px);
}
.vhs::after {
  content: ""; position: absolute; left: -6%; right: -6%; height: 9%; opacity: var(--band, .3);
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(255,255,255,.055), rgba(0,0,0,0));
  animation: vhsTrack var(--track, 12s) linear infinite;
}
@keyframes vhsTrack { 0% { top: -12%; } 100% { top: 112%; } }
body.dread-0 { --scan: .06; --band: .20; --track: 15s; }
body.dread-1 { --scan: .10; --band: .38; --track: 11s; }
body.dread-2 { --scan: .14; --band: .58; --track: 8s; }
body.dread-3 { --scan: .18; --band: .82; --track: 6s; }
body.dread-4 { --scan: .24; --band: 1;   --track: 4.2s; }
@media (prefers-reduced-motion: no-preference) {
  /* 信号不稳时的抽帧 */
  body.dread-4 .content { animation: frameJump 9s steps(1) infinite; }
}
@keyframes frameJump {
  0%, 91% { transform: none; }
  92% { transform: translateX(2px); }
  94% { transform: translateX(-3px); }
  96% { transform: translateX(1px); }
  98%, 100% { transform: none; }
}
/* 结局上演时停抽帧:transform 会把 fixed 的结局层变成它的子坐标系 */
body.ending-open .content { animation: none !important; }

/* ---------- 房间里站着一个人 ---------- */
.room-sil {
  position: fixed; width: 60px; height: 200px; z-index: 86;
  pointer-events: none; opacity: 0; filter: blur(2px);
  transition: opacity 3.6s ease;
}
.room-sil svg { width: 100%; height: 100%; }
.room-sil.on { opacity: .13; }
body.dread-3 .room-sil.on, body.dread-4 .room-sil.on { opacity: .20; }

/* ---------- 监控：凝视序列 ---------- */
.cam .scene { transform-origin: 50% 48%; transition: transform var(--stare-ms, 3000ms) linear; }
.cam .person-head-up { opacity: 0; transition: opacity var(--stare-ms, 3000ms) linear; }
.cam.staring .scene { transform: scale(1.5); }
.cam.staring .person-head-up { opacity: 1; }
.cam.staring { box-shadow: inset 0 0 70px 14px rgba(120,0,0,.45); }
.cam.staring .scene svg { filter: contrast(1.28) brightness(1.12); }
.cam.crept .scene { transform: scale(1.14); transition: transform .6s ease; }
.cam.seen .scene { transform: scale(1.85); transition: transform 1.4s ease; }
.cam.seen { border-color: #8E1B1B; }
.cam.seen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 64% 54%, rgba(138,27,27,.24), transparent 62%);
}

@media (max-width: 760px) {
  .sys-wrap { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; }
  .sidebar .logo { border-bottom: none; border-right: 1px solid rgba(255,255,255,.15); }
  .nav { display: flex; overflow-x: auto; padding: 4px; }
  .nav button { width: auto; white-space: nowrap; padding: 8px 12px; border-left: none; border-bottom: 2px solid transparent; }
  .nav button.active { border-bottom-color: #e8b64c; }
  .sidebar .sys-foot { display: none; }
  .recruit-main { grid-template-columns: 1fr; }
  .cctv-grid { grid-template-columns: 1fr; }
  .topbar .search-box { margin-left: 0; width: 100%; }
  .topbar .search-box input { flex: 1; }
  /* 小屏上叙事覆盖层不能吃掉四成空间 */
  .scene-overlay { padding: 18px 16px; }
  .scene-box { font-size: 15px; line-height: 1.9; }
  .ending-wrap { padding: 20px 16px; }
  .ending-box .en-t { letter-spacing: 5px; font-size: 22px; }
  .ending-box button { padding: 10px 18px; letter-spacing: 2px; margin: 6px 4px; }
  .morse-line { font-size: 15px; letter-spacing: 2px; }
  .elev-panel { width: 106px; }
  .elev-btn { width: 34px; height: 34px; }
  .scene-art { height: 138px; margin-bottom: 16px; }
  .doc-view .scene-art { height: 126px; }
  .room-sil { width: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-art, .scene-art svg, .vhs::after, body.dread-4 .content { animation: none !important; }
  .cam .scene, .cam .person-head-up { transition: none !important; }
}

/* ============================================================
 * v2 视觉增强 · 材质 / 排版 / 沉浸感
 * ------------------------------------------------------------
 * 原则：纯 CSS 渐变与阴影，零外部资源，全部 GPU 合成。
 * 不新增 DOM，不新增 class，只覆盖现有选择器的背景与阴影。
 *
 * 三类材质：
 *   纸   —— 泛黄底色 + 纤维噪点（多重渐变模拟）+ 边角压暗
 *   金属 —— 斜向反光带 + 顶面受光
 *   暗面 —— 暗角 + 接触阴影 + 一线边缘光
 * ============================================================ */

/* ---------- 纸材质：招聘页 / 守则 / 记录本 / 档案 / 笔记 ---------- */

/* 招聘页主纸面：泛黄 + 纤维感 + 四角压暗（纸不是平的） */
.paper {
  background:
    /* 四角压暗 */
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 60%, rgba(80,70,40,.08) 100%),
    /* 纤维噪点：两层极细的交叉线 */
    repeating-linear-gradient(0deg, rgba(120,100,60,.015) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120,100,60,.012) 0 1px, transparent 1px 4px),
    /* 底色 */
    var(--paper);
  box-shadow:
    0 2px 8px rgba(0,0,0,.12),
    0 1px 2px rgba(0,0,0,.08),
    inset 0 0 60px rgba(180,160,100,.06);
}

/* 守则页：更正式的公文纸 —— 更黄、更厚、左上角有折角阴影 */
.rules-sheet {
  background:
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 55%, rgba(70,60,30,.1) 100%),
    repeating-linear-gradient(0deg, rgba(130,110,70,.018) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(130,110,70,.014) 0 1px, transparent 1px 4px),
    var(--paper);
  box-shadow:
    0 2px 10px rgba(0,0,0,.14),
    inset 0 0 80px rgba(180,160,100,.08),
    /* 左上角的折痕暗影 */
    -8px -8px 16px rgba(0,0,0,.04);
}

/* 值班记录本：横格纸 + 装订孔的暗影（左侧那条竖着的暗） */
.notebook {
  background:
    /* 横格线 */
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(180,170,140,.12) 31px 32px),
    /* 纤维 */
    repeating-linear-gradient(0deg, rgba(120,100,60,.01) 0 1px, transparent 1px 3px),
    /* 装订侧压暗 */
    linear-gradient(90deg, rgba(80,70,30,.06) 0 40px, transparent 40px),
    #fbf9f0;
  box-shadow:
    inset 0 0 50px rgba(180,160,100,.05),
    0 1px 4px rgba(0,0,0,.08);
}

/* 档案文档视图：复印件的灰白 + 颗粒 + 边角发黄 */
.doc-view {
  background:
    /* 四角发黄 */
    radial-gradient(ellipse 130% 100% at 50% 50%, transparent 50%, rgba(100,80,40,.1) 100%),
    /* 复印颗粒 */
    repeating-linear-gradient(0deg, rgba(100,90,60,.008) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(100,90,60,.006) 0 1px, transparent 1px 2px),
    #f8f6f0;
  box-shadow:
    inset 0 0 70px rgba(160,140,80,.07),
    0 1px 6px rgba(0,0,0,.06);
}

/* 笔记本（玩家自由记事） */
.notes-pad {
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(180,170,140,.1) 27px 28px),
    repeating-linear-gradient(0deg, rgba(120,100,60,.01) 0 1px, transparent 1px 3px),
    #fdf9ec;
  box-shadow: inset 0 0 40px rgba(180,160,100,.04);
}

/* 档案卡片：更明显的纸张层次 */
.arch-card {
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, #ffffff 60%, #f0ede4 100%),
    repeating-linear-gradient(0deg, rgba(120,100,60,.008) 0 1px, transparent 1px 3px);
  box-shadow:
    0 1px 3px rgba(0,0,0,.08),
    inset 0 0 20px rgba(180,160,100,.03);
}
.arch-card.read {
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, #f6f4ec 60%, #e8e4d6 100%);
}

/* 招聘页侧栏卡片 */
.side .card {
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, var(--paper) 60%, #e6e1d2 100%);
  box-shadow:
    0 2px 6px rgba(0,0,0,.1),
    inset 0 0 30px rgba(180,160,100,.04);
}

/* ---------- 场景覆盖层：叙事的"黑场" ---------- */

/* 叙事覆盖层：不是纯黑，是"深夜室内"——有一丁点蓝灰 */
.scene-overlay {
  background:
    /* 底色不是纯黑：极深的蓝灰 */
    radial-gradient(ellipse 80% 60% at 50% 30%, #0a0c0e 0%, #030303 70%);
}

/* 场景插画框：不再是死板的矩形——有内凹的暗角 */
.scene-art {
  background: #050505;
  border: 1px solid #1a1a1a;
  box-shadow:
    inset 0 0 40px 8px rgba(0,0,0,.6),
    0 1px 0 rgba(255,255,255,.03);
}
.scene-art::after {
  /* 底部渐暗 + 顶部微亮：像从一盏远处的灯看过去 */
  background:
    linear-gradient(180deg,
      rgba(0,0,0,.12) 0%,
      rgba(0,0,0,0) 30%,
      rgba(0,0,0,0) 55%,
      rgba(0,0,0,.7) 88%,
      rgba(0,0,0,.95) 100%);
}
/* 画面框的四角暗角 */
.scene-art::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse 100% 80% at 50% 45%, transparent 55%, rgba(0,0,0,.5) 100%);
}

/* 叙事正文：更好的阅读节奏 */
.scene-box {
  max-width: 660px;
  line-height: 2.15;
  letter-spacing: 0.02em;
}
.scene-box p {
  margin-bottom: 16px;
  text-indent: 2em;
}
/* 时钟更醒目 */
.scene-box .scene-clock {
  font-size: 14px;
  letter-spacing: 4px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #1a1a1a;
  text-shadow: 0 0 8px rgba(138,44,44,.3);
}
/* "继续"按钮：不是方框，是一行字 + 一道下划线 */
.scene-box .scene-continue button {
  border: none;
  border-bottom: 1px solid #444;
  padding: 8px 4px;
  letter-spacing: 6px;
  color: #777;
  background: none;
}
.scene-box .scene-continue button:hover {
  color: #c8c8c8;
  border-bottom-color: #888;
}

/* ---------- 结局：影院级框架 ---------- */

.ending-wrap {
  background:
    /* 上下渐暗（letterbox 感） */
    linear-gradient(180deg, #000 0%, #060606 15%, #060606 85%, #000 100%);
}
.ending-box {
  /* 结局文字区：一束极淡的顶光 */
  position: relative;
  padding: 20px 0;
}
.ending-box::before {
  content: ""; position: absolute; left: 50%; top: -40px; transform: translateX(-50%);
  width: 300px; height: 80px; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,.04), transparent 70%);
}
.ending-box .en-t {
  text-shadow: 0 0 16px rgba(200,182,76,.2), 0 2px 4px #000;
}
.ending-box .en-t.bad {
  text-shadow: 0 0 16px rgba(138,44,44,.25), 0 2px 4px #000;
}
.ending-box .en-t.true {
  text-shadow: 0 0 20px rgba(142,27,27,.3), 0 2px 4px #000;
}

/* ---------- 监控框：更深的"嵌入式"感 ---------- */

.cctv-frame {
  background: #030303;
  border: 1px solid #141414;
  box-shadow:
    inset 0 0 80px 14px rgba(0,0,0,.85),
    0 0 0 4px #0a0a0a,
    0 2px 12px rgba(0,0,0,.5);
}
.cam {
  box-shadow:
    inset 0 0 34px 6px rgba(0,0,0,.9),
    inset 0 0 0 1px rgba(255,255,255,.02);
}

/* ---------- 电梯面板：金属拉丝 ---------- */

.elev-panel {
  background:
    /* 斜向反光带 */
    linear-gradient(135deg, #4a5057 0%, #2a2f34 25%, #565d65 50%, #242930 75%, #3a3f45 100%);
  border: 4px solid #1a1e22;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.06),
    inset 0 -2px 0 rgba(0,0,0,.3),
    0 4px 12px rgba(0,0,0,.4);
}
.elev-btn {
  background: radial-gradient(circle at 35% 35%, #6a7078 0%, #55595f 60%, #3a3f45 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.15),
    inset 0 -2px 4px rgba(0,0,0,.4),
    0 2px 3px rgba(0,0,0,.3);
  border: 1px solid #2a2f34;
}
.elev-btn.pressed {
  background: radial-gradient(circle at 35% 35%, #e0c86a 0%, #c8b64c 60%, #9a8a3a 100%);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.3),
    inset 0 -1px 0 rgba(255,255,255,.1);
}

/* ---------- 手机：更深的边框与屏幕反光 ---------- */

.phone {
  background:
    linear-gradient(135deg, #18181a 0%, #101012 50%, #18181a 100%);
  box-shadow:
    0 8px 28px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -1px 0 rgba(0,0,0,.5);
}

/* ---------- 值班台卡片：公文感 ---------- */

.desk-card {
  background:
    radial-gradient(ellipse 100% 100% at 50% 0%, #ffffff 60%, #f0f2f5 100%);
  border: 1px solid var(--sys-line);
  box-shadow:
    0 1px 3px rgba(0,0,0,.06),
    inset 0 1px 0 rgba(255,255,255,.5);
}
.desk-card .dc-head {
  background:
    linear-gradient(180deg, var(--blue-2) 0%, #2c3e50 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    inset 0 -1px 0 rgba(0,0,0,.2);
}

/* ---------- 值班纪律行：左侧色带更有厚度 ---------- */

.disc-row {
  background:
    linear-gradient(90deg, rgba(44,62,80,.04) 0%, #ffffff 4px);
  box-shadow:
    inset 2px 0 0 var(--brand),
    0 1px 0 rgba(0,0,0,.03);
}

/* ---------- 锁定面板：更不安的质感 ---------- */

.lock-panel {
  background:
    repeating-linear-gradient(0deg, rgba(168,0,0,.02) 0 1px, transparent 1px 3px),
    #fdf5f2;
  box-shadow: inset 0 0 30px rgba(168,0,0,.04);
}

/* ---------- 选择按钮：纸张按下感 ---------- */

.choice-btn {
  background:
    radial-gradient(ellipse 100% 100% at 50% 30%, var(--paper) 60%, #e0dcd0 100%);
  box-shadow:
    0 1px 2px rgba(0,0,0,.08),
    inset 0 1px 0 rgba(255,255,255,.3);
}
.choice-btn:hover {
  background:
    radial-gradient(ellipse 100% 100% at 50% 30%, #eae5d5 60%, #d6d0c2 100%);
  box-shadow:
    0 2px 6px rgba(0,0,0,.1),
    inset 0 1px 0 rgba(255,255,255,.3);
}

/* ---------- 招聘页印章：更真实 ---------- */

.seal {
  background:
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(168,0,0,.04) 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* ---------- 404 页：深夜监控室 ---------- */

body.err404 {
  background:
    radial-gradient(ellipse 60% 40% at 50% 40%, #121212 0%, #0a0a0a 60%, #050505 100%);
}
.err-code {
  text-shadow: 0 0 20px rgba(120,120,120,.2);
}

/* ---------- 印章（公文里的红章）---------- */

.stamp {
  background:
    radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(168,0,0,.03) 100%);
  text-shadow: 0 0 4px rgba(168,0,0,.15);
}

/* ---------- 文档里的红字（陈守业的信等）：墨迹感 ---------- */

.doc-view .dv-red {
  text-shadow: 0 0 1px rgba(107,0,0,.2);
}

/* ---------- 夜间插曲框：更深的空间感 ---------- */

.il-box .il-title {
  text-shadow: 0 0 12px rgba(216,216,216,.1);
}

/* ---------- 全局：暗面里的文字微调 ---------- */

body.sys .content {
  text-shadow: 0 1px 0 rgba(255,255,255,.3);
}

/* ---------- 恐惧等级 3+：纸面开始泛冷 ---------- */

body.dread-3 .paper,
body.dread-3 .rules-sheet,
body.dread-3 .notebook,
body.dread-3 .doc-view {
  filter: brightness(.96) saturate(.85);
}
body.dread-4 .paper,
body.dread-4 .rules-sheet,
body.dread-4 .notebook,
body.dread-4 .doc-view {
  filter: brightness(.92) saturate(.7) contrast(1.05);
}

/* ---------- 小屏适配（追加段） ---------- */

@media (max-width: 760px) {
  .scene-art { height: 150px; }
  .scene-box { font-size: 15px; line-height: 2; }
  .scene-box .scene-clock { font-size: 13px; letter-spacing: 3px; }
}

/* ����ҹ:δ���ĵ�¼��ģ�� + ����;���İ�ť */
.cam-body.locked .scene { filter: blur(7px) grayscale(1) brightness(.7); transform: scale(1.04); }
.cam-body.locked .cam-time { opacity: .25; }
.cam-quota { position: absolute; left: 0; right: 0; top: 46%; text-align: center; font-size: 12px;
  letter-spacing: .12em; color: #c9b58a; pointer-events: none; }
.cam-body:not(.locked) .cam-quota { display: none; }
.cam-look { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  font: 12px/1 -apple-system,"PingFang SC",sans-serif; letter-spacing: .08em; padding: 6px 12px;
  border: 1px solid rgba(190,175,145,.45); background: rgba(10,12,14,.75); color: #d8c9a6;
  border-radius: 2px; cursor: pointer; }
.cam-body:not(.locked) .cam-look { display: none; }
.cam-look:hover { border-color: #e8b87a; color: #e8b87a; }

/* �ڶ�ҹ:��屳��Ķ����� */
.wire-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(190,175,145,.28); }
.wire-h { font-size: 12px; letter-spacing: .12em; color: #c9b58a; margin: 0 0 9px; }
.wire-ends { display: flex; flex-wrap: wrap; gap: 8px; }
.wire-end { font: 12.5px/1 -apple-system,"PingFang SC",sans-serif; letter-spacing: .06em; padding: 9px 12px;
  border: 1px solid rgba(190,175,145,.35); background: rgba(12,14,16,.6); color: #cfc7b5; border-radius: 2px; cursor: pointer; }
.wire-end:hover { border-color: #e8b87a; color: #e8b87a; }
.wire-end.picked { border-color: #c9a24a; background: rgba(201,162,74,.14); color: #e8dcc2; }
.wire-msg { margin-top: 9px; font-size: 12.5px; color: #8f8877; }

/* 首页续玩提示 */
.resume-tip { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20;
  padding: 10px 16px; border: 1px solid rgba(190,175,145,.35); border-radius: 3px;
  background: rgba(10,12,14,.82); color: #cfc7b5; font: 13px/1.6 -apple-system,"PingFang SC",sans-serif; }
.resume-tip a { color: #e8b87a; text-decoration: none; }

/* ===== 沉浸感:淡入与节奏(纯 CSS,无 JS 开销) ===== */
@keyframes hx-fade { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
.scene-box p, .il-box p, .il-task p { animation: hx-fade .46s ease both; }
.scene-box p:nth-child(2), .il-box p:nth-child(2) { animation-delay: .10s }
.scene-box p:nth-child(3), .il-box p:nth-child(3) { animation-delay: .20s }
.scene-box p:nth-child(4), .il-box p:nth-child(4) { animation-delay: .30s }
.scene-box p:nth-child(5), .il-box p:nth-child(5) { animation-delay: .40s }
.desk-card { animation: hx-fade .40s ease both; }
.desk-card:nth-child(2) { animation-delay: .07s }
.desk-card:nth-child(3) { animation-delay: .14s }
.cam { transition: transform .22s ease, box-shadow .22s ease; }
.cam:hover { transform: translateY(-2px); }
.wire-end { transition: border-color .18s ease, background .18s ease, color .18s ease; }
@media (prefers-reduced-motion: reduce) {
  .scene-box p, .il-box p, .il-task p, .desk-card, .cam, .wire-end { animation: none !important; transition: none !important }
}

/* ===== 触屏与小屏适配 ===== */
.cam.has-person .cam-body { touch-action: none; -webkit-user-select: none; user-select: none; }
.cam-body { touch-action: manipulation; }
@media (max-width: 820px) {
  .cctv-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .cam { min-height: 148px; }
  .cam-body { min-height: 118px; }
  .cam-look { min-height: 44px; padding: 12px 16px; font-size: 13px; bottom: 8px; }
  .wire-end, .choice-btn, .pen-btn, .btn-official, .nav button, #nav button {
    min-height: 44px; padding: 12px 14px; font-size: 13.5px;
  }
  .wire-ends { gap: 10px; }
  .elev-panel .elev-btn { min-width: 46px; min-height: 46px; }
  .sys-wrap { padding-left: 10px; padding-right: 10px; }
  #nav, .nav { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .desk-card, .dc-body { font-size: 14px; }
  .morse-line { display: block; margin-bottom: 8px; }
  .morse-str { word-break: break-all; }
}
@media (max-width: 480px) {
  .cctv-grid { grid-template-columns: 1fr !important; }
  h1, .sys-title { font-size: 20px; }
}

/* ============================================================
 * ABCD 追加层:铅笔字 / 第14条 / 结局档案卡 / 黄经理字条 / 监控雪花爆发 / 移动端
 * ============================================================ */

/* 档案重读时长出来的铅笔字:淡、细、像随手记在空白处 */
.pencil-note {
  display: block; margin: 10px 0 2px 14px;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 13px; line-height: 1.7; color: #8f8878;
  opacity: .82; transform: rotate(-.4deg);
  text-shadow: 0 0 1px rgba(0,0,0,.25);
}
.pencil-note::before { content: "✎ "; opacity: .5; font-size: 11px; }

/* 二周目守则背面折出来的第 14 条:旧纸色,像后补的一行 */
.rule-14 {
  margin-top: 14px; padding: 10px 14px;
  border: 1px dashed rgba(143,95,90,.55); border-radius: 2px;
  background: rgba(60,42,34,.28);
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  color: #a89a86; font-size: 14px; line-height: 1.8;
  transform: rotate(.3deg);
}
.rule-14 b { color: #b04a3e; font-weight: 600; }

/* 结局收集页渗出来的"???"槽 */
.el-row.seep {
  border-style: dotted; border-color: rgba(143,95,90,.5);
  background: rgba(50,30,28,.18);
}
.el-row.seep .el-name { color: #8f5f5a; letter-spacing: 3px; }
.el-row.seep .el-desc { color: #6f5a52; font-style: normal; }

/* ---------- 结局谢幕页:你的值班档案 ---------- */
.dossier {
  max-width: 620px; margin: 26px auto 6px; padding: 26px 30px 22px;
  background: #0c0e10; border: 1px solid rgba(190,175,145,.4);
  outline: 1px solid rgba(190,175,145,.15); outline-offset: 5px;
  color: #cfc7b5; font-size: 14px; line-height: 1.9;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.dossier .ds-head {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 24px; letter-spacing: 4px; color: #c9a24a;
  border-bottom: 1px solid rgba(201,162,74,.35); padding-bottom: 10px; margin-bottom: 14px;
}
.dossier .ds-head small {
  display: block; font-family: Consolas, monospace; font-size: 10px;
  letter-spacing: 3px; color: #6f6857; margin-top: 4px;
}
.dossier .ds-row { display: flex; gap: 14px; margin: 4px 0; }
.dossier .ds-row span {
  flex: 0 0 74px; color: #8f8878; font-size: 12px; letter-spacing: 2px;
  border-right: 1px solid rgba(190,175,145,.18); padding-top: 2px;
}
.dossier .ds-line { margin: 6px 0 6px 2px; padding-left: 12px; border-left: 2px solid rgba(143,95,90,.4); }
.dossier .ds-last {
  margin: 16px 0 4px; padding: 10px 14px;
  background: rgba(143,95,90,.12); border-left: 3px solid #8f5f5a;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif; color: #d8c9b2;
}
.dossier .ds-foot {
  margin-top: 16px; padding-top: 10px; border-top: 1px dashed rgba(190,175,145,.25);
  font-family: Consolas, monospace; font-size: 11px; color: #6f6857; letter-spacing: 1px;
}
.dossier #ds-png {
  margin-top: 14px; padding: 9px 18px; cursor: pointer;
  background: transparent; border: 1px solid rgba(201,162,74,.55); border-radius: 2px;
  color: #c9a24a; font-size: 13px; letter-spacing: 2px;
}
.dossier #ds-png:hover { background: rgba(201,162,74,.12); }

/* ---------- 黄经理留的字条(分层提示) ---------- */
.hx-hint {
  position: fixed; right: 22px; bottom: 26px; z-index: 60;
  width: 240px; transform: rotate(1.6deg);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.5));
  cursor: pointer; animation: hhIn .5s ease-out;
}
@keyframes hhIn { from { opacity: 0; transform: rotate(1.6deg) translateY(14px); } to { opacity: 1; } }
.hx-hint .hh-tape {
  width: 74px; height: 20px; margin: 0 auto -10px;
  background: rgba(210,200,170,.35); transform: rotate(-2deg);
}
.hx-hint .hh-body {
  background: #d8cfb4; color: #3a332a; padding: 18px 16px 12px;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
}
.hx-hint.lv2 .hh-body { background: #d3c3a4; }
.hx-hint .hh-head { font-size: 12px; color: #7a6a4e; margin-bottom: 8px; }
.hx-hint .hh-head small { color: #8f5f5a; }
.hx-hint .hh-text { font-size: 15px; line-height: 1.75; }
.hx-hint.lv2 .hh-text { color: #59322c; }
.hx-hint .hh-close { margin-top: 10px; font-size: 11px; color: #9a8a6c; text-align: right; }

/* ---------- 监控:雪花爆发 + 扫描线强化 ---------- */
.cam .cam-body::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.cam.snow-burst .cctv-static {
  opacity: .85; mix-blend-mode: screen;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.5) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 1px, transparent 1px 2px);
  animation: snowJump .12s steps(2) infinite;
}
.cam.snow-burst .cam-body .scene { filter: contrast(1.5) brightness(1.3) saturate(0); }
.cam.snow-burst::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(255,255,255,.28) 50%, transparent 58%);
  animation: rollBar .35s linear infinite;
}
@keyframes snowJump {
  0% { background-position: 0 0, 0 0; }
  50% { background-position: 3px 7px, -5px 2px; }
  100% { background-position: -4px -3px, 6px -6px; }
}
@keyframes rollBar { 0% { transform: translateY(-30%); } 100% { transform: translateY(30%); } }

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .sys-wrap { flex-direction: column; }
  .sidebar {
    width: 100%; min-width: 0; flex: 0 0 auto;
    border-right: none; border-bottom: 1px solid rgba(190,175,145,.18);
  }
  #nav { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #nav button { flex: 0 0 auto; white-space: nowrap; }
  .main { padding: 14px 14px 40px; }
  .dossier { padding: 18px 16px 16px; margin: 18px 0 4px; }
  .dossier .ds-head { font-size: 19px; letter-spacing: 2px; }
  .hx-hint { right: 10px; bottom: 12px; width: 200px; }
  .scene-box { max-width: 94vw; }
  .cam-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
 * 桌面一角:在走的表 + 轮巡小监控 / 监控闪人 / 披发女人
 * ============================================================ */
.desk-corner-body{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.desk-watch-wrap{flex:0 0 128px;text-align:center}
.desk-watch{width:128px}
.desk-watch-cap{margin-top:6px;font-size:11px;color:#8f8877;letter-spacing:1px}
.watch-svg{width:100%;height:auto;display:block;filter:drop-shadow(0 4px 10px rgba(0,0,0,.5))}
.w-case{fill:#19191b;stroke:#3a3a3e;stroke-width:2}
.w-face{fill:#0d0d0f;stroke:#2a2a2e;stroke-width:1}
.w-tick{stroke:#6a675c;stroke-width:1.2}
.w-tick.big{stroke:#9a958a;stroke-width:2}
.w-hand{stroke:#c9c2b2;stroke-linecap:round;transform-box:view-box;transform-origin:60px 60px;transition:transform .45s ease}
.w-h{stroke-width:3.4}
.w-m{stroke-width:2.2}
.w-s{stroke:#8a2a1a;stroke-width:1;transition:transform .95s linear}
.w-pin{fill:#8a2a1a}
.w-num{fill:#8f8877;font:10px ui-monospace,Consolas,monospace;text-anchor:middle;letter-spacing:1px}
.desk-cam{flex:1;min-width:230px;max-width:360px;border:1px solid #2a2d2a;background:#0a0b0a}
.desk-cam .cam-body{position:relative;height:132px;overflow:hidden}
.desk-cam .cam-body .scene{position:absolute;inset:0}
.desk-cam .cam-body .scene svg{width:100%;height:100%;display:block}
.desk-cam .cam-time{position:absolute;right:8px;bottom:6px;font:11px ui-monospace,Consolas,monospace;color:#8f9a8c;text-shadow:0 0 4px #000}

/* 监控闪人:出现过,又没了 */
.cam-body{position:relative}
.cam-presence{position:absolute;inset:0;pointer-events:none;z-index:3;animation:camPres .18s steps(2) 3}
.cam-presence svg{width:100%;height:100%;display:block}
@keyframes camPres{0%{opacity:0}50%{opacity:1}100%{opacity:.85}}
.cam-burst{animation:camBurst .3s steps(3)}
@keyframes camBurst{0%{filter:contrast(1.8) brightness(1.6)}60%{filter:contrast(2.2) brightness(.7)}100%{filter:none}}
.cam-afterstatic{animation:camAfter .42s steps(4)}
@keyframes camAfter{0%{filter:brightness(2) contrast(2.4)}100%{filter:none}}

/* 披发女人:缓慢地晃(内层 g,外层 g 负责定位,互不打架) */
.hx-woman-sway{animation:womanSway 4.6s ease-in-out infinite;transform-box:fill-box;transform-origin:50% 100%}
@keyframes womanSway{0%,100%{transform:rotate(-1.1deg)}50%{transform:rotate(1.3deg)}}

@media (prefers-reduced-motion: reduce){
  .hx-woman-sway,.cam-presence{animation:none !important}
}
