/* ==================== 基础设置 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: #000;
  color: #111;
}

img {
  max-width: 100%;
}

ul {
  list-style: none;
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

/* ==================== 封面 ==================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  background:
    linear-gradient(rgba(38, 39, 44, 0.55), rgba(38, 39, 44, 0.55)),
    url(https://res.cloudinary.com/cpz7s2g7/image/upload/v1790151034/cover.webp) center / cover no-repeat;
}

.top-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-end;
  padding: 44px 72px;
}

.top-nav ul {
  display: flex;
  gap: 64px;
}

/* 手机端菜单开关，桌面端整体隐藏 */
.nav-toggle-label {
  display: none;
}

/* 菜单状态锚点：隐形、不占排版，固定在导航栏顶部（= 页首） */
.nav-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

.top-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 4px;
}

.top-nav a:hover {
  color: #ccc;
}

/* ---- 封面标题排版（按 1440 高保真图实测校准）----
   高保真图：标题 Twenty-Four / Windows 两行右对齐，文字右缘距屏幕右边约 100px，
   副标题、信息行同样右对齐；标题字号 112px、行距 1.08，
   首行字形顶部约在封面 41% 高度处。
   课堂知识点：text-align 文本对齐、盒模型 padding、vh 视口单位（随窗口高度缩放）。
   手机端高保真图为居中对齐，由下方媒体查询单独还原，不受影响 */
.hero-title {
  width: 78%;
  margin-left: auto;
  padding-top: 40vh;
  padding-right: 100px;   /* 文字右缘距屏幕右边 100px（高保真实测 100~117px） */
  text-align: right;
  color: #fff;
}

.hero-title h1 {
  font-size: 112px;
  line-height: 1.08;   /* 两行字框间隔均匀，比例与高保真图一致 */
}

/* 副标题/信息行与标题的字形间隔按高保真图实测约 26px；
   标题行距 1.08 的字框下方自带约 23px 空隙，margin 只需补足剩余部分 */
.hero-sub {
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: 5px;
}

.hero-meta {
  margin-top: 16px;
  font-size: 14px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.85);
}

/* 封面标题中等屏适配（769px – 1200px）：大字号标题在窄窗口会换行错乱，
   用 vw 让字号随屏宽缩放（1200px 时正好 112px，与桌面规则衔接）；
   同时加宽标题容器、缩小右留白，保证「Twenty-Four」始终完整排在一行 */
@media (min-width: 769px) and (max-width: 1200px) {
  .hero-title {
    width: 90%;
    padding-right: 60px;
  }

  .hero-title h1 {
    font-size: 9.33vw;
  }
}

/* ==================== 目录 ==================== */
.contents {
  display: flex;
  gap: 70px;
  background: #000;
  color: #fff;
  padding: 120px 72px 130px;
}

.contents-intro {
  width: 24%;
}

.contents-intro h2 {
  font-size: 34px;
  margin-bottom: 26px;
}

.contents-intro p {
  font-size: 15px;
  line-height: 1.75;
  color: #e8e8e8;
}

.contents-list {
  flex: 1;
}

.contents-list h2 {
  font-size: 34px;
  margin-bottom: 40px;
}

.contents-list a {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 64px;
  line-height: 1.85;
  color: #fff;
  text-decoration: none;
}

.contents-list a:hover {
  color: #b5b5b5;
}

/* ---- 目录悬停预览图（纯 CSS，无 JS）----
   课堂知识点：:hover 伪类、transition 过渡、position 绝对定位、pointer-events。
   默认不显示（手机端没有悬停，也不占排版）；电脑端悬停某个标题时对应图片淡入、
   从右侧滑入并微微放大归位——缓动曲线与 01 卡片悬停一致（cubic-bezier(0.25,0.8,0.25,1)），
   丝滑自然。图片按高保真图：宽 380px、右缘贴屏幕右边、与所在行垂直居中 */
.contents-thumb {
  display: none;
}

/* 视口 ≥1184px 时文字右侧才有完整 380px 图片位（实测列表文字最右约 844px） */
@media (min-width: 1184px) {
  /* 图片未悬停时的起始位置在屏幕右缘外 40px（滑入动效），
     用 overflow-x: clip 裁掉这截探出屏幕的部分，防止出现横向滚动条；
     clip 不产生滚动容器，不影响内部任何布局 */
  .contents {
    overflow-x: clip;
  }

  .contents-list li {
    position: relative;   /* 图片相对所在行定位 */
  }

  .contents-thumb {
    display: block;
    position: absolute;
    right: -72px;   /* 内容区右 padding 为 72px，-72px 正好让图片右缘贴到屏幕右边 */
    top: 50%;       /* 与所在行垂直居中 */
    width: 380px;
    opacity: 0;
    transform: translateY(-50%) translateX(40px) scale(0.96);
    transition:
      opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
      transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;   /* 图片不拦截鼠标，悬停过程不抖动 */
  }

  .contents-list a:hover .contents-thumb,
  .contents-list a:focus-visible .contents-thumb {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
  }
}

/* ---- 目录小图（≤1183px 的窄屏/触屏端，按手机端高保真图实测：图在标题正下方、
     与标题左对齐，宽约屏宽的 46%——390px 屏正好 179px，比例约 3:2）----
     触屏没有鼠标悬停，图片直接排在标题下方（block 块级自动换行），
     宽度随屏宽缩放、较宽窗口里用 max-width 封顶，保持与标题的协调比例 */
@media (max-width: 1183px) {
  .contents-thumb {
    display: block;
    width: 46vw;
    max-width: 286px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    margin-top: 8px;
  }
}

/* 目录小图滚动「显现 → 停留 → 收回」（纯 CSS，无 JS）
   课堂知识点：CSS Animation 的 @keyframes + animation 简写、
   animation-timeline: view() 滚动时间轴（与 02 横向滚动、03/04 浮现同一套写法）、
   view() 的视口内缩参数、max-height 做高度动画（课堂收起/展开菜单同款技巧）。
   view(block 30% 30%)：把滚动跟踪的视口上下各内缩 30%，图片只在中段
   「聚焦区」里走动画——0%→15% 淡入并展开归位，15%→50% 停留展示，
   50%→65% 淡出并向上收回，之后保持隐藏。各行目录高度相近，
   展示窗口互不重叠：同一时刻只有滑到屏幕中间的那一行的图完整可见，
   滚走后自动收回。max-height 从 0 展开到足够值再收回 0，
   图片隐藏时不占任何排版空间，标题间距与「无图」高保真图完全一致；
   显现时平滑展开，把下方标题自然往下推。@supports 外旧浏览器自动跳过、
   图片直接静态显示 */
@supports (animation-timeline: view()) {
  @media (max-width: 1183px) {
    .contents-thumb {
      animation: contents-thumb-in cubic-bezier(0.22, 0.61, 0.36, 1) both;
      animation-timeline: view(block 30% 30%);
      animation-range: cover 0% cover 100%;
    }

    /* 系统开启「减少动态效果」时直接显示最终状态 */
    @media (prefers-reduced-motion: reduce) {
      .contents-thumb {
        animation: none;
      }
    }
  }

  @keyframes contents-thumb-in {
    0% {
      opacity: 0;
      max-height: 0;        /* 收回时高度为 0：不占位，标题间距回到无图状态 */
      margin-top: 0;
      transform: translateY(24px);
    }
    15% {
      opacity: 1;
      max-height: 200px;    /* ≥ 图片实际高度（最大 286px 宽 × 2/3 ≈ 191px） */
      margin-top: 8px;
      transform: translateY(0);
    }
    50% {
      opacity: 1;
      max-height: 200px;
      margin-top: 8px;
      transform: translateY(0);
    }
    65%,
    100% {
      opacity: 0;
      max-height: 0;
      margin-top: 0;
      transform: translateY(-24px);
    }
  }
}

