/* ==========================================================================
   base.css — 黑金主题基础 / 全局 HUD / 特效层
   ========================================================================== */

:root {
  --gold: #d4af37;
  --gold-lt: #f0d878;
  --gold-dk: #8a6d1f;
  --ink: #05060a;
  --ink-2: #0b0d13;
  --paper: #f5f1e6;
  --text: #e9e6dd;
  --text-dim: #8b8f9a;
  --ok: #4caf7d;
  --warn: #e0a63a;
  --danger: #e05a5a;
  --hud-bg: rgba(8, 10, 15, 0.55);
  --hud-bd: rgba(212, 175, 55, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
               "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  /* 黑金渐变底纹 */
  background:
    radial-gradient(circle at 20% 10%, rgba(212, 175, 55, 0.07), transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(212, 175, 55, 0.05), transparent 50%),
    linear-gradient(160deg, #05060a 0%, #0a0c12 45%, #05060a 100%);
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); }
::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.65); }

/* ============================================================ 启动动画层 */
#bootscreen {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #10131c 0%, #05060a 70%);
  transition: opacity 0.35s ease, visibility 0.35s;
}
#bootscreen.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-inner { text-align: center; transform: translateY(-2vh); }

.boot-logo {
  width: 96px; height: 96px; object-fit: contain;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.5));
  animation: bootLogo 1.6s ease both;
}
/* 载入页里的特效视频 / LOGO 视频（后台「媒体与时长」里设置） */
.boot-video {
  display: block;
  width: auto;
  max-width: min(560px, 82vw);
  max-height: 42vh;
  margin: 0 auto 18px;
  border-radius: 14px;
  background: #000;
  object-fit: contain;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55), 0 0 34px rgba(212, 175, 55, 0.28);
  animation: bootLogo 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.boot-video[hidden], .boot-logo[hidden] { display: none !important; }
@keyframes bootLogo {
  from { opacity: 0; transform: scale(0.6) rotate(-12deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.boot-title {
  font-size: clamp(30px, 5.2vw, 68px);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  filter: drop-shadow(0 3px 16px rgba(212, 175, 55, 0.35));
  animation: bootTitle 1.1s 0.25s ease both;
  color: #f0c74a;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 -1px 0 rgba(120, 84, 8, 0.45),
    0 0 22px rgba(255, 200, 70, 0.32);
}
@keyframes bootTitle {
  from { opacity: 0; letter-spacing: 0.6em; filter: blur(10px); }
  to   { opacity: 1; }
}

.boot-sub {
  margin-top: 14px;
  font-size: clamp(13px, 1.5vw, 20px);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--gold);
  opacity: 0.85;
  animation: fadeUp 1s 0.7s ease both;
}

.boot-bar {
  width: min(360px, 62vw);
  height: 6px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.boot-bar i {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-dk), var(--gold), var(--gold-lt));
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.8);
  transition: width 0.28s ease-out;
}

/* ---------- 载入页：转圈 + 来回穿梭条 + 进度 ---------- */
.boot-load {
  margin-top: 30px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.boot-load.off { opacity: 0; transform: translateY(-8px); pointer-events: none; }

.boot-spin {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 34px;
  margin-bottom: 14px;
}
.boot-spin i {
  display: block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.75);
  animation: bootPulse 1.1s ease-in-out infinite;
}
.boot-spin i:nth-child(2) { animation-delay: 0.16s; background: var(--gold-lt); }
.boot-spin i:nth-child(3) { animation-delay: 0.32s; }
@keyframes bootPulse {
  0%, 100% { transform: translateY(0) scale(0.85); opacity: 0.45; }
  50%      { transform: translateY(-14px) scale(1.15); opacity: 1; }
}

/* 从左到右、再从右到左的穿梭条 */
.boot-shuttle {
  position: relative;
  width: min(360px, 62vw);
  height: 3px;
  margin: 0 auto 12px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
}
.boot-shuttle i {
  position: absolute;
  top: 0; left: 0;
  width: 38%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0), var(--gold-lt), rgba(212, 175, 55, 0));
  animation: bootShuttle 1.9s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}
