/* =============================================================
   孔雀馆 · style.css
   自然博物馆图录 / 摄影画册风格 · 深墨环境 · 金色克制点缀
   ============================================================= */

/* ---------- 字体策略 ----------
   当前使用系统字体回退栈(见 --font-* 变量),无外部/自托管字体请求。
   如需自托管子集字体:运行 build/subset-fonts.sh 生成 assets/fonts/*.woff2,
   再在此处加回 @font-face(font-display: swap)即可,变量无需改动。 */

/* ---------- 1. :root 变量(设计令牌 + 字体族) ---------- */
:root {
  /* 色板 */
  --ink: #071714;
  --ink-soft: #0D2420;
  --forest: #133B34;
  --peacock: #176B73;
  --emerald: #2B8068;
  --brass: #B99A55;
  --warning: #A65C4B;
  --ivory: #ECE9DF;
  --paper: #D9D5C9;
  --muted: #969E96;

  /* 布局 */
  --page-padding: clamp(20px, 5vw, 80px);
  --content-wide: 1440px;
  --content-text: 680px;

  /* 动画 */
  --ease-editorial: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 260ms;
  --dur-normal: 700ms;
  --dur-slow: 1200ms;

  /* 字体族 */
  --font-serif-sc: "Noto Serif SC", "Songti SC", "SimSun", "STSong", serif;
  --font-sans-sc: "Noto Sans SC", -apple-system, "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-serif-lat: Georgia, "Times New Roman", "Noto Serif SC", serif;

  /* 章节垂直节律 */
  --section-gap: clamp(72px, 9vw, 140px);

  /* 网格 */
  --grid-gap: clamp(20px, 3vw, 44px);

  color-scheme: dark;
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--ivory);
  font-family: var(--font-sans-sc);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif-sc);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  letter-spacing: .01em;
}

p {
  margin: 0 0 1.2em;
}

::selection {
  background: var(--brass);
  color: var(--ink);
}

/* 版心容器 */
.wrap,
.section__inner {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}

/* 通用 12 列网格辅助 */
.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  align-items: start;
}

/* 章节通用间距 */
section {
  padding-block: var(--section-gap);
  position: relative;
}

/* =============================================================
   顶栏 topbar
   ============================================================= */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.4vw, 30px) var(--page-padding);
  mix-blend-mode: difference;
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}
.topbar__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ivory);
}
.topbar__name {
  font-family: var(--font-serif-sc);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 500;
  letter-spacing: .14em;
}
.topbar__dom {
  font-family: var(--font-serif-lat);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass);
}
.topbar__menu {
  display: none;
  background: none;
  border: 1px solid rgba(236, 233, 223, .4);
  color: var(--ivory);
  font-family: var(--font-sans-sc);
  font-size: 13px;
  letter-spacing: .18em;
  padding: 8px 16px;
  cursor: pointer;
}

/* =============================================================
   侧边导航 sidenav
   ============================================================= */
.sidenav {
  position: fixed;
  top: 50%;
  right: clamp(18px, 2.4vw, 40px);
  transform: translateY(-50%);
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: right;
}
.sidenav__item {
  font-family: var(--font-serif-lat);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--muted);
  position: relative;
  padding-right: 20px;
  text-shadow: 0 1px 4px rgba(7, 23, 20, .6);
  transition: color var(--dur-fast) var(--ease-editorial);
}
.sidenav__item::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 8px;
  height: 1px;
  background: currentColor;
  transition: width var(--dur-fast) var(--ease-editorial);
}
.sidenav__item:hover {
  color: var(--ivory);
}
.sidenav__item.is-active {
  color: var(--brass);
}
.sidenav__item.is-active::after {
  width: 16px;
}

/* =============================================================
   移动端全屏目录 mobilenav
   ============================================================= */
.mobilenav {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 4vh, 34px);
  padding: var(--page-padding);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity var(--dur-normal) var(--ease-editorial),
    transform var(--dur-normal) var(--ease-editorial);
}
.mobilenav[hidden] {
  display: none;
}
.mobilenav.is-open {
  opacity: 1;
  transform: none;
}
.mobilenav__item {
  font-family: var(--font-serif-sc);
  font-size: clamp(28px, 8vw, 48px);
  color: var(--ivory);
  line-height: 1;
}
.mobilenav__item .secnum {
  margin-right: .5em;
}
.mobilenav__close {
  position: absolute;
  top: clamp(16px, 3vw, 30px);
  right: var(--page-padding);
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 28px;
  cursor: pointer;
}

/* =============================================================
   4. 通用组件
   ============================================================= */

