/* 《大佛麦克斯》样式表 · 阴天江雾水泥灰 × 建筑防尘网暗绿 × 护眼亮暗灰双主题 */
:root {
  --bg: #0b0f10;
  --surface: rgba(19, 25, 27, 0.90);
  --surface-deep: rgba(11, 15, 16, 0.95);
  --surface-hover: rgba(29, 38, 40, 0.96);
  --hairline: rgba(255, 255, 255, 0.075);
  --border: rgba(111, 163, 136, 0.26);
  --border-gold: rgba(207, 178, 119, 0.24);
  --text: #e3e2dc;
  --text-dim: #9fa6a1;
  --text-faint: #6b7470;
  --net: #43725c;
  --net-bright: #7cb89a;
  --gold: #cfb277;
  --crimson: #a8463a;
  --crimson-text: #df847a;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Inter", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, monospace;
}

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

html, body {
  background: radial-gradient(ellipse at 50% 0%, #172123 0%, #0b0f10 74%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.85;
}

/* 暗角与胶片扫描质感（与前两部保持家族统一） */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 88;
  background:
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 50% 45%, transparent 52%, rgba(0, 0, 0, 0.66) 100%);
}

#noise-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 87;
  opacity: 0.032;
  transition: opacity 0.2s;
}
body.glitch-flash #noise-canvas { opacity: 0.18; }
body.glitch-flash { animation: vhs-jitter 0.28s steps(2, end); }
body.bell-shake { animation: bell-thump 0.34s ease-out; }
body.comfort-mode.glitch-flash,
body.comfort-mode.bell-shake { animation: none !important; }
@keyframes vhs-jitter {
  0% { transform: translate(0, 0); }
  35% { transform: translate(-2px, 1px); }
  70% { transform: translate(2px, -1px); }
  100% { transform: translate(0, 0); }
}
@keyframes bell-thump {
  0% { transform: translate(0, 0); }
  30% { transform: translate(0, 2px); }
  65% { transform: translate(0, -1px); }
  100% { transform: translate(0, 0); }
}

/* 柔和暗灰护眼模式（与《大佛普罗》《大佛乌卓》完全一致） */
body.comfort-mode {
  --bg: #16191f;
  --surface: rgba(31, 35, 43, 0.95);
  --surface-deep: rgba(23, 27, 34, 0.96);
  --surface-hover: rgba(41, 46, 56, 0.98);
  --hairline: rgba(255, 255, 255, 0.1);
  --border: rgba(132, 186, 158, 0.32);
  --text: #f0ece3;
  --text-dim: #c6c5be;
  --text-faint: #989c98;
  --gold: #d8be84;
  --net-bright: #95d0b2;
  background: #16191f;
  color: var(--text);
}
body.comfort-mode #noise-canvas,
body.comfort-mode .vignette { display: none !important; }
body.comfort-mode .topbar {
  background: rgba(22, 25, 31, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body.comfort-mode .doc-card,
body.comfort-mode .board-card,
body.comfort-mode .modal-card,
body.comfort-mode .final-stage-box,
body.comfort-mode .wx-shell,
body.comfort-mode .memo-todo-box,
body.comfort-mode .memo-fold { background: rgba(28, 32, 40, 0.96); }
body.comfort-mode .notes-area { background: #14171d; }

/* ================= 顶栏 ================= */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 58px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(11, 15, 16, 0.96), rgba(11, 15, 16, 0));
  z-index: 60;
}
.deck-left { display: flex; align-items: center; gap: 16px; }
.brand-mark {
  display: flex; align-items: center; gap: 9px;
  color: var(--text); font-family: var(--font-serif);
  cursor: pointer; background: none; border: none;
  font-size: 16px; letter-spacing: 0.22em; white-space: nowrap;
}
.rec-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--net-bright);
  box-shadow: 0 0 10px rgba(124, 184, 154, 0.85);
  animation: blink 2.2s infinite; flex-shrink: 0;
}
@keyframes blink { 0%, 60% { opacity: 1; } 75%, 100% { opacity: 0.25; } }
.timecode { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.topbar-clock { cursor: pointer; user-select: none; }
.top-actions { display: flex; align-items: center; gap: 15px; }
.nav-link {
  background: none; border: none; color: var(--text-dim);
  font-size: 14px; font-family: var(--font-sans); letter-spacing: 0.08em;
  cursor: pointer; padding: 4px 2px; transition: color 0.2s; white-space: nowrap;
}
.nav-link:hover:not(:disabled) { color: var(--text); }
.nav-link.active { color: var(--net-bright); }
.nav-link.bell-ready { color: var(--gold); }
.nav-link.ready-pulse { color: var(--gold); position: relative; padding-right: 11px; }
.nav-link.ready-pulse::after {
  content: ''; position: absolute; top: 5px; right: 0; width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold); animation: blink 1.8s infinite;
}
.nav-link:disabled { opacity: 0.24; cursor: not-allowed; }