@keyframes bootShuttle {
  from { transform: translateX(-10%); }
  to   { transform: translateX(165%); }
}

.boot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(360px, 62vw);
  margin: 12px auto 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
}
.boot-line { color: var(--text-dim); }
.boot-pct { color: var(--gold); font-variant-numeric: tabular-nums; }

/* ---------- 载入完成的彩蛋 ---------- */
.boot-prank {
  display: none;
  margin-top: 26px;
  animation: prankIn 0.6s cubic-bezier(0.2, 1.4, 0.35, 1) both;
}
.boot-prank.on { display: block; }
.boot-prank-ico { font-size: 34px; animation: prankPop 1.1s ease-in-out infinite; }
.boot-prank-txt {
  margin-top: 10px;
  font-size: clamp(20px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: 0.1em;
  filter: drop-shadow(0 2px 14px rgba(212, 175, 55, 0.4));
  color: #f0c74a;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 -1px 0 rgba(120, 84, 8, 0.45),
    0 0 22px rgba(255, 200, 70, 0.32);
}
.boot-prank-sub {
  margin-top: 8px;
  font-size: clamp(14px, 1.7vw, 20px);
  color: #e8dcc0;
  letter-spacing: 0.08em;
}
.boot-prank-sub b { color: var(--gold-lt); }
.boot-prank-go {
  margin-top: 14px;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  color: var(--text-dim);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes prankIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes prankPop {
  0%, 100% { transform: scale(1) rotate(-6deg); }
  50%      { transform: scale(1.18) rotate(8deg); }
}

.boot-hint {
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.16em;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.95; } }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================ 舞台 */
#stage {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
}
.chapter-root {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

/* ============================================================ 黑场过渡 */
#veil {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 800;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
  pointer-events: none;
}
#veil.on { opacity: 1; visibility: visible; }

/* ============================================================ 系统状态悬浮窗 */
#sysstatus {
  position: fixed;
  top: -320px;
  left: 50%;
  /* 开屏遮罩 #bootscreen 的 z-index 是 900，这里必须压过它，
     否则系统通知弹窗被遮罩盖住 —— 用户反馈的「PC 端弹窗显示不正常 / 有的浏览器没有弹窗」就是这个 */
  z-index: 960;
  pointer-events: none;   /* 纯展示：绝不能挡住「点一下继续」的点击 */
  /* ★ 宽度不能再用 min()：360 浏览器兼容模式、老版安卓自带浏览器都不支持 CSS min()，
     整条声明会被直接丢弃 → 面板退化成「内容宽度」，代码一长就窜出屏幕外。
     改成「定宽 + max-width」两段式，所有浏览器都认。 */
  width: 500px;
  max-width: 92vw;
  padding: 0;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(7, 12, 20, 0.985), rgba(3, 6, 11, 0.99));
  border: 1px solid rgba(95, 224, 208, 0.30);
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(95, 224, 208, 0.10) inset,
              0 20px 60px rgba(0, 0, 0, 0.78),
              0 0 40px rgba(95, 224, 208, 0.13);
  transition: top 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  font-size: 13px;
  overflow: hidden;
}
#sysstatus.on { top: 22px; }

.ss-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.2em;
  color: var(--gold);
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.16);
}
.ss-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.ss-row {
  display: flex; justify-content: space-between;
  padding: 4px 0; color: var(--text-dim);
}
.ss-row b { color: var(--text); font-weight: 500; font-family: ui-monospace, Menlo, Consolas, monospace; }

.ss-line { margin-top: 10px; font-size: 12px; color: var(--gold-lt); min-height: 18px; }

.ss-bar {
  height: 3px; margin-top: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px; overflow: hidden;
}
.ss-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-dk), var(--gold-lt));
  transition: width 0.4s ease;
}