/* 文字链接 txtlink(hover 横线延长) */
.txtlink {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-sans-sc);
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--brass);
  text-transform: uppercase;
  cursor: pointer;
}
.txtlink__line {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: currentColor;
  transition: width var(--dur-normal) var(--ease-editorial);
  transform-origin: left center;
  align-self: center;
}
.txtlink:hover .txtlink__line {
  width: 72px;
}

/* 信息栏 factlist(dl 网格) */
.factlist {
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(185, 154, 85, .28);
}
.factlist__row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 2.4fr;
  gap: var(--grid-gap);
  padding: 14px 0;
  border-bottom: 1px solid rgba(185, 154, 85, .18);
}
.factlist dt {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
  font-family: var(--font-sans-sc);
}
.factlist dd {
  margin: 0;
  font-size: 16px;
  color: var(--ivory);
}
.factlist dd .latin {
  color: var(--brass);
}

/* 两行标签 tag */
.tag {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.tag__label {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.tag__value {
  font-family: var(--font-serif-sc);
  font-size: 22px;
  color: var(--ivory);
  line-height: 1.1;
}

/* 图注 fig / figcaption */
.fig {
  margin: 0;
}
.fig picture,
.fig img {
  width: 100%;
  height: auto;
  border-radius: 2px; /* 主图 0-4px */
  object-fit: cover;
}
.fig__cap {
  margin-top: 12px;
  font-family: var(--font-serif-lat);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: .01em;
  padding-left: 14px;
  border-left: 1px solid var(--brass);
}

/* 章节编号 secnum */
.secnum {
  font-family: var(--font-serif-lat);
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--brass);
  display: inline-block;
}

/* 拉丁学名 latin */
.latin {
  font-family: var(--font-serif-lat);
  font-style: italic;
  letter-spacing: .01em;
  color: var(--muted);
}

/* 章节标题通用 */
.section__num {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(20px, 3vw, 40px);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
}
.section__num::before {
  content: "";
  width: clamp(40px, 6vw, 90px);
  height: 1px;
  background: var(--brass);
  opacity: .6;
}
.section__title {
  font-size: clamp(42px, 6vw, 86px);
}
.section__lead {
  max-width: var(--content-text);
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--paper);
  line-height: 1.8;
}

/* 正文版心 */
.prose {
  max-width: var(--content-text);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.8;
  color: var(--paper);
}
.prose p + p {
  margin-top: 1.2em;
}

/* =============================================================
   00 · Hero(5 + 7 网格)
   ============================================================= */
.hero {
  min-height: 74svh;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(30px, 4vw, 64px);
  align-items: center;
  padding-block: clamp(84px, 11vh, 130px) clamp(48px, 6vw, 90px);
  padding-inline: var(--page-padding);
}
.hero__text {
  align-self: center;
}
.hero__eyebrow {
  font-family: var(--font-serif-lat);
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(64px, 10vw, 148px);
  line-height: .96;
  letter-spacing: .02em;
}
.hero__latin,
.hero__deco {
  font-family: var(--font-serif-lat);
  font-size: clamp(14px, 2vw, 22px);
  letter-spacing: .3em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 18px;
  display: block;
}
.hero__intro {
  max-width: 42ch;
  margin-top: clamp(24px, 4vh, 48px);
  color: var(--paper);
  font-size: clamp(16px, 1.3vw, 18px);
}
.hero__media {
  align-self: stretch;
  overflow: hidden;
  border-radius: 2px;
}
.hero__media img,
.hero__media picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom var(--dur-slow) var(--ease-editorial) both;
}
@keyframes heroZoom {
  from {
    transform: scale(1.03);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* =============================================================
   03(引言)· intro
   ============================================================= */
.intro__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}
.intro__title {
  grid-column: 1 / 6;
  font-size: clamp(42px, 6vw, 86px);
}
.intro__body {
  grid-column: 6 / 12;
  max-width: var(--content-text);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.85;
  color: var(--paper);
}

/* =============================================================
   物种通用 species(+ 修饰)
   ============================================================= */
.species__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--page-padding);
  align-items: start;
}
.species__header {
  grid-column: 1 / 13;
  margin-bottom: clamp(30px, 5vw, 70px);
}

/* 01 蓝孔雀:8 + 4 */
.species--blue {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
}
.species--blue .species__media {
  grid-column: 1 / 9;
}
.species--blue .species__aside {
  grid-column: 9 / 13;
}