/* ================= 主容器与通用控件 ================= */
main {
  position: relative; z-index: 10; min-height: 100vh;
  padding: 84px 22px 76px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.view { display: none; width: 100%; max-width: 960px; margin: 0 auto; animation: fadeIn 0.48s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.input-row { width: 100%; display: flex; gap: 12px; align-items: center; }
.text-input {
  flex: 1; background: transparent; border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text); padding: 11px 4px; font-size: 16px;
  outline: none; font-family: var(--font-serif); letter-spacing: 0.1em;
}
.text-input::placeholder { color: var(--text-faint); font-size: 14.5px; }
.text-input:focus { border-bottom-color: var(--net-bright); }

.btn {
  background: rgba(255, 255, 255, 0.055); border: none; color: var(--text-dim);
  padding: 9px 16px; font-size: 14px; letter-spacing: 0.09em; border-radius: 2px;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); font-family: var(--font-sans);
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.11); color: var(--text); }
.btn-primary {
  background: rgba(111, 163, 136, 0.16); color: var(--net-bright);
  box-shadow: inset 0 0 0 1px rgba(124, 184, 154, 0.42);
}
.btn-primary:hover:not(:disabled) { background: rgba(111, 163, 136, 0.26); color: #b7e4cc; }
.btn-crimson {
  background: rgba(168, 70, 58, 0.2); color: #eda097;
  box-shadow: inset 0 0 0 1px rgba(168, 70, 58, 0.44);
}
.btn-crimson:hover:not(:disabled) { background: rgba(168, 70, 58, 0.32); color: #ffd0ca; }
.btn.toggled {
  background: rgba(207, 178, 119, 0.2); color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(207, 178, 119, 0.52);
}
.btn-sm { padding: 6px 12px; font-size: 13.5px; letter-spacing: 0.05em; }
.btn:disabled { opacity: 0.28; cursor: not-allowed; }

.feedback-line { min-height: 24px; font-size: 14.5px; font-family: var(--font-serif); color: var(--text-dim); margin-top: 10px; }
.feedback-line.error { color: var(--crimson-text); }
.feedback-line.success { color: var(--net-bright); }

.eyebrow { font-size: 12.5px; letter-spacing: 0.16em; color: var(--text-faint); margin-bottom: 6px; }
.page-title { font-family: var(--font-serif); font-size: 26px; font-weight: 400; letter-spacing: 0.16em; color: var(--text); }
.prose-lead { font-family: var(--font-serif); color: var(--text-dim); font-size: 15.5px; margin-bottom: 20px; line-height: 2; }
.mono-tag { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); }

.detail-panel {
  background: var(--surface); border-radius: 2px; padding: 26px 30px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.back-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); gap: 12px;
}
.section-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

.doc-card {
  background: var(--surface-deep); border: 1px solid var(--hairline);
  border-radius: 2px; padding: 14px 16px;
}
.doc-card img {
  width: 100%; display: block; border-radius: 2px; border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0e0f;
}
.zoomable-img { cursor: zoom-in; transition: filter 0.2s; }
.zoomable-img:hover { filter: brightness(1.08); }
.doc-caption { margin-top: 11px; font-size: 14px; color: var(--text-dim); line-height: 1.82; }
.doc-caption strong { color: var(--text); font-weight: 500; }

.film-note {
  display: none; margin-top: 20px; padding: 14px 4px 2px;
  border-top: 1px solid var(--hairline); font-family: var(--font-serif);
  font-size: 15px; color: #dcdbd3; line-height: 1.95;
}
.film-note.visible { display: block; animation: fadeIn 0.45s ease; }
.film-note-lead {
  display: block; font-size: 12.5px; letter-spacing: 0.16em;
  color: var(--net-bright); margin-bottom: 6px; font-family: var(--font-sans);
}