/* 内容逐行加载：每行淡入 + 从左侧滑入，由 core.js 依次加 .is-in */
#sysstatus .ss-row,
#sysstatus .ss-line,
#sysstatus .ss-bar {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#sysstatus .ss-row.is-in,
#sysstatus .ss-line.is-in,
#sysstatus .ss-bar.is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================ HUD */
#hud { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 700; pointer-events: none; }

/* ============================================================ 底部备案号 */
/* 后台「站点信息」里填了才显示；一行小灰字，不挡按钮（留言墙按钮离底 52px） */
#sitefoot {
  position: fixed;
  left: 0; right: 0; bottom: 6px;
  z-index: 690;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.48);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  animation: footIn 0.9s ease both;
}
#sitefoot[hidden] { display: none !important; }
#sitefoot a {
  color: rgba(255, 255, 255, 0.56);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.22);
  pointer-events: auto;
  transition: color 0.25s ease, border-color 0.25s ease;
}
#sitefoot a:hover { color: var(--gold-lt); border-bottom-color: rgba(212, 175, 55, 0.6); }
#sitefoot .sitefoot-sep { margin: 0 7px; opacity: 0.5; }
@keyframes footIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  #sitefoot { font-size: 10.5px; bottom: 4px; }
}

/* 左上角毕业倒计时已按用户要求整体删除（DOM、脚本、样式一并清掉）。 */

#clock {
  position: absolute;
  top: 20px; right: 24px;
  pointer-events: auto;
  padding: 8px 16px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(18px, 2.1vw, 30px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: var(--hud-bg);
  border: 1px solid var(--hud-bd);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.5);
  transition: color 0.4s, border-color 0.4s, transform 0.3s;
}
#clock.cherish {
  color: var(--gold-lt);
  border-color: rgba(240, 216, 120, 0.75);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.45);
  animation: cherishPulse 1s ease-in-out infinite;
}
#clock.cherish::after {
  content: attr(data-hint);
  position: absolute;
  left: 50%; top: 100%;
  transform: translateX(-50%);
  margin-top: 6px;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gold-lt);
}
@keyframes cherishPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

#marks {
  position: absolute;
  top: 84px; right: 24px;
  display: flex; flex-direction: column; gap: 5px;
  align-items: flex-end;
  pointer-events: none;
}
.mark {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(8, 10, 15, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  opacity: 0.5;
  transition: all 0.45s ease;
}
.mark.active {
  opacity: 1;
  color: var(--gold-lt);
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.1);
}
.mark.done {
  opacity: 0.92;
  color: var(--gold);
}
.mark .mk-ico { font-size: 11px; }

/* 音量控件（#volume / #vol-btn / #vol-slider）已按用户要求整体移除，
   相关样式一并删除。音乐音量固定为 config.js 的 volume.music。 */

/* ============================================================ 底部滚动字幕 */
#strip {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 720;
  height: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(5, 6, 10, 0.1), rgba(5, 6, 10, 0.92));
  border-top: 1px solid rgba(212, 175, 55, 0.16);
  display: flex; align-items: center;
}
#strip-text {
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: rgba(212, 175, 55, 0.8);
  padding-left: 100vw;
  animation: stripRoll 26s linear infinite;
}
@keyframes stripRoll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ============================================================ 全局进度条 */
#progressbar {
  position: fixed;
  left: 0; right: 0; bottom: 34px;
  z-index: 720;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
}
#progressbar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-dk), var(--gold), var(--gold-lt));
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.65);
}

/* ============================================================ 飘动表情 */
#emojis { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.float-emoji {
  position: absolute;
  bottom: -50px;
  opacity: 0;
  animation-name: floatUp;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.35));
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg) scale(0.7); }
  12%  { opacity: 0.85; }
  80%  { opacity: 0.65; }
  100% { opacity: 0; transform: translateY(-108vh) rotate(38deg) scale(1.15); }
}

/* ============================================================ 轻提示 */
#toast {
  position: fixed;
  right: 28px; bottom: 148px;
  z-index: 880;
  max-width: min(380px, 80vw);
  padding: 11px 18px;
  font-size: 14px;
  color: var(--text);
  background: rgba(12, 15, 22, 0.95);
  border: 1px solid var(--hud-bd);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}