/* 02 绿孔雀:4 + 1 + 7,深绿背景 */
.species--green {
  background: var(--forest);
}
.species--green .species__aside {
  grid-column: 1 / 5;
}
.species--green .species__gutter {
  grid-column: 5 / 6;
}
.species--green .species__media {
  grid-column: 6 / 13;
}
/* 铜红保护标(全站唯一一次,低饱和) */
.species--green .tag--warning .tag__value {
  color: var(--warning);
}
.species--green .tag--warning .tag__label {
  color: rgba(236, 233, 223, .6);
}

/* 03 刚果孔雀:2 + 5 + 1 + 4 */
.species--congo {
  background: linear-gradient(180deg, var(--ink-soft) 0%, var(--ink) 100%);
}
.species--congo .species__num {
  grid-column: 1 / 3;
}
.species--congo .species__media {
  grid-column: 3 / 8;
}
.species--congo .species__gutter {
  grid-column: 8 / 9;
}
.species--congo .species__aside {
  grid-column: 9 / 13;
}

.species__media picture,
.species__media img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  object-fit: cover;
}
.species__aside {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 36px);
}
.species__title {
  font-size: clamp(42px, 6vw, 86px);
}
.species__latin {
  display: block;
  margin-top: 12px;
}
.species__gutter {
  display: none;
}
@media (min-width: 1025px) {
  .species__gutter {
    display: block;
  }
}

/* =============================================================
   白孔雀插页 insert--white(唯一浅色反转段)
   ============================================================= */
.insert--white {
  background: var(--ivory);
  color: var(--ink-soft);
}
.insert--white .insert__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--page-padding);
  align-items: center;
}
.insert--white .insert__title {
  grid-column: 1 / 7;
  color: var(--forest);
  font-size: clamp(42px, 6vw, 86px);
}
.insert--white .insert__body {
  grid-column: 7 / 13;
  color: var(--ink-soft);
  max-width: var(--content-text);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.85;
}
.insert--white .insert__media {
  grid-column: 1 / 13;
  margin-top: clamp(30px, 5vw, 60px);
}
.insert--white .latin {
  color: var(--peacock);
}
.insert--white .fig__cap {
  color: #5a6058;
  border-left-color: var(--forest);
}
.insert--white .secnum,
.insert--white .txtlink {
  color: var(--forest);
}

/* =============================================================
   07 · 分布地图 map
   ============================================================= */
.map__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}
.map__header {
  grid-column: 1 / 13;
  margin-bottom: clamp(30px, 4vw, 60px);
}
.map__figure {
  grid-column: 1 / 9;
}
.map__legend {
  grid-column: 9 / 13;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.map__legend-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--paper);
}
.map__legend-item::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  background: var(--swatch, var(--peacock));
  transform: translateY(2px);
}

/* =============================================================
   08 · 摄影画廊 gallery
   ============================================================= */
.gallery__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}
.gallery__header {
  margin-bottom: clamp(30px, 4vw, 60px);
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  grid-auto-flow: dense;
}
.gallery__cell {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
  grid-column: span 4;
}
.gallery__cell picture,
.gallery__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-editorial);
}
.gallery__cell:hover img {
  transform: scale(1.04);
}
.gallery__cell figcaption,
.gallery__cell .fig__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px;
  background: linear-gradient(0deg, rgba(7, 23, 20, .82), transparent);
  color: var(--ivory);
  border: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-editorial);
}
.gallery__cell:hover figcaption {
  opacity: 1;
}

/* 5 种比例修饰 */
.gallery__cell--wide {
  grid-column: span 8;
  aspect-ratio: 16 / 9;
}
.gallery__cell--square {
  grid-column: span 4;
  aspect-ratio: 1 / 1;
}
.gallery__cell--portrait {
  grid-column: span 4;
  aspect-ratio: 3 / 4;
}
.gallery__cell--pano {
  grid-column: span 12;
  aspect-ratio: 21 / 7;
}
.gallery__cell--crop {
  grid-column: span 6;
  aspect-ratio: 4 / 5;
}

/* =============================================================
   09 · 观察笔记 notes(details)
   ============================================================= */