/* ================= 封面 ================= */
.home-layout { display: grid; grid-template-columns: 1.14fr 0.86fr; gap: 44px; align-items: center; }
.photo-plate {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: #06090a; overflow: hidden; border-radius: 2px;
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.88), inset 0 0 0 1px rgba(124, 184, 154, 0.16);
}
.photo-plate img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: brightness(0.76) contrast(1.08) saturate(0.84);
}
#home-net-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.45;
}
.home-copy-col { display: flex; flex-direction: column; align-items: center; text-align: center; }
.vertical-poetry {
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--font-serif); font-size: 18.5px; letter-spacing: 0.28em; line-height: 2.3;
  color: var(--text); margin: 0 auto 30px; min-height: 255px; text-align: left;
}
.vertical-poetry .poetry-gap { margin-right: 20px; }

/* ================= 工作台桌面 ================= */
.search-strip {
  background: var(--surface); padding: 20px 24px; border-radius: 2px; margin-bottom: 24px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.55);
}
.archive-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 22px; }
.archive-card {
  background: var(--surface); border: none; border-radius: 2px; padding: 22px;
  text-align: left; cursor: pointer; transition: transform 0.22s, background 0.22s, box-shadow 0.22s;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 138px;
  color: var(--text-dim); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.archive-card:hover {
  background: var(--surface-hover); color: var(--text); transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(124, 184, 154, 0.38);
}
.archive-card.crimson-card { background: linear-gradient(155deg, rgba(168, 70, 58, 0.2), rgba(19, 25, 27, 0.94)); }
.archive-card.ready-card { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), inset 0 0 0 1px rgba(124, 184, 154, 0.52); }
@keyframes cardPulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 184, 154, 0.72), inset 0 0 0 1px var(--net-bright); }
  70% { box-shadow: 0 0 0 10px rgba(124, 184, 154, 0), inset 0 0 0 1px var(--net-bright); }
  100% { box-shadow: 0 0 0 0 rgba(124, 184, 154, 0); }
}
.archive-card.just-found { animation: cardPulse 1.1s ease 2; }
.card-meta { font-size: 12.5px; letter-spacing: 0.14em; color: var(--text-faint); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.card-flag-done { color: var(--net-bright); }
.card-flag-pending { color: var(--text-faint); }
.card-flag-ready { color: var(--gold); font-weight: 600; }
.card-title { font-family: var(--font-serif); font-size: 19px; letter-spacing: 0.1em; color: var(--text); margin-bottom: 5px; }
.card-sub { font-size: 13.5px; color: var(--text-dim); }
.hub-footer { font-size: 13px; color: var(--text-faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ================= 档 00：14 秒视频 + 2016 微信群 ================= */
.video-frame-box { margin-bottom: 20px; border: 1px solid var(--hairline); border-radius: 2px; overflow: hidden; background: #060809; }
.vf-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #050708; }
.vf-stage img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter 0.35s ease, transform 0.4s ease; }
.vf-osd-top {
  position: absolute; top: 10px; left: 12px; right: 12px;
  display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px;
  color: rgba(240, 240, 234, 0.9); text-shadow: 0 1px 4px #000;
}
.vf-caption {
  position: absolute; left: 12px; right: 12px; bottom: 10px;
  background: rgba(6, 9, 10, 0.82); border-left: 2px solid var(--gold);
  padding: 7px 12px; font-family: var(--font-serif); font-size: 14.5px; color: #f0ece3;
}
.scrubber-bar {
  background: var(--surface-deep); padding: 10px 14px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.scrubber-bar input[type="range"] { flex: 1; min-width: 150px; accent-color: var(--net-bright); cursor: pointer; }
.vf-stops { display: flex; gap: 6px; flex-wrap: wrap; }

.wx-shell { background: var(--surface-deep); border: 1px solid var(--hairline); border-radius: 2px; margin-bottom: 16px; overflow: hidden; }
.wx-head {
  padding: 10px 16px; background: rgba(67, 114, 92, 0.14); border-bottom: 1px solid var(--hairline);
  display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text);
}
.wx-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.wx-meta { font-size: 12.5px; color: var(--text-faint); margin-bottom: 4px; display: flex; gap: 10px; }
.wx-meta b { color: var(--net-bright); font-weight: 500; }
.wx-bubble {
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--hairline);
  padding: 10px 14px; border-radius: 4px; font-size: 14.5px; color: var(--text); line-height: 1.75;
}
.wx-bubble-alert { border-left: 2px solid var(--gold); background: rgba(207, 178, 119, 0.08); }
.wx-sticker {
  display: inline-block; padding: 2px 8px; margin-right: 6px; font-size: 12.5px;
  background: rgba(207, 178, 119, 0.14); color: var(--gold); border-radius: 2px;
}
.wx-voice-bar {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; margin-bottom: 8px;
  background: rgba(67, 114, 92, 0.24); border: 1px solid rgba(124, 184, 154, 0.42);
  border-radius: 3px; cursor: pointer; font-size: 13px; color: #d9f0e4; transition: background 0.2s;
}
.wx-voice-bar:hover { background: rgba(67, 114, 92, 0.38); }
.wx-voice-bar.playing { border-color: var(--gold); color: var(--gold); }
.voice-icon { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.06em; }
.voice-state { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); margin-left: 4px; }
.wx-stt { font-size: 14px; color: var(--text-dim); padding-top: 6px; border-top: 1px dashed var(--hairline); }
.stt-label { font-size: 12px; color: var(--text-faint); margin-right: 4px; }
.stt-word {
  background: rgba(124, 184, 154, 0.16); border: none; border-bottom: 1.5px dashed var(--net-bright);
  color: #a6dfc1; padding: 0 5px; margin: 0 2px; cursor: pointer; font-size: 14.5px; font-family: inherit;
}
.stt-word:hover { background: rgba(124, 184, 154, 0.3); }
.stt-word.fixed { background: rgba(207, 178, 119, 0.18); border-bottom: 1.5px solid var(--gold); color: var(--gold); cursor: default; }

.stt-panel { background: var(--surface-deep); border: 1px solid var(--border); padding: 14px 16px; border-radius: 2px; }
.stt-options { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ================= 档 01：3D 效果图 ↔ 烂尾实地滑块 & 罗盘 ================= */
.compare-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 2px; border: 1px solid var(--border); background: #070a0b; user-select: none;
}
.compare-real, .compare-render { width: 100%; height: 100%; object-fit: cover; display: block; }
.compare-top-wrap { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 18% 0 0); }
.compare-divider {
  position: absolute; top: 0; bottom: 0; left: 82%; width: 2px;
  background: var(--gold); box-shadow: 0 0 12px rgba(207, 178, 119, 0.85); pointer-events: none;
}
.compare-divider span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(11, 15, 16, 0.9); color: var(--gold); font-size: 12px;
  padding: 4px 8px; border: 1px solid var(--gold); white-space: nowrap; border-radius: 2px;
}
.compare-tag-l, .compare-tag-r {
  position: absolute; bottom: 10px; font-size: 12px; padding: 3px 9px;
  background: rgba(8, 11, 12, 0.78); border-radius: 2px; pointer-events: none;
}
.compare-tag-l { left: 10px; color: var(--gold); border-left: 2px solid var(--gold); }
.compare-tag-r { right: 10px; color: var(--net-bright); border-right: 2px solid var(--net-bright); }
.compass-svg { width: 100%; max-width: 260px; display: block; margin: 0 auto; }
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 18px 0 14px; }