#toast.on { opacity: 1; transform: translateY(0); }

/* ============================================================ 预览水印 */
.preview-watermark {
  position: fixed;
  left: 50%; top: 16px;
  z-index: 890;
  transform: translateX(-50%);
  padding: 6px 18px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #05060a;
  background: rgba(212, 175, 55, 0.82);
  border-radius: 20px;
  text-decoration: none;
  opacity: 0.72;
  transition: opacity 0.25s;
}
.preview-watermark:hover { opacity: 1; }

/* ============================================================ 工具类 */
.hidden { display: none !important; }
.text-gold { color: var(--gold); }
.text-dim { color: var(--text-dim); }
.center { display: flex; align-items: center; justify-content: center; }

.ch-missing {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--text-dim);
}
.ch-missing h2 { color: var(--gold); margin: 0; font-size: 28px; }

/* 第 9 章转场提示 */
.ch9-tip {
  font-size: clamp(14px, 1.4vw, 20px);
  letter-spacing: 0.24em;
  color: var(--text-dim);
}

@media (prefers-reduced-motion: reduce) {
  #strip-text { animation-duration: 60s; }
}

/* ============================================================
   启动动画四阶段（core.js 在 #bootscreen 上打 data-phase）
   ① video：特效视频全屏铺满，完整播完（不能循环）
   ② load ：骗人载入系统（进度条）
   ③ prank：彩蛋「哈哈，你被骗了」
   ④ theme：网站主题载入 + 系统信息栏逐行点亮
   ============================================================ */
/* ① 特效视频全屏 */
#bootscreen[data-phase="video"] { background: #000; }
#bootscreen[data-phase="video"] .boot-inner { transform: none; width: 100%; height: 100%; }
#bootscreen[data-phase="video"] .boot-video {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  background: #000;
  z-index: 2;
}
#bootscreen[data-phase="video"] .boot-title,
#bootscreen[data-phase="video"] .boot-sub,
#bootscreen[data-phase="video"] .boot-logo { opacity: 0; }
#bootscreen[data-phase="video"] .boot-hint {
  position: fixed;
  left: 0; right: 0; bottom: 26px;
  margin: 0;
  z-index: 3;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}
/* ② 骗人载入：只留载入条，标题先淡出去，避免跟进度条抢视线 */
#bootscreen[data-phase="load"] .boot-video,
#bootscreen[data-phase="load"] .boot-logo { display: none !important; }

/* 系统信息栏：后台配的每一行各自一行，逐行点亮（○ → ✓） */
.ss-stage {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--text-dim);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.ss-stage.is-in { opacity: 1; transform: none; }
.ss-stage-ico {
  flex: none;
  width: 15px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.6;
  text-align: center;
  color: var(--gold-dk);
  transition: color 0.3s ease;
}
.ss-stage.on .ss-stage-ico { color: var(--ok); }
.ss-stage.on .ss-stage-txt { color: var(--text); }
.ss-stage-txt { flex: 1 1 auto; line-height: 1.55; transition: color 0.3s ease; }

/* ============================================================
   「网站主题载入」阶段的出场顺序（按用户要求）
   ① 系统状态窗先从顶部往下弹入（沿用默认动画），一行行点亮
   ② 全部点完之后，班级主题字（几班几班 / 毕业典礼）才在下方淡入显示
      —— 主题字整体下移，永远在弹窗下方，不会被盖住
   ③ 主题字露脸后弹窗收回顶部，把画面留给主题字
   ============================================================ */
#bootscreen[data-phase="theme"] .boot-inner { transform: translateY(16vh); }
#bootscreen[data-phase="theme"] .boot-title,
#bootscreen[data-phase="theme"] .boot-sub {
  /* 必须 animation:none —— .boot-title/.boot-sub 自带的入场动画（bootTitle / fadeUp）
     用的是 both 填充，动画终态 opacity:1 会盖掉这里的 opacity:0，
     结果主题字从头到尾都亮着，「弹窗弹完才显示」就不成立了 */
  animation: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