.notes__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--page-padding);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}
.notes__header {
  grid-column: 1 / 5;
  position: sticky;
  top: clamp(80px, 12vh, 140px);
  align-self: start;
}
.notes__list {
  grid-column: 5 / 13;
}
.note {
  border-top: 1px solid rgba(185, 154, 85, .28);
}
.note:last-child {
  border-bottom: 1px solid rgba(185, 154, 85, .28);
}
.note__head {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 2.4vw, 30px) 0;
  font-family: var(--font-serif-sc);
  font-size: clamp(20px, 2.4vw, 30px);
  color: var(--ivory);
  transition: color var(--dur-fast) var(--ease-editorial);
}
.note__head:hover {
  color: var(--brass);
}
.note__head::-webkit-details-marker {
  display: none;
}
/* ＋ / − 号 via 伪元素 */
.note__head::after {
  content: "＋";
  font-family: var(--font-sans-sc);
  font-size: 22px;
  color: var(--brass);
  line-height: 1;
  flex: none;
  transition: transform var(--dur-fast) var(--ease-editorial);
}
.note[open] .note__head::after {
  content: "−";
}
.note__body {
  padding-bottom: clamp(20px, 3vw, 34px);
  max-width: var(--content-text);
  color: var(--paper);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.8;
}

/* =============================================================
   10 · 页尾 colophon
   ============================================================= */
.colophon {
  background: var(--ink-soft);
  border-top: 1px solid rgba(185, 154, 85, .2);
}
.colophon__inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--page-padding);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}
.colophon__brand {
  grid-column: 1 / 6;
  font-family: var(--font-serif-sc);
  font-size: clamp(30px, 4vw, 56px);
  color: var(--ivory);
}
.colophon__meta {
  grid-column: 8 / 13;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.colophon__meta a:hover {
  color: var(--brass);
}

/* =============================================================
   灯箱 dialog(原生 <dialog>)
   ============================================================= */
.lightbox,
dialog[data-lightbox] {
  padding: 0;
  border: none;
  border-radius: 0; /* 弹窗 0px */
  background: var(--ink);
  color: var(--ivory);
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.lightbox::backdrop,
dialog[data-lightbox]::backdrop {
  background: rgba(7, 23, 20, .92);
  backdrop-filter: blur(2px);
}
dialog[data-lightbox][open] {
  animation: lbFade var(--dur-normal) var(--ease-editorial);
  display: flex;
  flex-direction: column;
}
@keyframes lbFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.lightbox__stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(30px, 6vw, 80px);
  min-height: 0;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__caption {
  padding: 18px var(--page-padding);
  font-family: var(--font-serif-lat);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--muted);
  border-top: 1px solid rgba(185, 154, 85, .2);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(236, 233, 223, .35);
  color: var(--ivory);
  width: 48px;
  height: 48px;
  cursor: pointer;
  font-size: 20px;
  transition: border-color var(--dur-fast) var(--ease-editorial);
}
.lightbox__nav:hover {
  border-color: var(--brass);
}
.lightbox__nav--prev {
  left: clamp(12px, 2vw, 30px);
}
.lightbox__nav--next {
  right: clamp(12px, 2vw, 30px);
}
.lightbox__close {
  position: absolute;
  top: clamp(14px, 2vw, 26px);
  right: var(--page-padding);
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 26px;
  cursor: pointer;
  z-index: 2;
}

/* =============================================================
   动画:data-reveal 初末态
   ============================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-normal) var(--ease-editorial),
    transform var(--dur-normal) var(--ease-editorial);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
/* 图注延迟 */
[data-reveal].fig__cap,
.fig [data-reveal] {
  transition-delay: 140ms;
}

/* =============================================================
   响应式:1024px
   ============================================================= */
@media (max-width: 1024px) {
  /* 收 6 列 */
  .grid12,
  .intro__inner,
  .species__inner,
  .insert--white .insert__inner,
  .map__inner,
  .gallery__grid,
  .notes__inner,
  .colophon__inner {
    grid-template-columns: repeat(6, 1fr);
  }

  /* 隐藏侧边导航 */
  .sidenav {
    display: none;
  }
  .topbar__menu {
    display: inline-block;
  }

  /* 正文单栏 */
  .intro__title {
    grid-column: 1 / 7;
    margin-bottom: 24px;
  }
  .intro__body {
    grid-column: 1 / 7;
  }

  .species--blue .species__media,
  .species--green .species__media,
  .species--congo .species__media {
    grid-column: 1 / 7;
  }
  .species--blue .species__aside,
  .species--green .species__aside,
  .species--congo .species__aside {
    grid-column: 1 / 7;
    margin-top: clamp(24px, 4vw, 44px);
  }
  .species--congo .species__num {
    grid-column: 1 / 7;
  }

  /* 学名移到标题下(已默认 block,确保紧随) */
  .species__latin,
  .hero__latin {
    margin-top: 8px;
  }

  .insert--white .insert__title,
  .insert--white .insert__body,
  .insert--white .insert__media {
    grid-column: 1 / 7;
  }
  .insert--white .insert__body {
    margin-top: 16px;
  }

  .map__figure {
    grid-column: 1 / 7;
  }
  .map__legend {
    grid-column: 1 / 7;
    margin-top: 24px;
    flex-flow: row wrap;
  }

  .gallery__cell--wide {
    grid-column: span 6;
  }
  .gallery__cell--pano {
    grid-column: span 6;
  }
  .gallery__cell--crop {
    grid-column: span 3;
  }
  .gallery__cell--square,
  .gallery__cell--portrait,
  .gallery__cell {
    grid-column: span 3;
  }

  .notes__header {
    grid-column: 1 / 7;
    position: static;
    margin-bottom: 24px;
  }
  .notes__list {
    grid-column: 1 / 7;
  }

  .colophon__brand {
    grid-column: 1 / 7;
  }
  .colophon__meta {
    grid-column: 1 / 7;
    margin-top: 24px;
  }
}

/* =============================================================
   响应式:768px
   ============================================================= */
@media (max-width: 768px) {
  body {
    font-size: 17px;
  }

  /* Hero 纵向堆叠,图 55% */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: clamp(24px, 6vw, 48px);
  }
  .hero__media {
    height: 55vh;
    order: 2;
  }

  /* 图库两列 */
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .gallery__cell,
  .gallery__cell--wide,
  .gallery__cell--pano,
  .gallery__cell--square,
  .gallery__cell--portrait,
  .gallery__cell--crop {
    grid-column: span 1;
  }
  .gallery__cell--pano {
    grid-column: span 2;
  }

  /* 灯箱图注底部抽屉 */
  .lightbox__caption {
    flex-direction: column;
    gap: 6px;
    background: var(--ink-soft);
  }
}