/* ---- 目录中等屏适配（769px – 1390px）----
   问题：INTRODUCTION 是一个 298px 宽的英文单词（不能换行），左栏只有 24%，
   窗口窄于约 1390px 时列宽比单词还窄，单词溢出与右侧 CONTENTS 标题重合。
   对策（课堂知识点：盒模型 min-width、Flexbox 弹性收缩）：左栏仍保持 24%，
   但最小 300px 保证容下整个单词；栏间距从 70px 收成 40px，把省下的宽度留给右栏。
   窗口 ≥1391px 时 24% 本就 ≥299px、间距恢复 70px，桌面端排版完全不变 */
@media (min-width: 769px) and (max-width: 1390px) {
  .contents {
    gap: 40px;
  }

  .contents-intro {
    min-width: 300px;
  }
}

/* ==================== 章节公共 ==================== */
.chapter-head {
  position: relative;
  color: #fff;
  padding: 130px 72px;
  background-size: cover;
  background-position: center;
}

.chapter-num {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 300px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.16);
}

.chapter-head h2 {
  font-size: 84px;
}

.chapter-time {
  font-size: 22px;
  margin-top: 18px;
}

.chapter-intro {
  max-width: 820px;
  margin: 30px auto 0;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
}

/* 01 / 02 章节头背景图保持一屏高度（课堂知识点：vh 视口单位、min-height）：
   头部原高度 = 内容 + 固定内边距的固定像素值，窗口变高时图片就不满一屏；
   min-height: 100vh 让背景图在任何窗口高度下都至少占满一屏。
   min-height 只在窗口更高时生效、不压缩内容，因此原排版与手机端完全不变 */
.chapter-morning .chapter-head,
.chapter-head-daylight {
  min-height: 100vh;
}

/* ---- 01 Morning Mist ---- */
.chapter-morning {
  background: #fff;
  padding: 0 0 130px;
}