#bootscreen[data-phase="theme"][data-title="on"] .boot-title,
#bootscreen[data-phase="theme"][data-title="on"] .boot-sub {
  opacity: 1;
  transform: none;
}
@media (max-height: 700px) {
  #bootscreen[data-phase="theme"] .boot-inner { transform: translateY(11vh); }
}

/* 特效视频的「点击开启声音」按钮：只在视频阶段显示，点它不跳过视频 */
#bootscreen[data-phase="video"] .boot-sound {
  display: inline-flex;
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 4;
  transform: translateX(-50%);
}
#bootscreen[data-phase="video"] .boot-sound.on {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: none;
  animation: none;
  backdrop-filter: blur(6px);
}
@keyframes soundPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(212, 175, 55, 0.45); }
  50%      { box-shadow: 0 10px 40px rgba(212, 175, 55, 0.85); }
}


/* 后台「开头水印」关闭时：隐藏开场页的水印/署名小字 */
.intro.intro-nomark [class*="watermark"],
.intro.intro-nomark .intro-wm,
.intro.intro-nomark .intro-mark,
.intro.intro-nomark .intro-foot { display: none !important; }

/* 时光大事记：后台选「竖排卡片」时，手机端强制竖向堆叠 */
html[data-tl-layout="list"] .ch5-stage [class*="ch5-card"],
html[data-tl-layout="list"] .ch5-stage [class*="ch5-item"],
html[data-tl-layout="list"] .ch5-stage [class*="ch5-node"] {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 14px 0 !important;
  transform: none !important;
}
html[data-tl-layout="list"] .ch5-stage [class*="ch5-track"] {
  display: block !important;
  height: auto !important;
}
/* ============================================================================
   第 4 章 · 名单阶段磨砂玻璃（★ 全站唯一一份定义，别再在别处叠加任何 #ch4Dim 规则）
   ----------------------------------------------------------------------------
   需求：名单升起来的瞬间，整个背景变磨砂玻璃（灰 + 模糊），把此前演过的
        外号卡片 / 外号墙全部盖住，名单本身浮在最上面清晰可见。
   层级（都是 #stage 这个 z-index:10 层叠上下文里的比较，见 base.css 的 .chapter-root）：
        旧内容 .ch4-card / .ch4-wall / .ch4-spot ... 默认(auto)
        磨砂层 #ch4Dim ............................. 30
        名单框 .ch4-rb / [data-rb] ................. 40
   重要：#ch4Dim 由 ch4.js 的 dimEl() 插在 .ch4-wrap 内部（position:fixed 铺满视口）。
        绝不能挂到 body 上 —— .ch4-wrap 自己有整屏不透明渐变底，#stage 又是
        z-index:10 的层叠上下文，body 上的遮罩永远被压在后面看不见。
   ========================================================================== */