/* ================= 档 02：无人机强光降曝去抖 ================= */
.drone-stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  background: #050708; border: 1px solid var(--hairline); border-radius: 2px;
}
.drone-stage img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: brightness(2.05) contrast(0.74) blur(3.5px);
  transform: rotate(11deg) scale(1.16);
  transition: filter 0.15s, transform 0.15s;
}
.drone-hotspot {
  position: absolute; left: 48%; top: 48%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(11, 15, 16, 0.7); border: 2px solid var(--gold); color: var(--gold);
  font-size: 18px; cursor: pointer; display: none; align-items: center; justify-content: center;
  animation: ringPulse 2s infinite;
}
.drone-hotspot.visible { display: flex; }
@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(207, 178, 119, 0.65); }
  70% { box-shadow: 0 0 0 12px rgba(207, 178, 119, 0); }
  100% { box-shadow: 0 0 0 0 rgba(207, 178, 119, 0); }
}
.slider-pair { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.slider-pair label { display: grid; grid-template-columns: 74px 42px 1fr; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.slider-pair input[type="range"] { accent-color: var(--gold); cursor: pointer; }

/* ================= 档 03：农网电表 & 工具间门帘 ================= */
.chart-panel { background: var(--surface-deep); border: 1px solid var(--hairline); border-radius: 2px; padding: 16px; margin-bottom: 16px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--text); margin-bottom: 14px; }
.bar-chart { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; align-items: end; height: 150px; padding-top: 14px; border-bottom: 1px solid var(--hairline); }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; background: none; border: none; color: var(--text-dim); height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; max-width: 34px; background: rgba(111, 163, 136, 0.35); border-top: 2px solid var(--net-bright); transition: background 0.2s; }
.bar-col:hover .bar-fill { background: rgba(111, 163, 136, 0.58); }
.bar-col.high .bar-fill { background: rgba(207, 178, 119, 0.42); border-top-color: var(--gold); }
.bar-col.picked .bar-fill { background: rgba(168, 70, 58, 0.65); border-top-color: #ef9d93; }
.bar-val { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.bar-lbl { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); }
.night-curve-box { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--hairline); }
#night-power-canvas { width: 100%; height: 84px; display: block; background: #080b0c; border-radius: 2px; }
.power-legend { margin-top: 8px; font-size: 12.5px; color: var(--text-faint); font-family: var(--font-mono); }
.quiz-row { display: flex; gap: 10px; flex-wrap: wrap; }
.curtain-reveal { display: none; animation: fadeIn 0.45s ease; }
.curtain-reveal.open { display: block; }
.clipping-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 8px; }
.clipping-text {
  background: rgba(255, 255, 255, 0.03); border-left: 2px solid var(--gold);
  padding: 10px 12px; font-family: var(--font-serif); font-size: 14px; color: var(--text-dim); line-height: 1.85;
}