.chapter-morning .chapter-head {
  background-image: url(https://res.cloudinary.com/cpz7s2g7/image/upload/v1790150947/bg-morning.webp);
  text-align: center;
  padding-bottom: 240px;
}

.chapter-morning .chapter-num {
  text-align: left;
  margin-bottom: -110px;
}

.chapter-morning .chapter-head h2 {
  margin-top: 60px;
}

/* ---- 时刻卡片悬停动效（纯 CSS，无 JS）----
   默认（未悬停）：整条图片横幅 + 居中大时间（Frame 73 的扁长比例）；
   悬停：卡片长高的同时图片收缩到左侧，右侧淡入原来的文字卡片（图一原样式）。
   课堂知识点：transition 过渡、position 绝对定位、flex 布局 ---- */
.moment-card {
  display: flex;
  position: relative;
  background: #060606;
  border-radius: 28px;
  overflow: hidden;
  max-width: 1200px;
  /* 未悬停时的扁横幅比例（约 3.56 : 1，与 Frame 73 一致），
     用 vw + max-height 让卡片在任何屏宽下都保持这个比例 */
  height: 28.09vw;
  max-height: 337px;
  margin: 110px auto 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  transition:
    height 0.75s cubic-bezier(0.25, 0.8, 0.25, 1),
    max-height 0.75s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.moment-narrow {
  width: 80%;
  max-width: 960px;
  /* 窄图卡的横幅比例约 3.19 : 1（Frame 73） */
  height: 25.1vw;
  max-height: 301px;
}

/* 悬停时长高到原网页卡片的高度（图片 3:2 / 2:3 决定的高度） */
.moment-card:hover {
  height: 41.33vw;
  max-height: 496px;
}

.moment-narrow:hover {
  height: 58.83vw;
  max-height: 706px;
}

/* 图片默认占满整张卡片（横幅态），悬停时宽度平滑收缩到左侧 */
.moment-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: width 0.75s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.moment-card:hover img {
  width: 62%;
}

.moment-narrow:hover img {
  width: 49%;
}

/* 文字面板：绝对定位钉在卡片右侧，默认透明且略向右移出，
   悬停时延迟一点再淡入 + 滑回原位，等图片先收缩出空间 */
.moment-text {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 38%;
  display: flex;
  padding: 25px;
  opacity: 0;
  transform: translateX(48px);
  transition:
    opacity 0.45s ease,
    transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.moment-narrow .moment-text {
  width: 51%;
}

.moment-card:hover .moment-text {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.18s;
}

/* 横幅态的大时间覆盖层：absolute 撑满父元素 + 暗色遮罩（Frame 73 样式），
   悬停时整体淡出，露出下面的图文排版 */
.moment-bigtime {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 72px;
  font-weight: 800;
  letter-spacing: 2px;
  transition: opacity 0.45s ease;
}

.moment-narrow .moment-bigtime {
  font-size: 64px;
}

.moment-card:hover .moment-bigtime {
  opacity: 0;
}

/* 手机端点按展开用的透明点击层（锚点链接），桌面端一律不显示 */
.moment-tap {
  display: none;
}

/* 文字卡片内部：保持原网页样式不变（图一） */
.moment-frame {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 44px 42px;
  color: #fff;
}

.moment-frame h3 {
  font-size: 30px;
  letter-spacing: 6px;
}

.moment-frame h4 {
  font-size: 18px;
  margin: 16px 0 10px;
}

.moment-frame p {
  font-size: 14.5px;
  line-height: 1.75;
  color: #dedede;
}

/* ==================== 中等屏幕微调（769px – 1100px）====================
   课堂知识点：媒体查询用 min-width + max-width 同时限定上下界，
   只在窗口"不宽不窄"时生效；桌面大屏（>1100px）与手机端（≤768px）完全不变。
   问题：这段宽度里悬停展开的卡片偏矮、文字面板偏窄，段落会溢出白框下沿。
   对策（盒模型 padding）：只缩短文字与白框自身的距离、收紧小标题间距，
   并把悬停后的卡片稍加高；白框与卡片黑边的 25px 距离保持原样不动 */
@media (min-width: 769px) and (max-width: 1100px) {
  .moment-frame {
    padding: 20px 26px;
  }

  .moment-frame h4 {
    margin: 10px 0 8px;
  }

  .moment-card:hover {
    height: 58vw;
  }
}

/* ---- 响应式页边距保护（课堂知识点：calc() 计算、margin: auto 水平居中、盒模型）----
   问题：01 宽卡片（max-width: 1200px）与 03 黄昏区（max-width: 1220px）只设了
   最大宽度，窗口一旦窄于这个值，宽度就会自动撑满、贴到屏幕左右两边，页边距消失。
   对策：宽度用 calc(100% - 48px) 固定留出两侧各 24px 页边距，配合 margin: auto 居中；
   桌面大屏下 max-width 依旧封顶（1440px 时卡片仍 1200px、两侧仍 120px），完全不受影响；
   手机端（≤768px）已有 16px 边距，不在此媒体查询范围内，保持原样 */
@media (min-width: 769px) {
  .moment-card {
    width: calc(100% - 48px);
  }

  /* 窄卡原本就是 80% 宽、自带页边距，重新声明一次防止被上面覆盖 */
  .moment-narrow {
    width: 80%;
  }

  .dusk-feature,
  .dusk-row {
    width: calc(100% - 48px);
  }
}

/* ---- 02 Daylight ---- */
.chapter-daylight {
  background: #000;
  color: #fff;
  padding-bottom: 40px;
}

.chapter-head-daylight {
  background-image: url(https://res.cloudinary.com/cpz7s2g7/image/upload/v1790151001/bg-daylight.webp);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 60px;
  padding-top: 110px;
  padding-bottom: 150px;
}

.head-left {
  width: 52%;
}

/* ---- 02 章节头桌面端排版（按 1440 高保真图实测校准）----
   高保真图顺序：时间在最上方 → 02 →（字形间隔 33px）→ Daylight →（27px）→ 引言，
   02 与标题之间留有空隙、不重叠。
   课堂知识点：Flexbox 纵排 + order 调整视觉顺序（HTML 结构不动）、
   盒模型 margin、负 margin 只用于抵消字体内置行距产生的空隙（按字形实测计算）。
   手机端排版已由媒体查询单独定义，这里用 min-width:769px 限定只在桌面/中等屏生效 */
@media (min-width: 769px) {
  .head-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  /* 时间提到「02」之上（高保真图位置） */
  .chapter-head-daylight .chapter-time {
    order: -1;
    margin-top: 0;
  }

  /* 「02」与时间保持约 63px 字形间隔；-34px 抵消 300px 字框上方的内置空隙，
     不再用 margin-bottom:-80px 把标题上拉重叠 */
  .chapter-head-daylight .chapter-num {
    margin-top: -34px;
    margin-bottom: 0;
  }

  /* Daylight 与「02」字形间隔约 33px（-20px 抵消字框下方的内置空隙） */
  .chapter-head-daylight h2 {
    margin-top: -20px;
  }

  /* 引言与标题字形间隔约 27px */
  .chapter-head-daylight .chapter-lead {
    margin-top: 17px;
  }
}

.chapter-lead {
  max-width: 560px;
  font-size: 19px;
  line-height: 1.7;
  margin-top: 30px;
}

.chapter-side {
  width: 36%;
}

.chapter-side p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 22px;
}

.polaroid-strip {
  display: flex;
  gap: 100px;
  overflow-x: hidden;
  /* 左右各留 100px：横滚到尽头时，末张照片右侧也保留与第一张左侧
     相同的边距，完整露出不被屏幕右缘裁切 */
  padding: 200px 100px 60px 100px;
}

.polaroid {
  position: relative;
  flex-shrink: 0;
  width: 310px;
  background: #fff;
  padding: 20px 20px 26px;
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  width: 2px;
  height: 200px;
  background: #fff;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 27 / 40;
  object-fit: cover;
  display: block;
}

.polaroid figcaption {
  padding-top: 14px;
  color: #111;
  font-size: 14px;
  line-height: 1.5;
}

.polaroid figcaption strong {
  display: block;
  font-size: 16px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.daylight-summary h2 {
  font-size: 56px;
}

.daylight-summary p {
  font-size: 17px;
  line-height: 1.8;
  max-width: 780px;
  margin-top: 14px;
}

/* ---- 02 Daylight 横向滚动（纯 CSS，无 JS、无滚动条，桌面/手机通用）----
   原理（课堂知识点 position: sticky 吸顶）：外层容器加高制造滚动距离，
   内层 sticky 吸顶把这一段“钉”在屏幕上；滚动进度通过 scroll-timeline
   驱动画廊横移——滚轮/手指照旧向下滚，滚到底后 sticky 松开，页面自然继续向下 */
.daylight-hscroll {
  position: relative;
  /* 总结文字是绝对定位（不占文档流），这里用 margin 给它预留位置，
     避免后面的 03 Dusk 章节上移把它盖住；380px > 文字内容的最大高度 */
  margin-bottom: 380px;
}

/* 总结文字默认（桌面端）：定位在滚动容器正下方，
   横滚吸顶期间在视口外，吸顶松开时正好从屏幕底部进入——与原来在容器外一致 */
.daylight-summary {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: flex;
  align-items: flex-start;
  gap: 90px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 90px 72px 110px;
}

@supports (animation-timeline: view()) {
  .daylight-hscroll {
    height: 320vh;                  /* 横向滚动消耗的纵向滚动距离 */
    view-timeline-name: --daylight; /* 给这一段的滚动进度起个名字 */
  }

  .daylight-sticky {
    position: sticky;
    top: 0;
    z-index: 2;                     /* 盖住下面滑过的总结文字 */
    height: 100vh;
    overflow: hidden;               /* 视口外的照片直接裁掉，不需要滚动条 */
    display: flex;
    align-items: center;
    background: #000;
  }

  .polaroid-strip {
    flex-shrink: 0;                 /* 保持 8 张拍立得的自然总宽，不被 flex 压缩 */
    animation: daylight-move linear both;
    animation-timeline: --daylight;
    /* 只在 sticky 吸顶（照片带被钉住）的那一段滚动里横移 */
    animation-range: entry 100% exit 0%;
  }

  @keyframes daylight-move {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(100vw - 100%)); }  /* 正好把最后一张带到视口右缘 */
  }
}

/* ---- OVERVIEW 小图 → 02 拍立得的定位锚点 ----
   课堂知识点：锚点链接（a href="#id"）+ position 绝对定位。
   拍立得在 sticky 吸顶层里由滚动时间轴驱动横移，直接锚到 #photo-xxx 只会落到它的
   布局原位（照片带起点），回不到照片实际可见的位置；这 8 个 1px 隐形锚点按
   “该照片横滚到屏幕中央”时的页面滚动位置摆放（浏览器实测 + 线性换算：
   横移距离与滚动距离成正比），配合 html 的 scroll-behavior: smooth，
   点概览小图即可平滑滚动到对应照片。1px 空标签不占排版、不可见 */
.strip-anchor {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
}

/* 桌面端实测：横滚容器高 320vh，横移满程 = 3380-1440 = 1940px，历时 1980px 滚动
   （右内边距 100px 后照片带总宽 3280 → 3380，锚点按新速率重新标定） */
#a-11-20, #c-11-20 { top: 0; }        /* 前两张从照片带起点起就已在屏幕内 */
#a-11-55, #c-11-55 { top: 0; }
#a-12-30, #c-12-30 { top: 362px; }
#a-13-05, #c-13-05 { top: 781px; }
#a-13-40, #c-13-40 { top: 1199px; }
#a-14-15, #c-14-15 { top: 1618px; }
#a-14-50, #c-14-50 { top: 1980px; }   /* 后两张最多只能横移到尽头（末张完整露出） */
#a-15-25, #c-15-25 { top: 1980px; }

/* ---- 03 Dusk ---- */
.chapter-dusk {
  background: #fff;   /* 高保真图为纯白底（原 #f7f5f0 米色已按图修正） */
  color: #111;
  padding-bottom: calc(130px + 30svh);
}

.chapter-head-dusk {
  background: #000 url(https://res.cloudinary.com/cpz7s2g7/image/upload/v1790150985/bg-dusk.webp) no-repeat right center;
  background-size: 55% 100%;
  padding-top: 130px;
  padding-bottom: 150px;
}

.chapter-head-dusk .chapter-num {
  color: #3a3a3a;
  margin-top: 90px;
}

.chapter-head-dusk h2,
.chapter-head-dusk .chapter-time,
.chapter-head-dusk .chapter-lead {
  max-width: 620px;
}

.dusk-feature {
  max-width: 1220px;
  margin: 110px auto 0;
}

.dusk-feature img {
  width: 100%;
  display: block;
}

.dusk-feature figcaption {
  margin-top: 24px;
}

.dusk-feature h3 {
  font-size: 34px;
  letter-spacing: 4px;
}

.dusk-item h3 {
  font-size: 30px;
  letter-spacing: 4px;
  margin-top: 24px;
}

figcaption h4 {
  font-size: 19px;
  margin: 8px 0 10px;
}

figcaption p {
  font-size: 15px;
  line-height: 1.75;
  color: #222;
}

.dusk-row {
  display: flex;
  gap: 56px;
  max-width: 1220px;
  margin: 70px auto 0;
}

/* 按高保真图实测微调：2 张一排的间距更小（40px）、与上方大图的图说间隔更大（70px）；
   3 张一排的与上一排图说的间隔更紧凑（45px） */
.dusk-row-2 {
  gap: 40px;
}

.dusk-row-3 {
  margin-top: 45px;
}

.dusk-row .dusk-item {
  flex: 1;
}

.dusk-item img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

/* ---- 04 Nightfall ---- */
.chapter-night {
  background: #000;
  color: #fff;
  padding-bottom: 140px;
}

.chapter-head-night {
  background-image: url(https://res.cloudinary.com/cpz7s2g7/image/upload/v1790151003/bg-nightfall.webp);
  text-align: center;
  padding-top: 170px;
  padding-bottom: 180px;
}

.chapter-head-night .chapter-num {
  color: rgba(255, 255, 255, 0.12);
}

.chapter-head-night .chapter-intro {
  margin-top: 40px;
}

.night-grid {
  display: flex;
  flex-wrap: wrap;
  max-width: 1440px;
  margin: 0 auto;
}

.night-item {
  width: 50%;
}

.night-item img {
  width: 100%;
  display: block;
}

.night-item figcaption {
  position: relative;   /* .cap-default 覆盖层相对它定位，不改变任何尺寸 */
  text-align: center;
  padding: 34px 40px 70px;
}

/* ---- 04 文字切换动效（纯 CSS，无 JS）----
   参考 protipmarketing.com 的文字滚动切换：默认只显示「时间 + 标题」，
   悬停（电脑）/ 滚动到对应位置（手机）时默认文字向上滚出，
   原本完整文本（时间+标题+段落）从下方滚入。
   .cap-full 留在文档流中撑开图说高度——两种状态图说高度一致，排版不变；
   .cap-default 是绝对定位的覆盖层，不占排版 */
.cap-default {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* 时间+标题在图说区垂直居中（高保真图的留白比例） */
  padding: 0 40px;
  opacity: 0;                /* 无动画环境（优雅降级）：显示完整原文 */
}

.cap-full {
  opacity: 1;
}

.night-item h3 {
  font-size: 30px;
  letter-spacing: 5px;
}

.night-item h4 {
  font-size: 17px;
  margin: 10px 0 12px;
}

.night-item p {
  font-size: 14px;
  line-height: 1.7;
  color: #c9c9c9;
  max-width: 640px;
  margin: 0 auto;
}

/* ==================== 总览 ==================== */
.overview {
  background: #fff;
  color: #111;
  padding: 120px 72px 150px;
}

.overview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-top: 2px solid #111;
  padding-top: 70px;
  max-width: 1300px;
  margin: 0 auto 90px;
}

.overview-time {
  font-size: 26px;
  margin-top: 10px;
}

.overview-head h2 {
  font-size: 66px;
  letter-spacing: 8px;
}

.overview-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.4;
  text-align: right;
}

.thumb-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1300px;
  margin: 0 auto;
}