/* =============================================================
   响应式:480px
   ============================================================= */
@media (max-width: 480px) {
  :root {
    --section-gap: clamp(80px, 22vw, 110px);
  }
  body {
    font-size: 16px;
    line-height: 1.9;
  }
  .hero__title {
    font-size: clamp(52px, 18vw, 68px);
  }
  .section__title,
  .intro__title,
  .species__title,
  .insert--white .insert__title {
    font-size: clamp(52px, 14vw, 68px);
  }

  /* 图库单列但保留不同比例 */
  .gallery__grid {
    grid-template-columns: 1fr;
  }
  .gallery__cell--wide,
  .gallery__cell--pano {
    aspect-ratio: 16 / 9;
  }
  .gallery__cell--portrait {
    aspect-ratio: 3 / 4;
  }
  .gallery__cell--square {
    aspect-ratio: 1 / 1;
  }
  .gallery__cell--crop {
    aspect-ratio: 4 / 5;
  }

  .factlist__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* =============================================================
   章节布局与留白(hero / species / map / gallery / notes / colophon)
   ============================================================= */

/* 跳转链接 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brass);
  color: var(--ink);
  padding: 10px 16px;
  font-size: 14px;
}
.skip-link:focus {
  left: var(--page-padding);
  top: 10px;
}

/* ---- Hero:文字左(5fr)· 图右(7fr) ---- */
/* 关键:显式指定同一行,否则 DOM 顺序(媒体在前)会把文字挤到第二行,造成上下堆叠 */
.hero__caption { grid-column: 1; grid-row: 1; align-self: center; }
.hero__media   { grid-column: 2; grid-row: 1; align-self: center; }
/* 图片为居中实块;两栏在垂直中线对齐,容器不过高,消除对角空洞 */
.hero__media .fig { margin: 0; }
.hero__media picture { display: block; }
.hero__media img {
  width: 100%;
  height: clamp(380px, 52vh, 520px);
  object-fit: cover;
}
/* 压低标题比例,让文字块紧凑并在视口内 */
.hero__title { font-size: clamp(56px, 7vw, 104px); }
.hero__caption .secnum { margin-bottom: 8px; }
/* 桌面为右侧纵向导航预留清晰轨道,避免数字压在孔雀图上 */
@media (min-width: 1025px) {
  .hero { padding-right: clamp(96px, 9vw, 160px); }
}
.hero .secnum { display: block; margin-bottom: 12px; }
.hero__kicker {
  font-family: var(--font-serif-lat);
  font-size: clamp(13px, 2vw, 18px);
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .2em;
}
.hero__title { font-size: clamp(64px, 10vw, 148px); line-height: .96; }
.hero__lead {
  max-width: 42ch;
  margin-top: clamp(24px, 4vh, 44px);
  color: var(--paper);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.8;
}
.hero__sign {
  margin-top: clamp(18px, 3vh, 30px);
  font-family: var(--font-serif-sc);
  font-size: clamp(14px, 1.2vw, 16px);
  letter-spacing: .06em;
  color: var(--brass);
}
.hero__cta { margin-top: clamp(20px, 3vh, 32px); }

/* ---- 引言 intro:5 + 7(section 直接做网格) ---- */
.intro {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--grid-gap);
  align-items: start;
  padding-inline: var(--page-padding);
  max-width: var(--content-wide);
  margin-inline: auto;
}
.intro__header { grid-column: 1; }
.intro__body {
  grid-column: 2;
  max-width: var(--content-text);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.85;
  color: var(--paper);
}
.intro__tree { margin: clamp(24px, 3vw, 40px) 0 0; }
.intro__ascii {
  font-family: var(--font-serif-lat);
  font-size: clamp(12px, 1.2vw, 14px);
  line-height: 1.7;
  color: var(--muted);
  overflow-x: auto;
  border-left: 1px solid var(--brass);
  padding-left: 16px;
  margin: 12px 0 0;
}
.intro__tree-cap {
  font-family: var(--font-serif-lat);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ---- 物种 species:layout 承担网格 ---- */
.species { padding-inline: var(--page-padding); }
.species__header,
.species__layout {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.species__header { margin-bottom: clamp(30px, 5vw, 70px); }
.species__layout {
  display: grid;
  gap: var(--grid-gap);
  align-items: center;
}
.species__layout--left   { grid-template-columns: 8fr 4fr; } /* 图 | 文 */
.species__layout--right  { grid-template-columns: 4fr 7fr; } /* 文 | 图 */
.species__layout--center { grid-template-columns: 7fr 5fr; } /* 图 | 文(窄) */
.species__fig picture,
.species__fig img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  object-fit: cover;
}
.species__text {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.6vw, 32px);
}
.species__latin { display: block; margin-top: 12px; }