.ch4-wrap #ch4Dim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  background: rgba(10, 13, 18, .72);
  -webkit-backdrop-filter: blur(12px) saturate(.9);
  backdrop-filter: blur(12px) saturate(.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
.ch4-wrap #ch4Dim.on { opacity: 1; }

/* 之前演过的外号卡片 / 外号墙压到磨砂层下面，被完全盖住（留一点轮廓透出来，
   这样看到的是「磨砂玻璃」而不是一块纯灰板） */
.ch4-wrap .ch4-card,
.ch4-wrap .ch4-wall { z-index: 1; }

/* 外号墙不淡出（当磨砂玻璃后面的底纹）；标题与落款照旧淡出，画面留给名单 */
.ch4-wrap.ch4-roster-on .ch4-wall { opacity: 1; }

/* 名单框浮在磨砂玻璃之上，字必须清晰可见 */
.ch4-wrap .ch4-rb,
.ch4-wrap [data-rb] {
  position: absolute;
  z-index: 40;
  background: rgba(16, 20, 27, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
}

/* 老浏览器 / 旧 WebView 不支持 backdrop-filter：把灰底加深一点，保证名单读得清 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ch4-wrap #ch4Dim { background: rgba(10, 13, 18, .88); }
}

/* ================= 系统栏 · 仿真实菜单栏 + 终端 ================= */
.ss-menubar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px 9px; margin-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  font-size: 11.5px; color: rgba(226, 232, 240, .82);
}
.ss-menubar .mb-l { display: flex; align-items: center; gap: 6px; }
.ss-menubar .mb-logo {
  width: 8px; height: 8px; border-radius: 50%;
  background: #5fd08a; box-shadow: 0 0 8px rgba(95, 208, 138, .85);
  animation: mbPulse 2.2s ease-in-out infinite;
}
@keyframes mbPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.ss-menubar .mb-r { display: flex; align-items: center; gap: 7px; }
.ss-menubar #ss-clock {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: #e8eef8; letter-spacing: .5px; font-weight: 600;
}
.ss-menubar .mb-ico { display: inline-block; }
.ss-menubar .mb-wifi {
  width: 13px; height: 10px;
  background: linear-gradient(180deg, #7bd88f 0 3px, transparent 3px),
              linear-gradient(180deg, #7bd88f 0 6px, transparent 6px);
  background-size: 13px 3px; background-repeat: no-repeat;
  background-position: 0 0, 0 4px;
  opacity: .75;
}
.ss-menubar .mb-bat {
  width: 18px; height: 9px; border: 1px solid rgba(255,255,255,.5);
  border-radius: 2px; position: relative;
}
.ss-menubar .mb-bat::after {
  content: ''; position: absolute; right: -3px; top: 2px;
  width: 2px; height: 4px; background: rgba(255,255,255,.5); border-radius: 0 1px 1px 0;
}
.ss-menubar .mb-bat::before {
  content: ''; position: absolute; left: 1px; top: 1px; bottom: 1px;
  width: 72%; background: #7bd88f; border-radius: 1px;
}

.ss-term {
  margin-top: 12px; border-radius: 8px; overflow: hidden;
  background: rgba(2, 6, 12, .92);
  border: 1px solid rgba(95, 224, 208, .16);
  box-shadow: 0 0 22px rgba(95, 224, 208, .06) inset;
}
.ss-term-bar {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 8px; background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.ss-term-bar i {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
  background: rgba(255, 255, 255, .18);
}
.ss-term-bar i:nth-child(1) { background: #ff6b6b; }
.ss-term-bar i:nth-child(2) { background: #ffd166; }
.ss-term-bar i:nth-child(3) { background: #5fd08a; }
.ss-term-bar span {
  margin-left: 4px; font-size: 10.5px; letter-spacing: .8px;
  color: rgba(226, 232, 240, .42);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
#ss-code {
  margin: 0; padding: 7px 9px 9px;
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 10.5px; line-height: 1.62;
  color: #6ff0d0; text-shadow: 0 0 8px rgba(95, 224, 208, .45);
  height: 138px; overflow: hidden;
  white-space: pre; text-align: left;
}
#ss-code .ok { color: #5fd08a; }
#ss-code .dim { color: rgba(110, 160, 170, .55); }
#ss-code .hi { color: #ffd166; }

/* 系统栏精简：core.js 还会插入旧的阶段行，这里一律不显示，
   面板上只留「当前典礼时间」和「实时代码」两块 */
#sysstatus .ss-stage,
#sysstatus .ss-head,
#sysstatus .ss-row,
#sysstatus .ss-line,
#sysstatus .ss-bar { display: none !important; }
#sysstatus { padding-top: 13px; }
#sysstatus .ss-menubar { margin-bottom: 0; border-bottom: 0; padding-bottom: 2px; }
#sysstatus .ss-menubar .mb-r { gap: 9px; }
#sysstatus .ss-menubar #ss-date { font-size: 11px; color: rgba(226,232,240,.75); font-weight: 500; }

/* ===== 典礼控制台 · 统一皮肤 =====
   把整个面板做成一台终端：外框、内框、标题栏同一种语言，
   边框用青色微光，圆角统一，字号统一等宽，不再有两种风格拼在一起 */
#sysstatus {
  background: linear-gradient(180deg, rgba(6, 11, 18, .985), rgba(3, 6, 10, .985));
  border: 1px solid rgba(95, 224, 208, .28);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(95, 224, 208, .07) inset,
              0 18px 52px rgba(0, 0, 0, .72),
              0 0 26px rgba(95, 224, 208, .10);
  padding: 0;
  overflow: hidden;
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
}

/* 顶部菜单栏：做成终端标题栏的样式，和下方代码框同源 */
#sysstatus .ss-menubar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 13px;
  margin: 0;
  background: rgba(95, 224, 208, .055);
  border-bottom: 1px solid rgba(95, 224, 208, .18);
}
#sysstatus .ss-menubar .mb-l {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: 1.2px; color: rgba(95, 224, 208, .9);
  text-transform: uppercase;
}
#sysstatus .ss-menubar .mb-logo {
  width: 7px; height: 7px; border-radius: 50%;
  background: #5fd08a; box-shadow: 0 0 9px rgba(95, 208, 138, .95);
  animation: mbPulse 2s ease-in-out infinite;
}
#sysstatus .ss-menubar .mb-r {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: rgba(226, 232, 240, .72);
}
#sysstatus .ss-menubar #ss-date { color: rgba(226, 232, 240, .62); font-weight: 500; }
#sysstatus .ss-menubar #ss-clock {
  color: #6ff0d0; font-weight: 700; letter-spacing: .8px;
  text-shadow: 0 0 10px rgba(95, 224, 208, .55);
}
#sysstatus .ss-menubar .mb-wifi { opacity: .5; }
#sysstatus .ss-menubar .mb-bat { border-color: rgba(95, 224, 208, .45); }
#sysstatus .ss-menubar .mb-bat::after { background: rgba(95, 224, 208, .45); }
#sysstatus .ss-menubar .mb-bat::before { background: #5fd08a; opacity: .8; }