/* 每张缩略图包在一个 <a> 里，链接成为网格的弹性项目，宽度平分一行 6 张 */
.thumb-grid a {
  display: block;
  width: calc((100% - 100px) / 6);
  text-decoration: none;
}

.thumb-grid figure {
  position: relative;
  width: 100%;
  overflow: hidden;   /* 图片放大时裁掉超出格子的部分，格子尺寸与间距不变 */
}

/* 桌面端悬停：图片在格子内平滑放大（课堂知识点：transform 缩放 + transition 过渡；
   transform 不参与排版，因此网格布局不变；手机端的反馈在媒体查询里单独保持原样） */
.thumb-grid a:hover img {
  transform: scale(1.1);
}

.thumb-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition:
    opacity 0.25s,
    transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.thumb-grid span {
  position: absolute;
  right: 9px;
  bottom: 9px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

/* ==================== 页脚 ==================== */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px;
  background: #161616;
  color: #fff;
  padding: 130px 72px;
}

.site-footer h2 {
  font-size: 44px;
  line-height: 1.35;
  letter-spacing: 2px;
}

.footer-info {
  max-width: 640px;
}

.footer-info p {
  font-size: 16px;
  line-height: 1.75;
  color: #e2e2e2;
}

.back-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

.back-top img {
  width: 26px;
  height: 26px;
}

.back-top:hover {
  color: #bbb;
}

/* ==================== 滚动依次出现动效（纯 CSS，无 JS）====================
   课堂知识点：CSS Animation（@keyframes + animation 简写，课件第十一节）、
   opacity 透明度、transform 位移、媒体查询。
   作用范围：仅「03 Dusk 的图片内容」（17:10 大图 + 两排照片）和
   「04 Nightfall 整个部分」（章节头 + 2×2 照片网格），其余区域不设动画。
   原理：animation-timeline: view() 与 02 Daylight 横向滚动用的是同一套
   滚动时间轴写法——把「元素自己进入视口的滚动进度」当作动画时间轴：
   图片/文字块随页面滚动从视口底部进入时，由「透明 + 下移 110px + 轻微缩小」
   平滑回到原本的位置；滚得快就出现得快，滚得慢就慢慢浮现，完全跟手、
   来回滚动会倒放，中间不需要任何 JS。同一排并排的图片再错开各自的
   animation-range，实现一排之内从左到右「依次出现」。
   动画只动 opacity / transform 这两个不重排版的属性，结束状态与原排版
   完全一致，因此桌面端、手机端布局都不变；整段包在 @supports 里，
   不支持滚动时间轴的旧浏览器会自动跳过，元素直接正常显示。*/