/* ================= 档 04：进水老人机擦拭显影 + 短信 + 语音 ================= */
.wipe-box {
  position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 2px; border: 1px solid var(--hairline); background: #0c1011;
  cursor: crosshair; touch-action: none; user-select: none;
}
.wipe-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wipe-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sms-pool { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.sms-card {
  text-align: left; background: var(--surface-deep); border: 1px solid var(--hairline);
  padding: 12px; border-radius: 2px; color: var(--text-dim); cursor: pointer; font-size: 13.5px; line-height: 1.65;
  font-family: var(--font-serif); transition: all 0.2s;
}
.sms-card:hover { border-color: var(--net-bright); color: var(--text); }
.sms-card.picked { border-color: var(--gold); background: rgba(207, 178, 119, 0.14); color: var(--text); }
.sms-order-bar { font-size: 13.5px; color: var(--gold); font-family: var(--font-mono); }

.audio-deck {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface-deep); border: 1px solid var(--border); padding: 12px 16px; border-radius: 2px;
}
.audio-progress-wrap { flex: 1; min-width: 140px; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; }
.audio-progress-bar { width: 0%; height: 100%; background: var(--net-bright); transition: width 0.15s linear; }
.transcript-box {
  display: none; margin-top: 12px; padding: 14px 16px; background: rgba(11, 15, 16, 0.86);
  border-left: 2px solid var(--net-bright); font-family: var(--font-serif); font-size: 15px; color: var(--text); line-height: 1.95;
}
.transcript-box.open { display: block; animation: fadeIn 0.4s ease; }
.transcript-box p { margin-bottom: 8px; }
.transcript-box p:last-child { margin-bottom: 0; }

/* ================= 档 05：21:9 佛腹全景巡检 + 频谱对比 ================= */
.pano-viewport {
  width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 2px;
  background: #06090a; cursor: grab; margin-bottom: 12px;
}
.pano-viewport:active { cursor: grabbing; }
.pano-inner { position: relative; width: 155%; min-width: 900px; aspect-ratio: 21 / 9; }
.pano-inner img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pano-pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(11, 15, 16, 0.78); border: 1.8px solid var(--gold); color: var(--gold);
  font-family: var(--font-mono); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; animation: ringPulse 2.3s infinite;
}
.pano-pin.found { border-color: var(--net-bright); color: var(--net-bright); background: rgba(67, 114, 92, 0.35); animation: none; }
.spot-readout {
  padding: 11px 14px; border-left: 2px solid var(--net-bright);
  background: var(--surface-deep); font-size: 14.5px; color: var(--text-dim);
}
.spot-readout strong { color: var(--net-bright); font-weight: 500; }
.spec-box { background: var(--surface-deep); border: 1px solid var(--hairline); padding: 14px 16px; border-radius: 2px; }
#spec-canvas { width: 100%; height: 120px; display: block; background: #070a0b; border-radius: 2px; }

/* ================= 杂档 A / B / C ================= */
.paper-quote {
  background: rgba(255, 255, 255, 0.03); border: 1px dashed rgba(207, 178, 119, 0.3);
  padding: 14px 16px; font-family: var(--font-serif); font-size: 14.5px; color: var(--text-dim); line-height: 1.9;
}
.overlay-map-box { border: 1px solid var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 14px; }
.overlay-svg { width: 100%; height: auto; display: block; }
.slider-triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.slider-triple label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.slider-triple input[type="range"] { accent-color: var(--net-bright); cursor: pointer; }