/* 代码框：去掉独立外框，跟面板融为一体，只留一条分隔线 */
#sysstatus .ss-term {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#sysstatus .ss-term-bar {
  padding: 6px 13px;
  background: rgba(255, 255, 255, .022);
  border-bottom: 1px solid rgba(95, 224, 208, .10);
}
#sysstatus .ss-term-bar span {
  font-size: 10px; letter-spacing: 1.1px;
  color: rgba(95, 224, 208, .45);
  text-transform: uppercase;
}
#sysstatus .ss-term-bar i { width: 6px; height: 6px; }
#sysstatus .ss-term-bar i:nth-child(1) { background: rgba(255, 107, 107, .75); }
#sysstatus .ss-term-bar i:nth-child(2) { background: rgba(255, 209, 102, .75); }
#sysstatus .ss-term-bar i:nth-child(3) { background: rgba(95, 208, 138, .75); }

#ss-code {
  height: 168px;
  padding: 9px 13px 12px;
  font-size: 10.5px;
  line-height: 1.72;
  color: #6ff0d0;
  text-shadow: 0 0 8px rgba(95, 224, 208, .38);
  background: transparent;
  text-align: left;
}

/* ===== 控制台 · 高亮与防溢出 =====
   核心：代码区严格裁切，超出部分用省略号，任何设备都不许窜出面板 */
#sysstatus { overflow: hidden !important; }

#sysstatus .ss-term { overflow: hidden; }

#ss-code {
  display: block;
  margin: 0;
  padding: 9px 11px 12px;
  height: 168px;
  overflow: hidden !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  white-space: pre;
  word-wrap: normal;
  word-break: keep-all;
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-size: 10.5px;
  line-height: 1.78;
  color: #6ff0d0;
  background: transparent;
  text-align: left;
  box-sizing: border-box;
  max-width: 100%;
}
#ss-code > * { max-width: 100%; }