@supports (animation-timeline: view()) {

  /* 浮现时的动作幅度：上移 110px + 轻微放大（桌面），手机端幅度相应缩小 */
  :root {
    --reveal-distance: 110px;
    --reveal-scale: 0.94;
  }

  /* 03 Dusk 加强版（手机/电脑端都更明显）：位移加大到 170px、缩放到 0.88，
     并把滚动触发区间从 70% 拉长到 88%——浮现过程铺得更开，肉眼更容易察觉；
     只动 opacity / transform，结束状态不变，排版不受影响；04 Nightfall 保持原幅度 */
  .dusk-feature,
  .dusk-item {
    --reveal-distance: 170px;
    --reveal-scale: 0.88;
  }

  @media (max-width: 768px) {
    :root {
      --reveal-distance: 48px;
    }

    /* 手机端 03 同样加强：位移 48→80px（小屏上比例与桌面端相当） */
    .dusk-feature,
    .dusk-item {
      --reveal-distance: 80px;
    }
  }

  /* 只在「03 Dusk 的图片内容」和「04 Nightfall 整个部分」保留浮现动效；
     其余区域（目录、各章节头、01 时刻卡片、总览缩略图、页脚）不设动画，
     恢复静态显示，排版不受任何影响。
     缓动选得比卡片悬停更平缓（0.22,0.61,0.36,1）：动作在整段滚动里
     均匀展开，不会一开始就结束，肉眼看到的浮现过程更明显 */
  .dusk-feature,
  .dusk-item,
  .chapter-head-night,
  .night-item {
    animation: scroll-reveal cubic-bezier(0.22, 0.61, 0.36, 1) both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }

  /* 03 Dusk 加强：滚动触发区间拉长到 88%，浮现过程更久更醒目（写在基础规则之后覆盖之） */
  .dusk-feature,
  .dusk-item {
    animation-range: entry 0% entry 88%;
  }

  @keyframes scroll-reveal {
    from {
      opacity: 0;
      transform: translateY(var(--reveal-distance)) scale(var(--reveal-scale));
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  /* ---- 依次出现：同一排的元素错开滚动区间，左先右后 ---- */

  /* 03 Dusk 两图一排：右图稍晚 */
  .dusk-row-2 .dusk-item:nth-child(2) {
    animation-range: entry 18% entry 94%;
  }

  /* 03 Dusk 三图一排：左 → 中 → 右依次浮现 */
  .dusk-row-3 .dusk-item:nth-child(2) {
    animation-range: entry 20% entry 92%;
  }

  .dusk-row-3 .dusk-item:nth-child(3) {
    animation-range: entry 36% entry 100%;
  }

  /* 04 Nightfall 两列网格：每排右图稍晚 */
  .night-item:nth-child(2n) {
    animation-range: entry 15% entry 78%;
  }

  /* 系统开启「减少动态效果」时直接显示最终状态，不播放浮现动画 */
  @media (prefers-reduced-motion: reduce) {
    .dusk-feature,
    .dusk-item,
    .chapter-head-night,
    .night-item {
      animation: none;
    }
  }

  /* ---- 04 文字切换（手机端：滚动驱动，同一套 view() 滚动时间轴）----
     时间轴挂在 .night-item 上（整张图片+图说的滚动进度），
     图进入视口中段时：默认文字向上滚出、完整文本滚入；滚出视口后切回 */
  @media (max-width: 768px) {
    .night-item {
      view-timeline-name: --night;
    }

    .night-item .cap-default {
      opacity: 1;
      animation: night-cap-default linear both;
      animation-timeline: --night;
    }

    .night-item .cap-full {
      opacity: 0;
      animation: night-cap-full linear both;
      animation-timeline: --night;
    }
  }

  /* 加强版（手机端）：位移 18→34px 并加轻微缩放，过程窗口拉宽到
     25%→45% / 75%→95%——交换动作在更长的滚动距离里展开，更明显 */
  @keyframes night-cap-full {
    0%, 25% { opacity: 0; transform: translateY(34px) scale(0.96); }
    45%, 75% { opacity: 1; transform: translateY(0) scale(1); }
    95%, 100% { opacity: 0; transform: translateY(-34px) scale(0.96); }
  }

  @keyframes night-cap-default {
    0%, 25% { opacity: 1; transform: translateY(0) scale(1); }
    45%, 75% { opacity: 0; transform: translateY(-34px) scale(0.96); }
    95%, 100% { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* 系统开启「减少动态效果」时直接显示完整原文 */
  @media (prefers-reduced-motion: reduce) {
    .night-item .cap-default {
      display: none;
      animation: none;
    }

    .night-item .cap-full {
      opacity: 1;
      transform: none;
      animation: none;
    }
  }

  /* 打印 / 导出 PDF 时滚动时间轴不会前进，同样直接显示最终内容 */
  @media print {
    .dusk-feature,
    .dusk-item,
    .chapter-head-night,
    .night-item {
      animation: none;
    }
  }
}

/* ==================== 章节卡片堆叠切换（纯 CSS，无 JS）====================
   参考 protipmarketing.com 的卡片前后切换：滑到下一章标题页时，
   上一章在离开视口的最后一屏里「原地定格 + 微微缩小变暗退后」，
   新章节像卡片一样从下方滑上来盖住它（手机端/电脑端通用）。
   ※ 效果只保留在 03（Dusk）→ 04（Night）之间，其余章节之间恢复正常滚动。
   课堂知识点：animation-timeline: view() 滚动时间轴、animation-range 的
   calc() 混合长度（exit 的最后一 100svh）、transform 位移/缩放、opacity、层叠顺序。
   原理：exit 阶段的最后一屏滚动中，translateY 从 0 → 100svh 与滚动速度 1:1
   抵消，章节看起来原地不动，后续章节（层叠顺序在上）自然滑上来盖住。
   动画只动 transform / opacity，不占排版，页面布局完全不变；
   0% 关键帧 transform: none——阅读章节内容时没有任何变形，
   02 介绍卡的 fixed 定位等只在「正在离开视口」的瞬间才有变形，不受影响 */
@supports (animation-timeline: view()) {
  /* 让后续章节盖在前一章之上：全部设相对定位，按文档序自然层叠 */
  main > section,
  .site-footer {
    position: relative;
  }

  /* 定格效果只保留在 03 → 04 之间：03 离开视口时原地定格，
     04 像卡片一样从下方滑上来盖住；其余章节之间正常滚动 */
  main > section.chapter-dusk {
    animation: chapter-card-exit linear both;
    animation-timeline: view();
    /* 定格窗口 130svh：前 30svh 是纯停留（03 底部的同色留白正好在这段
       时间里停在屏幕下沿，04 完全不出现），后 100svh 04 才滑上来盖住 */
    animation-range: exit calc(100% - 130svh) exit 100%;
    transform-origin: 50% 100%;   /* 围绕底缘缩小，定格位置不漂移 */
  }

  /* 锚点跳转兼容（课堂知识点：:has() 关系选择器 + :target 伪类）：
     浏览器计算锚点落点时会带上本章的定格位移（transform），从下方
     OVERVIEW 点 03 的小图返回时会多滚约一个定格窗口、落点被 04 遮盖。
     处理：本章内部一旦有锚点目标（点过小图/目录），就暂时关闭定格动画，
     章节回到无位移状态，锚点落点恢复精确、不再被遮盖；
     普通滚动浏览（无锚点命中）时定格效果完全保留 */
  .chapter-dusk:has(:target) {
    animation: none;
  }

  @keyframes chapter-card-exit {
    0% {
      transform: none;   /* 定格开始前无任何变形 */
      opacity: 1;
    }
    100% {
      transform: translateY(130svh) scale(0.94);
      opacity: 0.55;
    }
  }

  /* 系统开启「减少动态效果」/ 打印时：不播放，章节正常滚动 */
  @media (prefers-reduced-motion: reduce) {
    main > section {
      animation: none;
    }
  }

  @media print {
    main > section {
      animation: none;
    }
  }
}

/* ==================== OVERVIEW 锚点落点校准（纯 CSS，无 JS）====================
   课堂知识点：scroll-margin 滚动边距（锚点跳转的停靠补偿）。
   卡片定格效果只保留在 03 → 04 之间，因此只有 03 靠近章尾的三张照片
   需要校准：落点若停在视口顶部会落在定格区间里（03 已缩小变暗、04 正
   从下方盖上）。加 scroll-margin-top 让落点提前到定格窗口开始之前
   （数值 = 实测最小值 + 安全余量，桌面 1440×900 / 手机 390×844 实测）。
   其余章节已恢复正常滚动，小图定位回到默认（停在视口顶部），无需校准 */
#photo-18-55,
#photo-19-10,
#photo-19-20 {
  scroll-margin-top: 150px;
}

/* ==================== 02 拍立得介绍卡（纯 CSS，无 JS）====================
   课堂知识点：:target 伪类、:has() 关系选择器、锚点链接（a href="#id"）、
   scroll-behavior: smooth 平滑滚动、position: fixed 固定定位、
   transition 过渡、transform 位移/缩放、visibility 延迟隐藏。
   原理：点拍立得照片 = 点锚点链接 → 页面平滑滚动到「该照片居中」的
   滚动位置（复用 OVERVIEW 锚点的实测位置，照片带由滚动动画驱动、
   自然滑到对应照片），同时该锚点的 :target 状态让对应介绍卡从
   「透明 + 下移 28px + 轻微缩小」平滑归位；左右按钮是相邻照片的
   锚点链接，切换时卡片交叉淡入淡出、照片带随平滑滚动滑动；
   点遮罩关闭 = 跳到不存在的 #pc-none（只清 :target、不产生滚动），
   照片带停留在当前位置，不再回弹。介绍卡层 fixed 定位不占文档流，
   页面原本排版完全不受影响 */

/* 拍立得照片的点击热区（label 包住图片，尺寸不变） */
.pc-open {
  display: block;
  cursor: pointer;
}

/* 全屏遮罩层：默认隐藏，任一介绍卡 radio 被选中时显现 */
.pc-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  transition: visibility 0s 0.6s;   /* 等淡出动画播完再真正隐藏 */
}

body:has(#c-11-20:target) .pc-layer,
body:has(#c-11-55:target) .pc-layer,
body:has(#c-12-30:target) .pc-layer,
body:has(#c-13-05:target) .pc-layer,
body:has(#c-13-40:target) .pc-layer,
body:has(#c-14-15:target) .pc-layer,
body:has(#c-14-50:target) .pc-layer,
body:has(#c-15-25:target) .pc-layer {
  visibility: visible;
  transition-delay: 0s;
}

/* 半透明黑遮罩，点它 = 选中「关闭」radio = 收起介绍卡 */
.pc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.5s ease;
}

body:has(#c-11-20:target) .pc-backdrop,
body:has(#c-11-55:target) .pc-backdrop,
body:has(#c-12-30:target) .pc-backdrop,
body:has(#c-13-05:target) .pc-backdrop,
body:has(#c-13-40:target) .pc-backdrop,
body:has(#c-14-15:target) .pc-backdrop,
body:has(#c-14-50:target) .pc-backdrop,
body:has(#c-15-25:target) .pc-backdrop {
  opacity: 1;
}

/* ---- 介绍卡本体（按 Frame 204 高保真图实测：白卡约 855×730、大圆角 44px，
     内部再套一个 4px 黑边圆角框包住图文，按钮在黑框下方的白卡区域）---- */
.pc-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 855px;
  max-width: 94vw;
  height: 730px;
  display: flex;
  gap: 23px;
  /* 上/左/下 padding 直接取黑框 inset（48/43/88）：图片边缘压到黑框边框之下
     （边框画在图片之上），任何浏览器都不会出现白缝；可见部分正好贴齐框内缘 */
  padding: 48px 59px 88px 43px;
  border-radius: 44px;
  background: #fff;
  color: #111;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) translateY(28px) scale(0.96);
  transition:
    opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
    visibility 0s 0.6s;
}

/* 内层黑色圆角框（课堂知识点：伪元素 + position 绝对定位 + border 边框）：
   只画 4px 边线、内部透明，照片和文字都在框内留白区，互不遮挡；
   pointer-events:none 不拦截任何点击 */
.pc-card::before {
  content: "";
  position: absolute;
  top: 48px;
  left: 43px;
  right: 43px;
  bottom: 88px;
  border: 4px solid #111;
  border-radius: 28px;
  pointer-events: none;
}

/* 只有被选中的那张卡显示 */
body:has(#c-11-20:target) .pc-card-1,
body:has(#c-11-55:target) .pc-card-2,
body:has(#c-12-30:target) .pc-card-3,
body:has(#c-13-05:target) .pc-card-4,
body:has(#c-13-40:target) .pc-card-5,
body:has(#c-14-15:target) .pc-card-6,
body:has(#c-14-50:target) .pc-card-7,
body:has(#c-15-25:target) .pc-card-8 {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) translateY(0) scale(1);
  transition-delay: 0s;
}

.pc-photo {
  width: 378px;          /* 左缘 3px 压在黑框左边框之下（可见宽度仍 375 起算） */
  height: 594px;         /* 上下各 4px 压在边框之下，可见高度 = 框内高 586 */
  object-fit: cover;
  flex-shrink: 0;
  /* 左上下两角用黑框外缘圆角 28，被 4px 边框盖住后可见为内缘圆角 24 */
  border-radius: 28px 0 0 28px;
}

/* 文字块在黑框右半内垂直居中（高保真图位置） */
.pc-text {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pc-text h3 {
  font-size: 32px;
  letter-spacing: 2px;
}

.pc-text h4 {
  font-size: 22px;
  margin: 12px 0 14px;
}

.pc-text p {
  font-size: 16px;
  line-height: 1.7;
  color: #222;
}

/* 左右切换按钮（label + images 文件夹里的箭头 SVG） */
.pc-btns {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 53px;   /* 两圆心间距约 115px（按高保真实测） */
}

.pc-btns a {
  display: block;
  width: 62px;
  height: 62px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pc-btns a:hover {
  transform: scale(1.1);
}

.pc-btns img {
  width: 100%;
  height: 100%;
  display: block;
}


/* ---- 介绍卡中等屏适配（769px – 1100px）：等比缩小 ---- */
@media (min-width: 769px) and (max-width: 1100px) {
  .pc-card {
    width: 700px;
    height: 600px;
    /* 与桌面同理：图片压到黑框边框之下（inset 40/36/72） */
    padding: 40px 48px 72px 36px;
    gap: 20px;
    border-radius: 36px;
  }

  .pc-card::before {
    top: 40px;
    left: 36px;
    right: 36px;
    bottom: 72px;
    border-width: 3px;
    border-radius: 22px;
  }

  .pc-photo {
    width: 303px;
    height: 488px;       /* 上下各 3px 压边框，可见 = 框内高 482 */
    border-radius: 22px 0 0 22px;
  }

  .pc-text h3 {
    font-size: 28px;
  }

  .pc-text h4 {
    font-size: 19px;
    margin: 10px 0 12px;
  }

  .pc-text p {
    font-size: 14.5px;
    line-height: 1.65;
  }

  .pc-btns {
    bottom: 16px;
    gap: 44px;
  }

  .pc-btns a {
    width: 52px;
    height: 52px;
  }
}

/* ---- 04 文字切换（电脑端：hover 触发，protip 式上下滚动交换）----
   课堂知识点：:hover 伪类、transition 过渡、transform 位移、opacity 透明度 */
@media (min-width: 769px) {
  .cap-default,
  .cap-full {
    transition:
      opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
      transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  /* 未悬停：只显示 时间+标题；完整文本藏在下方 18px 处待命 */
  .night-item .cap-default {
    opacity: 1;
    transform: translateY(0);
  }

  .night-item .cap-full {
    opacity: 0;
    transform: translateY(18px);
  }

  /* 悬停：默认文字向上滚出，完整文本从下方滚入（错开 0.08s 更有层次） */
  .night-item:hover .cap-default {
    opacity: 0;
    transform: translateY(-18px);
  }

  .night-item:hover .cap-full {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.08s;
  }
}

/* ==================== 手机端适配 ==================== */
/* 屏幕宽度不超过 768px 时，下面的规则会覆盖上面的桌面端规则 */

@media (max-width: 768px) {

  /* ---- 导航：汉堡图标 + 竖排链接 ---- */
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 22px 24px;
  }

  /* ---- 导航：点汉堡图标展开/收起菜单 ---- */
  .nav-toggle-label {
    display: inline-block;
    cursor: pointer;
    margin-bottom: 18px;
  }

  .nav-icon {
    display: block;
    width: 30px;
    height: 30px;
  }

  /* 菜单默认收起 */
  .top-nav ul {
    display: none;
    flex-direction: column;
    gap: 16px;
  }

  /* 菜单展开状态：:target 在 #nav-open 上时显示菜单（课堂知识点：:target 伪类 +
     :has() 关系选择器）；此时汉堡图标换成「关闭」图标 */
  .nav-close {
    display: none;
  }

  .top-nav:has(#nav-open:target) ul {
    display: flex;
  }

  .top-nav:has(#nav-open:target) .nav-open {
    display: none;
  }

  .top-nav:has(#nav-open:target) .nav-close {
    display: inline-block;
  }

  .top-nav a {
    font-size: 13px;
  }

  /* ---- 封面 ---- */
  /* 手机端高保真图封面为居中对齐：还原文字对齐，padding 简写同时
     把桌面端的 padding-right 重置回 24px */
  .hero-title {
    width: 100%;
    padding: 0 24px;
    padding-top: 36vh;
    text-align: center;
  }

  .hero-title h1 {
    font-size: 46px;
  }

  .hero-sub {
    margin-top: 18px;
    font-size: 14px;
    letter-spacing: 3px;
  }

  .hero-meta {
    font-size: 11px;
    margin-top: 14px;   /* 保持手机端原来的间距，不随桌面端改动 */
  }

  /* ---- 目录：单列 ---- */
  .contents {
    flex-direction: column;
    gap: 44px;
    padding: 90px 24px 100px;
  }

  .contents-intro {
    width: 100%;
  }

  .contents-intro h2,
  .contents-list h2 {
    font-size: 30px;
  }

  .contents-list a {
    font-size: 40px;
    line-height: 2;
  }

  /* ---- 章节头 ---- */
  .chapter-head {
    padding: 80px 24px 90px;
  }

  .chapter-num {
    font-size: 150px;
  }

  .chapter-head h2 {
    font-size: 44px;
  }

  .chapter-time {
    font-size: 16px;
  }

  .chapter-intro {
    font-size: 14px;
  }

  /* ---- 01 卡片：横幅 + 大时间（收起态与之前完全一致），
     点按卡片展开为“上图下文”详情卡（Frame 201）----
     课堂知识点：:target 伪类 + 锚点链接（与导航汉堡菜单、02 介绍卡同一套技巧）：
     「展开」层是指向卡片自身 id 的锚点，:target 命中后切换为展开样式；
     锚点跳转配合 scroll-margin 把卡片正好停在屏幕中心；
     :target 全页同一时刻只有一个，点开另一张时上一张自动收回；
     「收回」层跳到不存在的 #mc-none，只清 :target、不产生滚动。全程无 JS */
  .chapter-morning {
    padding: 0 0 90px;
  }

  /* 01 章节头按手机端高保真图实测微调（课堂知识点：盒模型 margin/padding、
     媒体查询、文本居中）：数字「01」贴近顶部且不与标题重叠（不再用负 margin
     上拉），标题用 margin-top 下压到头部下半部，时间、引言依次紧随其下 */
  .chapter-morning .chapter-head {
    padding: 27px 24px 55px;
  }

  .chapter-morning .chapter-num {
    margin-bottom: 0;
  }

  .chapter-morning .chapter-head h2 {
    margin-top: 327px;
  }

  .chapter-morning .chapter-time {
    margin-top: 16px;
  }

  /* 引言限宽 305px，换行位置与高保真图一致；行距收紧到 1.5 */
  .chapter-morning .chapter-intro {
    margin: 7px auto 0;
    line-height: 1.5;
    max-width: 305px;
  }

  .moment-card,
  .moment-narrow {
    display: block;
    width: auto;
    height: auto;
    /* 收起时只露出 180px 横幅，下面的内容被裁掉；max-height 可以做过渡动画 */
    max-height: 180px;
    margin: 24px 16px 0;
    border-radius: 20px;
    /* 展开/回收时长与电脑端 hover 一致（0.75s，同一缓动曲线） */
    transition: max-height 0.75s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* 点按展开时锚点跳转的停靠位置：卡片垂直居中于屏幕
       （课堂知识点：scroll-margin 滚动边距、calc() 计算、svh 视口单位）；
       数值 = 半个视口高 − 半个卡片展开高（展开高为实测值，见下方两类卡片） */
    scroll-margin-top: 162px;
    scroll-margin-top: calc(50svh - 260px);
  }

  /* 窄卡（竖图 2:3）展开后更高（实测约 847~870px），居中补偿值相应加大 */
  .moment-narrow {
    scroll-margin-top: 0;
    scroll-margin-top: calc(50svh - 430px);
  }

  /* 切换卡片不抖动：一张已展开时点另一张，上一张瞬间收回（不占过渡时间），
     页面布局立即稳定，平滑滚动一步到位停在新卡片中心，不会上下来回找位置；
     正常「点收回层关闭」时不命中此规则，仍是 0.75s 平滑收起 */
  .chapter-morning:has(.moment-card:target) .moment-card:not(:target) {
    transition: none;
  }

  .moment-card img {
    width: 100%;
    height: 180px;
    border-radius: 20px;
  }

  /* 透明点击层：盖满整张卡片，点哪里都等于点对应的 radio */
  .moment-tap {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 3;
  }

  /* ---- 一次只展开一张：:target 全页唯一，点开另一张时上一张自动失焦收回 ----
     每张卡片两层透明锚点：收起态露出「展开」层（跳到卡片自身 id）；
     展开后换成「收回」层（跳到不存在的 #mc-none，只收起、不滚动），
     点已展开的卡片自身也能收回 */
  .moment-tap-close {
    display: none;   /* 收起态只露出「展开」层 */
  }

  .moment-card:target .moment-tap {
    display: none;   /* 展开后「展开」层让位 */
  }

  .moment-card:target .moment-tap-close {
    display: block;  /* 换成「收回」层盖在最上 */
  }

  /* 文字面板：收起时在文档流中但被 max-height 裁掉且透明 */
  .moment-text,
  .moment-narrow .moment-text {
    position: static;
    width: 100%;
    padding: 24px 12px 14px;
    opacity: 0;
    transform: translateY(16px);
  }

  /* 触屏上没有悬停，点按不触发桌面端的收缩动效 */
  .moment-card:hover,
  .moment-narrow:hover {
    height: auto;
    max-height: 180px;
  }

  .moment-card:hover img {
    width: 100%;
  }

  /* 大时间样式与修改前手机端的时间文字一致 */
  .moment-bigtime,
  .moment-narrow .moment-bigtime {
    font-size: 26px;
    letter-spacing: 5px;
  }

  .moment-card:hover .moment-bigtime {
    opacity: 1;
  }

  /* ---- 点按后的展开态（Frame 201：上图 + 下方白框文字卡）---- */
  .moment-card:target {
    max-height: 1500px;
  }

  /* 展开时图片恢复原始比例：宽图 3:2、竖图 2:3 */
  .moment-card:target img {
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .moment-card.moment-narrow:target img {
    aspect-ratio: 2 / 3;
  }

  /* 文字面板延迟淡入 + 上滑归位（延迟与电脑端 hover 一致），大时间同时淡出 */
  .moment-card:target .moment-text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.18s;
  }

  .moment-card:target .moment-bigtime {
    opacity: 0;
  }

  /* 展开态文字卡样式（按 Frame 201） */
  .moment-frame {
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 22px 20px;
  }

  .moment-frame h3 {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .moment-frame h4 {
    font-size: 15px;
    margin: 10px 0 8px;
  }

  .moment-frame p {
    font-size: 13px;
  }

  /* ---- 02 Daylight ---- */
  /* 02 章节头按手机端高保真图实测微调（课堂知识点：盒模型、Flexbox 纵排 + gap、
     媒体查询）：内边距收紧为 32/36/15，数字「02」不再用负 margin 上拉、
     且比文字块更靠左 22px；标题用 margin-top 下压与数字拉开距离；
     引言与侧栏正文行距收紧、段间距与图一致 */
  .chapter-head-daylight {
    flex-direction: column;
    align-items: flex-start;
    gap: 39px;
    /* 下内边距 15→46px：底部文字上移，与封面下沿留出一小段边距；
       封面 min-height:100vh 不变，只改头部内部位置，排版不受影响 */
    padding: 32px 36px 46px;
  }

  .head-left,
  .chapter-side {
    width: 100%;
  }

  .chapter-head-daylight .chapter-num {
    margin-bottom: 0;
    margin-left: -22px;
  }

  .chapter-head-daylight h2 {
    /* 228→197px：抵消下方增大的底部内边距，封面总高与之前完全一致，
       只是整组文字相对封面下沿上移、留出底部边距 */
    margin-top: 197px;
  }

  .chapter-head-daylight .chapter-time {
    margin-top: 16px;
  }

  .chapter-head-daylight .chapter-lead {
    margin-top: 7px;
    line-height: 1.3;
  }

  .chapter-lead {
    font-size: 16px;
  }

  .chapter-side p {
    font-size: 14px;
    line-height: 1.1;
    margin-bottom: 15px;
  }

  /* 最后一段不再加段间距，底部留白与高保真图一致 */
  .chapter-head-daylight .chapter-side p:last-child {
    margin-bottom: 0;
  }

  .polaroid-strip {
    gap: 30px;
    /* 手机端同样右侧留 16px，与第一张左侧边距一致 */
    padding: 120px 16px 50px 16px;
  }

  .polaroid {
    width: 162px;
    padding: 10px 10px 14px;
  }

  .polaroid::before {
    top: -120px;
    height: 120px;
  }

  .polaroid figcaption {
    font-size: 11px;
  }

  .polaroid figcaption strong {
    font-size: 12px;
    letter-spacing: 1px;
  }

  /* 手机端：照片带吸顶时顶端与屏幕顶端对齐（挂绳从屏幕顶部开始）；
     总结文字改为与电脑端一致的做法——用 position 绝对定位（课堂知识点）
     放在滚动容器正下方，横滚吸顶期间在视口外，吸顶松开后随页面正常向上滚动，
     不再用 sticky 钉在照片带下方，避免滑到末尾时文字被照片带顶住“缩进去” */
  .daylight-hscroll {
    /* 总结文字是绝对定位（不占文档流），这里用 margin 给它预留位置（盒模型），
       避免后面的 03 Dusk 章节上移把它盖住；取值 > 文字内容的实测高度 */
    margin-bottom: 320px;
  }

  .daylight-sticky {
    height: auto;   /* 只要照片带自身高度，不再占满整个屏幕 */
  }

  .daylight-summary {
    position: absolute;   /* 课堂知识点 position 绝对定位：相对 .daylight-hscroll 定位 */
    top: 100%;            /* 正好接在 320vh 滚动容器的下沿 */
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 24px;
    padding: 0 24px 60px;
    background: #000;
  }

  .daylight-summary h2 {
    font-size: 38px;
  }

  .daylight-summary p {
    font-size: 15px;
  }

  /* 手机端锚点位置（同一换算，实测：横移满程 = 1538-390 = 1148px，历时 1857px 滚动；
     右内边距 16px 后重新标定；第一张 top:0 沿用上方基础规则，不用覆写；
     末张锚点取横移尽头 1857px，再多滚照片带会被吸顶释放带上移） */
  #a-11-55, #c-11-55 { top: 152px; }
  #a-12-30, #c-12-30 { top: 463px; }
  #a-13-05, #c-13-05 { top: 774px; }
  #a-13-40, #c-13-40 { top: 1084px; }
  #a-14-15, #c-14-15 { top: 1395px; }
  #a-14-50, #c-14-50 { top: 1705px; }
  #a-15-25, #c-15-25 { top: 1857px; }

  /* ---- 介绍卡（手机端，按 390 高保真图实测：白卡竖排——上图、
     居中时间与标题、左对齐正文、底部居中双按钮）----
     正文区可上下滑动（课堂知识点：overflow-y 滚动、Flexbox 的
     flex + min-height 收缩）：卡片限高 86vh，图片与按钮位置固定，
     只有中间文字区超出时内部滚动，不会与图片、按钮重合 */
  .pc-card {
    width: 314px;
    max-width: 88vw;
    height: 630px;             /* 高保真实测卡高（844 视口）；文字区随 flex 收缩、内部滚动 */
    max-height: 86vh;
    flex-direction: column;
    align-items: center;
    gap: 0;
    /* 黑框 inset 上/左/右 = 23px（按高保真图加宽白边）；padding 直接取 inset，
       图片边缘压到 3px 边框之下——可见部分贴齐框内缘，不会有白缝；
       底部 padding 67 = 黑框 inset 57 + 边框 3 + 文字内边距 7 */
    padding: 23px 23px 67px;
    border-radius: 24px;
    overflow: hidden;          /* 卡片内容绝不溢出到按钮区域 */
  }

  /* 手机端内层黑框：3px 边线、圆角 16px，按钮区留在框外下方 */
  .pc-card::before {
    top: 23px;
    left: 23px;
    right: 23px;
    bottom: 57px;        /* 黑框下沿抬高，给按钮区让位（按钮下方留白同步加宽） */
    border-width: 3px;
    border-radius: 16px;
  }

  .pc-photo {
    width: 100%;               /* 左右各 3px 压在黑框边框之下，可见部分贴齐框内缘 */
    height: auto;
    aspect-ratio: 18 / 25;     /* 按高保真实测比例 */
    border-radius: 16px 16px 0 0;   /* 上两角用黑框外缘圆角，被边框盖住后可见为内缘圆角 */
    flex-shrink: 0;            /* 图片固定高度，不被文字挤压 */
  }

  .pc-text {
    flex: 1;                   /* 占满图片与按钮之间的剩余空间 */
    min-height: 0;             /* 允许 flex 子项收缩到内容高度以下 */
    overflow-y: auto;          /* 文字超出时在此区域内部上下滑动 */
    justify-content: flex-start;   /* 修复：桌面继承的垂直居中会把顶部时间/标题推出可视区 */
    width: 100%;
    margin-top: 16px;          /* 文字区与上方图片的固定间隔，滚动时也不会挨上 */
    padding: 0 8px;            /* 文字与黑框内缘留一点距离 */
    text-align: center;
    scrollbar-width: thin;
  }

  .pc-text h3 {
    font-size: 24px;
    margin-top: 0;             /* 时间紧贴图片下方（间隔由 .pc-text 的 margin-top 给） */
  }

  .pc-text h4 {
    font-size: 17px;
    margin: 8px 0 10px;
  }

  .pc-text p {
    font-size: 13px;
    line-height: 1.65;
    text-align: left;
  }

  /* 按钮按高保真实测：36px 黑圆、两圆间距 134px；下方与白卡边的距离加宽到 14px */
  .pc-btns {
    bottom: 14px;
    gap: 134px;
  }

  .pc-btns a {
    width: 36px;
    height: 36px;
  }


  /* ---- 03 黄昏：全部单列 ---- */
  .chapter-head-dusk {
    background-size: cover;
    padding: 90px 24px 100px;
  }

  .chapter-head-dusk .chapter-num {
    margin-top: 30px;
  }

  .chapter-head-dusk h2,
  .chapter-head-dusk .chapter-time,
  .chapter-head-dusk .chapter-lead {
    max-width: 100%;
  }

  .dusk-feature {
    margin: 70px 16px 0;
  }

  .dusk-row {
    flex-direction: column;
    gap: 44px;
    margin: 70px 16px 0;
  }

  .dusk-feature h3 {
    font-size: 26px;
  }

  .dusk-item h3 {
    font-size: 24px;
    margin-top: 18px;
  }

  figcaption h4 {
    font-size: 16px;
  }

  figcaption p {
    font-size: 14px;
  }

  /* ---- 04 夜幕：单列 ---- */
  .chapter-head-night {
    padding: 100px 24px 110px;
  }

  .night-item {
    width: 100%;
  }

  .night-item figcaption {
    padding: 26px 24px 50px;
  }

  .night-item h3 {
    font-size: 24px;
  }

  /* ---- 总览：一行三张 ---- */
  .overview {
    padding: 90px 24px 110px;
  }

  .overview-head {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding-top: 46px;
    margin-bottom: 56px;
  }

  .overview-time {
    font-size: 16px;
  }

  .overview-head h2 {
    font-size: 40px;
    letter-spacing: 5px;
  }

  .overview-name {
    font-size: 18px;
    text-align: center;
  }

  .thumb-grid {
    gap: 12px;
  }

  .thumb-grid a {
    width: calc((100% - 24px) / 3);
  }

  .thumb-grid span {
    font-size: 10px;
    right: 6px;
    bottom: 6px;
  }

  /* 手机端保持原来的点按反馈：图片不放大，只轻微变暗 */
  .thumb-grid a:hover img {
    transform: none;
    opacity: 0.7;
  }

  /* ---- 页脚 ---- */
  .site-footer {
    flex-direction: column;
    gap: 34px;
    padding: 80px 24px 90px;
  }

  .site-footer h2 {
    font-size: 32px;
  }

  .footer-info p {
    font-size: 14px;
  }
}