/* ================= 人物关系板与伪结案 ================= */
.board-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 14px 0 18px; }
.board-card {
  border: 1px solid var(--border); background: var(--surface-deep);
  padding: 14px; border-radius: 2px;
}
.board-card.locked { border-color: #a8463a; background: rgba(168, 70, 58, 0.12); }
.board-name { font-family: var(--font-serif); font-size: 17px; color: var(--gold); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.board-select {
  width: 100%; padding: 8px 10px; background: #0d1213; color: var(--text);
  border: 1px solid var(--border); font-size: 14px; font-family: inherit;
}
.board-clue-badge { font-size: 12px; color: var(--text-faint); margin-top: 7px; line-height: 1.5; }
.board-clue-badge.ready { color: var(--net-bright); }
.false-ending-box {
  display: none; margin-top: 16px; padding: 14px 16px;
  background: rgba(168, 70, 58, 0.16); border: 1px solid rgba(223, 132, 122, 0.5);
  border-radius: 2px; font-family: var(--font-serif); font-size: 14.5px; color: #f4d6d2; line-height: 1.9;
}
.false-ending-box.visible { display: block; animation: fadeIn 0.4s ease; }

/* ================= 终章：3D 四层幻象剥离 + 头条签发 ================= */
.final-stage-box {
  background: var(--surface-deep); border: 1px solid var(--border);
  border-radius: 2px; padding: 18px 20px; margin-bottom: 18px;
}
.peel-preview {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 2px; border: 1px solid var(--hairline); background: #070a0b; margin-bottom: 12px;
}
.peel-real, .peel-gold { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.6s ease; }
.peel-layer-net {
  position: absolute; inset: 0; pointer-events: none; transition: opacity 0.6s ease;
  background:
    repeating-linear-gradient(45deg, rgba(61, 107, 87, 0.28) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(61, 107, 87, 0.24) 0 2px, transparent 2px 7px);
}
.peel-layer-aura {
  position: absolute; inset: 0; pointer-events: none; transition: opacity 0.6s ease;
  background: radial-gradient(circle at 50% 35%, rgba(255, 224, 128, 0.42), rgba(207, 178, 119, 0.08) 56%, transparent 80%);
  mix-blend-mode: screen;
}
.peel-layer-slogan {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); text-align: center;
  pointer-events: none; transition: opacity 0.5s ease;
  background: linear-gradient(90deg, rgba(148, 34, 26, 0.9), rgba(182, 54, 34, 0.92), rgba(148, 34, 26, 0.9));
  border: 1px solid rgba(255, 226, 138, 0.65); padding: 6px 22px; border-radius: 2px;
  display: flex; flex-direction: column; gap: 1px; white-space: nowrap;
}
.peel-layer-slogan span {
  font-family: var(--font-serif); font-size: 18px; font-weight: 700; letter-spacing: 0.16em;
  color: #ffe694; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}
.peel-layer-slogan small { font-size: 12px; color: #fff0c2; letter-spacing: 0.18em; }
.peel-hidden { opacity: 0 !important; }
.layer-toggles { display: flex; gap: 8px; flex-wrap: wrap; }

.za-opts { display: flex; flex-direction: column; gap: 8px; }
.za-opts .btn { text-align: left; white-space: normal; line-height: 1.6; padding: 9px 12px; }
.fin-slots { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 10px; }
.fin-slot {
  padding: 11px 14px; background: rgba(9, 13, 14, 0.85); border-left: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.fin-slot.active-slot { border-left-color: var(--gold); background: rgba(207, 178, 119, 0.12); }
.fin-slot.filled { border-left-color: var(--net-bright); }
.fin-pool { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fin-chip {
  text-align: left; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--hairline);
  padding: 9px 12px; border-radius: 2px; color: var(--text-dim); cursor: pointer;
  font-size: 13.5px; line-height: 1.55; font-family: var(--font-serif); transition: all 0.2s;
}
.fin-chip:hover { border-color: var(--net-bright); color: var(--text); }
.fin-chip.used { border-color: var(--gold); background: rgba(207, 178, 119, 0.14); color: var(--gold); }

.proofread-box { font-family: var(--font-serif); font-size: 16px; line-height: 2.2; color: var(--text); }
.inline-sel {
  background: #12181a; color: var(--gold); border: 1px solid var(--gold);
  padding: 3px 8px; font-size: 14.5px; font-family: var(--font-serif); border-radius: 2px; margin: 0 4px;
}
.ending-dock { display: none; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(207, 178, 119, 0.35); }
.ending-dock.visible { display: block; animation: fadeIn 0.5s ease; }
.end-choice {
  display: block; width: 100%; text-align: left; background: var(--surface-deep);
  border: none; padding: 14px 18px; margin-top: 10px; border-radius: 2px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(207, 178, 119, 0.24); transition: all 0.2s;
}
.end-choice:hover, .end-choice.chosen {
  background: rgba(111, 163, 136, 0.16); box-shadow: inset 0 0 0 1px var(--net-bright);
}
.ec-title { font-family: var(--font-serif); font-size: 17px; color: var(--gold); margin-bottom: 3px; }
.ec-sub { font-size: 14px; color: var(--text-dim); }
.final-result-card {
  margin-top: 18px; padding: 18px 20px; background: rgba(10, 14, 15, 0.84);
  border: 1px solid var(--border); border-radius: 2px; animation: fadeIn 0.45s ease;
}
.ending-prose { font-family: var(--font-serif); font-size: 16px; line-height: 2.05; color: var(--text); margin: 12px 0 16px; }
.ending-prose p { margin-bottom: 12px; text-indent: 2em; }
.receipt-box {
  padding: 12px 15px; border: 1px dashed rgba(124, 184, 154, 0.45);
  background: rgba(8, 11, 12, 0.72); font-family: var(--font-mono); font-size: 13px; color: var(--text-dim);
}
.deep-stamp {
  display: inline-block; margin-top: 10px; padding: 4px 12px; border: 2px double #c9473d;
  color: #e86b61; font-family: var(--font-serif); font-size: 15px; font-weight: 700;
  letter-spacing: 0.14em; transform: rotate(-2deg);
}

/* ================= 全屏 2.39:1 电影剧场：【终幕演绎 · 飞离雁江】 ================= */
.cinema-overlay {
  position: fixed; inset: 0; background: #030405; z-index: 200;
  display: none; flex-direction: column; align-items: center; justify-content: center; padding: 20px;
}
.cinema-overlay.open { display: flex; animation: fadeIn 0.6s ease; }
.cinema-bar-top {
  position: fixed; top: 16px; left: 24px; right: 24px; z-index: 210;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.cinema-frame {
  position: relative; width: 100%; max-width: 1120px; aspect-ratio: 21 / 9;
  background: #060809; overflow: hidden; border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 30px 90px #000;
}
.cinema-scene {
  position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 1.1s ease;
}
.cinema-scene.active { opacity: 1; pointer-events: auto; }
.cinema-scene > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.launch-bg { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.76) saturate(0.75) contrast(1.06); }
.launch-buddha-wrap {
  position: absolute; left: 50%; bottom: -8%; width: 22%; min-width: 150px;
  transform: translate(-50%, 0); transition: transform 13s cubic-bezier(0.28, 0.04, 0.32, 1);
  display: flex; flex-direction: column; align-items: center; z-index: 4;
}
.launch-buddha-wrap.lifting {
  transform: translate(-50%, -225%) rotate(-2.5deg);
}
.launch-buddha-img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.75)) contrast(1.05);
}
.launch-flame {
  width: 34%; height: 78px; margin-top: -14px; border-radius: 50% 50% 40% 40%;
  background: radial-gradient(ellipse at 50% 10%, rgba(255, 240, 195, 0.92), rgba(235, 118, 46, 0.72) 48%, rgba(168, 70, 58, 0) 82%);
  filter: blur(5px); opacity: 0; transition: opacity 1.2s ease;
  animation: flameFlicker 0.16s infinite alternate;
}
.launch-buddha-wrap.lifting .launch-flame { opacity: 0.92; }
@keyframes flameFlicker {
  from { transform: scaleY(0.92) scaleX(0.96); }
  to { transform: scaleY(1.12) scaleX(1.04); }
}
#launch-fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

#scene-credits {
  background: radial-gradient(ellipse at 50% 25%, #12181a 0%, #050708 80%);
  display: flex; align-items: flex-start; justify-content: center; overflow: hidden;
}
.credits-roller {
  text-align: center; padding: 62% 24px 80px; width: 100%; max-width: 620px;
  font-family: var(--font-serif); color: var(--text);
}
.credits-roller.rolling { animation: rollUp 68s linear forwards; }
@keyframes rollUp {
  from { transform: translateY(0); }
  to { transform: translateY(-88%); }
}
.cr-kicker { font-size: 13px; letter-spacing: 0.3em; color: var(--net-bright); margin-bottom: 10px; }
.cr-title { font-size: 32px; letter-spacing: 0.34em; color: var(--gold); margin-bottom: 8px; }
.cr-sub { font-size: 13.5px; color: var(--text-faint); letter-spacing: 0.16em; margin-bottom: 34px; }
.cr-song { font-size: 15px; color: var(--net-bright); margin-bottom: 20px; letter-spacing: 0.16em; }
.cr-lyrics p { font-size: 15.5px; line-height: 2.2; color: #dddad1; margin-bottom: 22px; }
.cr-staff { margin-top: 34px; font-size: 14px; color: var(--text-dim); line-height: 2.1; letter-spacing: 0.14em; }

.cinema-subtitle {
  position: absolute; left: 24px; right: 24px; bottom: 20px; z-index: 12;
  text-align: center; font-family: var(--font-serif); font-size: 19px; letter-spacing: 0.16em;
  color: #f6f1e6; text-shadow: 0 2px 8px #000, 0 0 18px #000;
  opacity: 0; transition: opacity 0.6s ease; pointer-events: none;
}
.cinema-subtitle.show { opacity: 1; }

/* ================= 通用弹窗、备忘与电影字幕吐司 ================= */
.toast {
  position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%) translateY(6px);
  max-width: 84vw; text-align: center; color: #f3ede0; font-family: var(--font-serif);
  font-size: 18px; letter-spacing: 0.16em; opacity: 0; pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease; z-index: 120;
  text-shadow: 0 2px 6px #000, 0 0 16px #000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(3, 5, 6, 0.86); backdrop-filter: blur(6px);
  z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  width: 100%; max-width: 580px; max-height: 86vh; overflow-y: auto;
  background: #121719; border: 1px solid var(--border); border-radius: 2px;
  padding: 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.modal-title { font-family: var(--font-serif); font-size: 19px; color: var(--gold); letter-spacing: 0.12em; }
.notes-area {
  width: 100%; min-height: 210px; background: #080c0d; border: none; color: var(--text);
  padding: 14px; font-size: 15px; line-height: 1.8; border-radius: 2px; outline: none; font-family: var(--font-serif);
}
.memo-progress-strip {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; padding: 9px 11px;
  background: rgba(111, 163, 136, 0.09); border: 1px dashed rgba(124, 184, 154, 0.34);
  font-size: 12.5px; color: var(--text-dim); font-family: var(--font-mono);
}
.memo-todo-box { margin-bottom: 12px; padding: 10px 12px; background: rgba(19, 25, 27, 0.72); border: 1px solid var(--border); }
.memo-todo-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.memo-todo-chip { background: rgba(111, 163, 136, 0.14); border: 1px solid var(--border); color: var(--net-bright); font-size: 12.5px; padding: 4px 10px; cursor: pointer; }
.memo-fold { border: 1px solid var(--border); background: rgba(12, 16, 17, 0.65); margin-bottom: 10px; }
.memo-fold summary { padding: 10px 13px; cursor: pointer; font-family: var(--font-serif); font-size: 14.5px; color: var(--gold); list-style: none; }
.memo-fold summary::-webkit-details-marker { display: none; }
.memo-fold-body { padding: 10px 13px 12px; font-size: 14px; line-height: 1.8; color: var(--text); border-top: 1px dashed rgba(124, 184, 154, 0.24); }

.lightbox-wrap { max-width: 90vw; max-height: 90vh; text-align: center; }
.lightbox-wrap img { max-width: 100%; max-height: 76vh; border: 1px solid var(--border); border-radius: 2px; display: block; margin: 0 auto; }
.lightbox-cap { margin-top: 10px; font-family: var(--font-serif); font-size: 14.5px; color: var(--text-dim); }

/* ================= 响应式适配 ================= */
@media (max-width: 960px) {
  .topbar { height: auto; min-height: 52px; padding: 8px 14px; gap: 6px 10px; flex-wrap: wrap; background: rgba(11, 15, 16, 0.96); }
  .deck-left { width: 100%; justify-content: space-between; }
  .top-actions { width: 100%; justify-content: flex-start; overflow-x: auto; gap: 10px; padding-bottom: 2px; }
  main { padding-top: 104px; }
  .cinema-frame { aspect-ratio: 16 / 9; }
}
@media (max-width: 760px) {
  .home-layout, .archive-list, .two-col-grid, .board-grid, .calc-row, .sms-pool, .slider-triple { grid-template-columns: 1fr; }
  .vertical-poetry { writing-mode: horizontal-tb; min-height: auto; letter-spacing: 0.1em; line-height: 2; }
  .vertical-poetry .poetry-gap { margin-right: 0; margin-top: 8px; }
  .detail-panel { padding: 18px; }
  .bar-chart { gap: 4px; }
  .toast, .cinema-subtitle { font-size: 15px; letter-spacing: 0.08em; }
}