/* 行内各段：统一 nowrap，绝不允许换行把面板撑高 */
#ss-code span {
  white-space: pre;
  word-break: keep-all;
}

/* ---- 语法高亮配色 ---- */
#ss-code .c-ts   { color: rgba(110, 160, 170, .45); }
#ss-code .c-no   { color: rgba(110, 160, 170, .38); }
#ss-code .c-lang { opacity: .48; }
#ss-code .c-say  { color: #e8eef8; }
#ss-code .c-ar   { color: #5fe0d0; }

#ss-code .c-code .c-kw { color: #c792ea; font-weight: 700; }
#ss-code .c-code .c-st { color: #a8e07a; }
#ss-code .c-code .c-nu { color: #ffb86b; }
#ss-code .c-code .c-cm { color: rgba(110, 160, 170, .55); font-style: italic; }
#ss-code .c-code .c-tg { color: #ff8fa3; }

#ss-code .cur {
  color: #6ff0d0;
  -webkit-animation: ssCur 1s step-end infinite;
  animation: ssCur 1s step-end infinite;
}

/* ---- 手机端：更紧凑，宽度更宽，字号略小 ---- */
@media (max-width: 560px) {
  #sysstatus {
    width: 92vw !important;
    max-width: 92vw !important;
    border-radius: 11px;
  }
  #sysstatus .ss-menubar { padding: 7px 10px; }
  #sysstatus .ss-menubar .mb-l { font-size: 10px; letter-spacing: .8px; }
  #sysstatus .ss-menubar .mb-r { font-size: 10px; gap: 7px; }
  #sysstatus .ss-menubar #ss-date { font-size: 10px; }
  #sysstatus .ss-menubar #ss-clock { font-size: 10.5px; }
  #sysstatus .ss-term-bar { padding: 5px 10px; }
  #ss-code {
    padding: 8px 10px 10px;
    font-size: 9.5px;
    line-height: 1.72;
    height: 148px;
  }
}

@media (max-width: 370px) {
  #ss-code { font-size: 9px; height: 136px; }
  #sysstatus .ss-menubar #ss-date { display: none; }
}

/* ===== 控制台 · 全面去金色，统一青色科幻风 ===== */
#sysstatus,
#sysstatus * {
  border-color: rgba(95, 224, 208, .22);
}
#sysstatus .ss-menubar {
  background: linear-gradient(180deg, rgba(95, 224, 208, .10), rgba(95, 224, 208, .03));
  border-bottom: 1px solid rgba(95, 224, 208, .22);
}
#sysstatus .ss-menubar .mb-l em {
  font-style: normal;
  color: #6ff0d0;
  letter-spacing: 1.6px;
  text-shadow: 0 0 12px rgba(95, 224, 208, .5);
}
#sysstatus .ss-term-bar {
  background: rgba(95, 224, 208, .035);
  border-bottom: 1px solid rgba(95, 224, 208, .13);
}
#ss-code {
  height: 200px;
  padding: 11px 14px 14px;
  font-size: 10.5px;
  line-height: 1.8;
}
@media (max-width: 560px) {
  #ss-code { height: 172px; padding: 9px 11px 12px; font-size: 9.5px; line-height: 1.74; }
}
@media (max-width: 370px) {
  #ss-code { height: 156px; font-size: 9px; }
}

/* ===== 章节预挂载冻结 =====
   章节在遮罩后面先渲染好（消除黑屏），但绝不能开始演。
   JS 层已经压住了 setTimeout / requestAnimationFrame，
   可 CSS animation 是靠元素进 DOM 就自动跑的（比如 ch2-zoom 那条 24 秒的缩放），
   JS 完全管不到 —— 等观众看到画面时它早就跑完了。
   这里统一把所有动画冻结在 0 帧，露脸时再放开。 */
.chapter-root.is-holding,
.chapter-root.is-holding * {
  -webkit-animation-play-state: paused !important;
  animation-play-state: paused !important;
}