/* ---- 档案小节:三栏纵向分节,保持出版物式直线与留白 ---- */
.dossier,
.sources {
  padding-inline: var(--page-padding);
}
.dossier__header,
.dossier__grid,
.sources__intro,
.sources__layout {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.dossier__header,
.sources__intro {
  margin-bottom: clamp(30px, 4vw, 56px);
}
.dossier__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}
.dossier__item {
  padding-top: 18px;
  border-top: 1px solid rgba(236, 233, 223, .14);
}
.dossier__item-title,
.sourceitem__title {
  font-size: clamp(24px, 2.2vw, 34px);
  margin-bottom: 16px;
}
.dossier__prose {
  max-width: none;
  color: var(--paper);
}

/* ---- 来源带:左侧评估表,右侧来源清单 ---- */
.sources__layout {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: var(--grid-gap);
  align-items: start;
}
.sources__facts {
  position: sticky;
  top: clamp(84px, 12vh, 140px);
}
.sources__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 32px);
}
.sourceitem {
  padding-top: 18px;
  border-top: 1px solid rgba(236, 233, 223, .14);
}
.sourceitem__meta,
.sourceitem__note {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}
.sourceitem__meta {
  letter-spacing: .04em;
  color: var(--brass);
  margin-bottom: 10px;
}
.sourceitem__note {
  margin-bottom: 16px;
}

/* ---- 面包屑导航 crumbs(详情页/聚合页) ---- */
.crumbs {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: clamp(88px, 12vh, 128px) var(--page-padding) 0;
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-sans-sc);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}
.crumbs a { color: var(--muted); transition: color var(--dur-fast) var(--ease-editorial); }
.crumbs a:hover { color: var(--brass); }
.crumbs [aria-current] { color: var(--paper); }
.crumbs span[aria-hidden] { color: rgba(150, 158, 150, .5); }
/* 面包屑后的首个章节收紧顶部留白 */
.crumbs + .species { padding-top: clamp(24px, 5vw, 56px); }

/* ---- /species/ 聚合页:物种条目列表(交替左右) ---- */
.specieslist {
  display: flex;
  flex-direction: column;
  gap: clamp(44px, 8vw, 100px);
  max-width: var(--content-wide);
  margin-inline: auto;
}
.specieslist__item {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--grid-gap);
  align-items: center;
}
.specieslist__item:nth-child(even) { grid-template-columns: 7fr 5fr; }
.specieslist__item:nth-child(even) .specieslist__media { order: 2; }
.specieslist__media { display: block; border-radius: 2px; overflow: hidden; }
.specieslist__media img { width: 100%; height: auto; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-editorial); }
.specieslist__media:hover img { transform: scale(1.02); }
.specieslist__text { display: flex; flex-direction: column; gap: 14px; }
.specieslist__name { font-size: clamp(30px, 4vw, 54px); }
.specieslist__latin { margin: 0; }
.specieslist__desc { max-width: 52ch; color: var(--paper);
  font-size: clamp(16px, 1.3vw, 18px); line-height: 1.8; }

@media (max-width: 768px) {
  .specieslist__item,
  .specieslist__item:nth-child(even) { grid-template-columns: 1fr; }
  .specieslist__item:nth-child(even) .specieslist__media { order: 0; }
}

/* ---- 白孔雀插页:标题 6 | 文 6,图片整幅 ---- */
.insert { padding-block: clamp(64px, 8vw, 116px); }
.insert--white .insert__inner { align-items: start; }
.insert--white .secnum { grid-column: 1 / 13; }
.insert--white .insert__title { grid-column: 1 / 7; color: var(--forest); }
.insert--white .insert__para {
  grid-column: 7 / 13;
  color: var(--ink-soft);
  max-width: var(--content-text);
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.85;
}
.insert--white .insert__fig {
  grid-column: 1 / 13;
  margin-top: clamp(24px, 3vw, 44px);
}
/* 近方形原图裁成受控宽幅带,避免整幅撑出大片空白 */
.insert--white .insert__fig img {
  width: 100%;
  height: clamp(280px, 46vh, 520px);
  object-fit: cover;
  object-position: center 35%;
}

/* ---- 地图 map:图 8 | 图例 4 ---- */
.map { padding-inline: var(--page-padding); }
.map__header,
.map__stage {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.map__header { margin-bottom: clamp(30px, 4vw, 60px); }
.map__stage {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: var(--grid-gap);
  align-items: start;
}
.map__svg { width: 100%; height: auto; border-radius: 2px; }

/* ---- 画廊:补留白 + 修正图注(悬停才显) ---- */
.gallery { padding-inline: var(--page-padding); }
/* 桌面为右侧纵向导航预留轨道,避免画廊满幅图被数字压住 */
@media (min-width: 1025px) {
  .gallery,
  .map { padding-right: clamp(96px, 9vw, 160px); }
}
.gallery__header,
.gallery__grid {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.gallery__header { margin-bottom: clamp(30px, 4vw, 60px); }
.gallery__cell .fig__cap { opacity: 0 !important; transform: none !important; }
.gallery__cell:hover .fig__cap,
.gallery__cell:focus-within .fig__cap { opacity: 1 !important; }

/* ---- 观察笔记:标题 4(sticky) | 笔记 8 ---- */
.notes {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 0 var(--grid-gap);
  align-items: start;
  padding-inline: var(--page-padding);
  max-width: var(--content-wide);
  margin-inline: auto;
}
.notes__header {
  grid-column: 1;
  position: sticky;
  top: clamp(80px, 12vh, 140px);
}
.notes .note { grid-column: 2; }

/* ---- 页尾 colophon:三窄栏 ---- */
.colophon { padding-inline: var(--page-padding); }
.colophon__title,
.colophon__tagline,
.colophon__cols {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.colophon__title {
  font-family: var(--font-serif-sc);
  font-size: clamp(40px, 6vw, 76px);
  letter-spacing: .06em;
  color: var(--ivory);
}
.colophon__tagline {
  margin-top: 10px;
  font-family: var(--font-serif-lat);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brass);
}
.colophon__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  margin-top: clamp(30px, 5vw, 60px);
}
.colophon__subtitle {
  font-family: var(--font-sans-sc);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 12px;
}
.colophon__col p { font-size: 14px; color: var(--muted); line-height: 1.85; }
.colophon__copy {
  max-width: var(--content-wide);
  margin: clamp(36px, 5vw, 64px) auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(185, 154, 85, .2);
  font-size: 13px;
  color: var(--muted);
}

/* ---- 响应式 ≤1024px ---- */
@media (max-width: 1024px) {
  .intro { grid-template-columns: 1fr; }
  .intro__header,
  .intro__body { grid-column: 1; }
  .intro__body { max-width: none; margin-top: 16px; }

  .species__layout--left,
  .species__layout--right,
  .species__layout--center { grid-template-columns: 1fr; }
  .species__text { margin-top: clamp(20px, 4vw, 40px); }
  /* 绿孔雀移动端保证 图在前、文在后 */
  .species__layout--right .species__fig { order: -1; }

  .dossier__grid,
  .sources__layout,
  .sources__list { grid-template-columns: 1fr; }
  .sources__facts { position: static; }

  .map__stage { grid-template-columns: 1fr; }

  .notes { grid-template-columns: 1fr; }
  .notes__header { grid-column: 1; position: static; margin-bottom: 20px; }
  .notes .note { grid-column: 1; }

  .colophon__cols { grid-template-columns: 1fr; gap: 28px; }
}

/* ---- 响应式 ≤768px(Hero 堆叠) ---- */
@media (max-width: 768px) {
  .hero__caption,
  .hero__media { grid-column: auto; }
  .hero__media { order: 2; }
}

/* =============================================================
   偏好:reduce motion — 关闭所有 transform/opacity 动画
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero__media img,
  .hero__media picture {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ---------- 12. 移动端浮层模块 + 拼图滑块(仅移动端) ---------- */

.mod-a {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  width: 174px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .28));
}
.mod-a__trigger {
  position: relative;
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 78px;
  padding: 8px 12px 8px 8px;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 22px;
  background: linear-gradient(135deg, #c51f68 0%, #f03c88 55%, #a91359 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 20px rgba(184, 18, 92, .38);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .22s ease;
}
.mod-a__trigger::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -45%;
  width: 34%;
  height: 220%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .36), transparent);
  transform: rotate(18deg);
  animation: mod-a-shine 5.5s ease-in-out infinite;
}
.mod-a__trigger:active {
  transform: scale(.97);
}
.mod-a__trigger:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  border-radius: 22px;
}
.mod-a__img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 17px;
  background: var(--ink-soft);
  box-shadow: 0 5px 14px rgba(68, 0, 30, .35);
}
.mod-a__content {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.mod-a__eyebrow {
  margin-bottom: 1px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .82);
}
.mod-a__title {
  font-size: 19px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(83, 0, 37, .35);
}
.mod-a__hint {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  color: #fff3c9;
}
@keyframes mod-a-shine {
  0%, 62% { left: -45%; opacity: 0; }
  68% { opacity: 1; }
  82%, 100% { left: 125%; opacity: 0; }
}
.mod-a__close {
  position: absolute;
  z-index: 2;
  top: -9px;
  right: -9px;
  width: 22px;
  height: 22px;
  padding: 0;
  line-height: 20px;
  text-align: center;
  font-size: 15px;
  color: #fff;
  background: rgba(7, 23, 20, .92);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
}
.mod-a__close:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* 拼图弹窗 */
.pz {
  width: min(92vw, 360px);
  padding: 0;
  border: none;
  border-radius: 12px;
  background: var(--ivory);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.pz::backdrop {
  background: rgba(7, 23, 20, .6);
}
.pz__inner {
  padding: 16px;
}
.pz__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pz__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans-sc);
}
.pz__close {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  line-height: 26px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 50%;
  cursor: pointer;
}
.pz__close:focus-visible {
  outline: 2px solid var(--peacock);
  outline-offset: 2px;
}
.pz__stage {
  position: relative;
  width: 320px;
  max-width: 100%;
  height: 220px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink-soft);
}
.pz__bg,
.pz__piece {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}
.pz__piece {
  pointer-events: none;
}
.pz__track {
  position: relative;
  width: 320px;
  max-width: 100%;
  height: 40px;
  margin: 14px auto 0;
  background: #cfcabd;
  border-radius: 20px;
}
.pz__handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 40px;
  padding: 0;
  font-size: 18px;
  color: #fff;
  background: var(--peacock);
  border: none;
  border-radius: 20px;
  cursor: grab;
  touch-action: none;
  z-index: 2;
}
.pz__handle:disabled {
  background: var(--muted);
  cursor: not-allowed;
}
.pz__handle:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.pz__label {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #5a5f57;
  pointer-events: none;
}
.pz__status {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--ink-soft);
}
.pz__status[data-kind="success"] { color: var(--emerald); }
.pz__status[data-kind="error"] { color: var(--warning); }
.pz__status[data-kind="info"] { color: var(--peacock); }

.pz__result {
  margin-top: 12px;
  text-align: center;
}
.pz__result img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto 10px;
  border-radius: 12px;
}
.pz__result p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink);
}
.pz__result a {
  display: inline-block;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--peacock);
  border-radius: 20px;
}

.pz.is-shake {
  animation: pz-shake .35s;
}
@keyframes pz-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ---------- 13. 工具类(替代内联 style,便于 CSP 收紧 style-src) ---------- */
.u-track  { letter-spacing: .12em; }
.u-ivory  { color: var(--ivory); }
.u-mt-sec { margin-top: clamp(30px, 5vw, 60px); }
.u-mb-sec { margin-bottom: clamp(30px, 4vw, 60px); }
