/* =============================================================
   FUHAI — Dark Gallery Edition
   暗调画册感 · 极简黑白摄影作品集
   类名与 main.js 完全兼容（可直接复用同一份脚本）
   ============================================================= */

:root {
  /* 暗调层次 */
  --bg:        #0c0c0d;
  --bg-2:      #111113;
  --bg-3:      #17171a;
  --ink:       #f2f2f0;
  --ink-2:     #c6c6c3;
  --ink-3:     #8c8c8c;
  --ink-4:     #5f5f5f;
  --line:      rgba(255,255,255,.10);
  --line-2:    rgba(255,255,255,.20);
  --line-3:    rgba(255,255,255,.34);

  --maxw:      min(1520px, 90vw);   /* 大屏不浪费：随视口适度放宽，窄屏仍受 90vw 约束 */
  --pad:       clamp(20px, 5vw, 68px);
  --gutter:    clamp(14px, 1.6vw, 26px);

  --serif: 'Playfair Display', 'Playfair Fallback', 'Noto Serif SC', Georgia, 'Songti SC', 'Times New Roman', serif;
  --sans:  'Inter', 'Inter Fallback', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --slow: cubic-bezier(.16, 1, .3, 1);
}

/* =============================================================
   度量对齐的兜底字体 —— 消除网页字体的 FOUT 抖动
   =============================================================
   成因：Google Fonts 用 font-display: swap，先按"后备字体"排版，真字体下载
   完成后再换回来重新排版。本页页头 logo 是「衬线 FUHAI + 无衬线 Photography」
   的基线混排（.brand 是 align-items: baseline 的 flex），字体一换，顿点与
   Photography 会横向 4~9px、纵向 1~2px 地跳一下 —— 就是切换页面时的"抖动"。

   做法：定义两个"占位字体"，用 size-adjust 把后备字体的字宽调到与真字体一致，
   并用 ascent/descent-override 把行内基线也对齐。这样真字体到达时几乎不发生
   重排，抖动消失。字体本身未变，只是占位尺寸提前对齐了。

   实测数值（无头浏览器量得，勿随手改）：
     Playfair Display ÷ Georgia  = 93.2%（按页头 logo 串 "FUHAI." 标定）
     Inter            ÷ Segoe UI = 109.15%
   ⚠️ ascent/descent-override 的百分比是相对 *size-adjust 之后* 的 em 计算的，
      所以这里写的是「目标度量 ÷ size-adjust」。Playfair 目标 108%/25%，
      Inter 目标 97%/24%。
   ✅ 这组数与字号无关 —— 字形宽度和 letter-spacing 都随 font-size 线性缩放，
      比率不变。已在 20px 与 25px 两档实测验证（两档下最优值同为 93.2/109.15）。
      故改字号不必重标；但**换字体**（或改 font-weight）必须重新实测。 */
@font-face {
  font-family: 'Playfair Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 93.2%;
  ascent-override: 115.88%;
  descent-override: 26.82%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Segoe UI'), local('Helvetica Neue'), local('Arial');
  size-adjust: 109.15%;
  ascent-override: 88.87%;
  descent-override: 21.99%;
  line-gap-override: 0%;
}

*, *::before, *::after { box-sizing: border-box; }

/* 清除 figure / figcaption 的浏览器默认外边距（否则网格会左右内缩、两边对不齐） */
figure, figcaption { margin: 0; }

/* 横向裁切放在 html 上：根元素的 overflow 会传播到视口，裁切效果不变，
   但不会让 body 变成滚动容器 —— 否则内部 position: sticky 会失效（年份导航需要吸顶）。 */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 300;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

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

/* ---------- 工具 ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  font-size: 13px;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =============================================================
   顶部导航
   ============================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .45s var(--ease), border-color .45s var(--ease), backdrop-filter .45s;
}
.site-header.is-scrolled {
  background: rgba(12,12,13,.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 11px;
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: .16em;
  font-weight: 500;
}
.brand .dot { color: var(--ink-4); }
.brand small {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  transform: translateY(-1px);
}

.nav-links { display: flex; align-items: center; gap: clamp(22px, 3.2vw, 44px); }

.nav-links a {
  position: relative;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color .35s var(--ease), opacity .35s var(--ease);
  opacity: .78;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav-links a:hover { color: var(--ink); opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-active { color: var(--ink); opacity: 1; }
.nav-links a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  position: relative;
  margin-right: -10px;
}
.nav-toggle span {
  position: absolute; left: 10px;
  width: 20px; height: 1.5px;
  background: var(--ink);
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 24px; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* =============================================================
   Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: #000;
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0;
  background: #101012 center/cover no-repeat;
  filter: contrast(1.05) brightness(.86);
  transform: scale(1.08);
  animation: heroZoom 18s var(--slow) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 20%, rgba(0,0,0,.05) 0%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.86) 100%),
    linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.1) 38%, rgba(0,0,0,.72) 100%);
}
.hero__inner {
  position: relative;
  width: 100%;
  /* ⚠️ 底部内边距不能小于 98px：底部居中的 .hero__scroll（bottom:30 + 高 52 = 占 82px）
     会与说明块的下沿相撞。实测旧值 clamp(64px,11vh,136px) 在 320px 宽下重叠 24px，
     竖线直接穿过设备 / 参数那一行。98px = 82px 线高 + 16px 间隙，与视口高无关。 */
  padding: 0 var(--pad) clamp(98px, 12vh, 150px);
  max-width: var(--maxw);
  margin: 0 auto;
}

/* 首屏 = 一张主题作品图 + 说明块。说明块压在图片下沿，左对齐、自下而上排：
   标题（衬线）→ 说明 → 设备 / 参数 两列规格。 */
.hero__feature {
  max-width: 640px;
  margin: 0;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) .3s forwards;
}
.hero__cap-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.12;
  letter-spacing: .02em;
  margin: 0;
  color: #fff;
}
.hero__cap-desc {
  max-width: 42ch;
  margin: 14px 0 0;
  color: rgba(255,255,255,.7);
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 300;
  line-height: 1.8;
}
/* 规格行：dt 是小号大写标签，dd 是值。
   ⚠️ EXIF 值绝不能继承 dt 的大写 + 字距 —— "Summilux 35mm f/1.4" 会被拉散到读不出来。 */
.hero__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 46px;
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.hero__specs > div { display: flex; align-items: baseline; gap: 10px; }
.hero__specs dt {
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.hero__specs dd {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: rgba(255,255,255,.84);
  font-variant-numeric: tabular-nums;
}

/* ── 已停用：旧 Hero 的文案块 ──
   2026-09-11 首屏改为「一张主题图 + 说明 / 设备 / 参数」，以下三块已无元素匹配。
   项目无 git，样式有意保留，日后想回到文案型首屏可直接复用，不必重写。 */
.hero__eyebrow { color: rgba(255,255,255,.66); opacity: 0; animation: fadeUp 1s var(--ease) .25s forwards; }
.hero__title { font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 9vw, 118px); line-height: 1; letter-spacing: .01em; margin: 22px 0 0; opacity: 0; animation: fadeUp 1.1s var(--ease) .45s forwards; }
.hero__title em { font-style: italic; font-weight: 400; color: rgba(255,255,255,.9); }
.hero__sub { max-width: 44ch; margin: 26px 0 0; color: rgba(255,255,255,.72); font-size: clamp(14px, 1.4vw, 16px); font-weight: 300; opacity: 0; animation: fadeUp 1.1s var(--ease) .7s forwards; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 38px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.5); opacity: 0; animation: fadeUp 1.1s var(--ease) .9s forwards; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 30px;
  transform: translateX(-50%);
  width: 1px; height: 52px;
  background: rgba(255,255,255,.2);
  overflow: hidden;
}
.hero__scroll::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(255,255,255,.85);
  animation: scrollLine 2.6s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* 窄屏：设备 / 参数的「标签+值」并排会因值太长而折行，第二行缩不到标签下方。
   改成上下两行，标签自成一行，读数更整齐。 */
@media (max-width: 560px) {
  .hero__specs > div { flex-direction: column; align-items: flex-start; gap: 5px; }
  .hero__specs { gap: 16px 0; }
}

/* 内页页头 */
.page-head {
  padding: clamp(132px, 20vh, 210px) 0 clamp(34px, 5vh, 58px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 6.4vw, 78px);
  line-height: 1.04;
  margin: 18px 0 0;
  letter-spacing: .01em;
}
.page-head p {
  max-width: 52ch;
  margin: 22px 0 0;
  color: var(--ink-2);
  font-weight: 300;
}

/* =============================================================
   区块
   ============================================================= */
/* 区块垂直节奏。
   ⚠️ 这里给的值是"半间距"：相邻两个 .section 的上下内边距会**叠加**成区块间的空白。
   曾用 clamp(70px,12vh,140px)，900px 高视口下两块之间视觉空白达 188px —— 首页显得过空，
   2026-09-11 按用户反馈整体收紧约三成（现约 134px）。改这个数必须连带复核实测量。 */
.section { padding: clamp(60px, 9vh, 108px) 0; }
.section--tight { padding: clamp(46px, 6.8vh, 82px) 0; }

/* 内页标题区后面直接接内容时收紧间距 —— 否则两块内边距叠加会空出近 200px */
.page-head + .section { padding-top: clamp(36px, 5.5vh, 68px); }

/* 作品集页去掉标题区后，直接从画廊开始：只留出固定页头的高度 + 一点呼吸感。
   固定页头 74px，所以这里给 ~96–114px 即可，再多就是纯空白了。 */
.section--top { padding-top: clamp(96px, 8.5vh, 114px); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 58px);
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(25px, 3.4vw, 42px);
  margin: 14px 0 0;
  line-height: 1.14;
}
.section-head__link {
  flex: none;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 9px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-2);
  transition: gap .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.section-head__link:hover { gap: 15px; color: var(--ink); border-color: var(--line-3); }

/* ---------- 精选系列 ---------- */
.series { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.series__item { display: block; }
.series__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-3);
  border: 1px solid var(--line);
  transition: border-color .6s var(--ease);
}
.series__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.04) brightness(.9);
  transition: transform 1.4s var(--slow), filter .8s var(--ease);
}
.series__item:hover .series__thumb { border-color: var(--line-3); }
.series__item:hover .series__thumb img { transform: scale(1.045); filter: contrast(1.06) brightness(1); }
.series__index {
  position: absolute; top: 16px; left: 18px;
  font-size: 12px; letter-spacing: .24em;
  color: rgba(255,255,255,.8);
}
.series__body { padding-top: 20px; }
.series__body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(18px, 2vw, 24px);
  margin: 0;
  line-height: 1.3;
}
.series__body p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ---------- 最新作品 ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 12vw;
  gap: var(--gutter);
}
.mosaic figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--bg-3);
  cursor: zoom-in;
  border: 1px solid var(--line);
  transition: border-color .6s var(--ease);
}
.mosaic figure:hover { border-color: var(--line-3); }
.mosaic figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.04) brightness(.9);
  transition: transform 1.5s var(--slow), filter .8s var(--ease);
}
.mosaic figure:hover img { transform: scale(1.05); filter: contrast(1.06) brightness(1); }
.mosaic .span-2x2 { grid-column: span 2; grid-row: span 2; }
.mosaic .span-2x1 { grid-column: span 2; grid-row: span 1; }
.mosaic .span-1x2 { grid-column: span 1; grid-row: span 2; }
.mosaic figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 40px 18px 16px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.mosaic figure:hover figcaption { opacity: 1; transform: none; }

/* =============================================================
   作品集：左侧「年份 + 标签」导航，右侧分类与网格
   ============================================================= */
.archive {
  display: grid;
  grid-template-columns: minmax(120px, 168px) minmax(0, 1fr);
  column-gap: clamp(32px, 4.5vw, 72px);
  align-items: start;
}
/* 侧栏独占左列并跨满全部行，才有一整条高度可供吸顶 */
.archive .sidenav       { grid-column: 1; grid-row: 1 / 3; }
.archive .gallery       { grid-column: 2; grid-row: 1; }
.archive .gallery-empty { grid-column: 2; grid-row: 2; }

/* 页头下方吸顶。吸附位置略小于内容起始位置（.section--top 的上内边距），
   这样静止时侧栏与首行照片顶边对齐，滚动后才吸附，不会一进页面就往下跳。
   内容可能高于视口（三组筛选叠加），所以给一个最大高度并允许自身滚动。 */
.sidenav {
  position: sticky;
  top: clamp(86px, 7.6vh, 104px);
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.sidenav::-webkit-scrollbar { width: 6px; }
.sidenav::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.sidenav::-webkit-scrollbar-track { background: transparent; }

.sidenav__group + .sidenav__group { margin-top: 34px; }
.sidenav__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.sidenav__title {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--ink-4);
}
.sidenav__head .sidenav__title { margin-bottom: 0; }
.sidenav__clear {
  padding: 0; border: 0; background: none;
  font-size: 11px; letter-spacing: .08em;
  color: var(--ink-4);
  transition: color .3s var(--ease);
}
.sidenav__clear:hover { color: var(--ink); }

/* 筛选结果计数，放在面板底部 */
.sidenav__count {
  margin: 30px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

/* 竖排列表：年份与主题共用。选中项前面一道短划线。
   字号阶梯（侧栏只有两级，避免 12/13/16 三种字号并存）：
     14px —— 可点击的主选项（与照片说明文字同级）
     12px —— 分组标题、标签、结果计数等次要信息（沿用全站小型文字基准）
   选项的 line-height 必须显式写死：继承 body 的 1.75 会让 7px 上下内边距
   之外再撑出 28px 行框，盒高膨胀到 42px，列表被拉得过散。 */
.navlist { list-style: none; margin: 0; padding: 0; }
.navlist button {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 0 7px 18px;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--ink-3);
  background: none;
  border: 0;
  font-variant-numeric: tabular-nums;
  transition: color .3s var(--ease);
}
.navlist button::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 0; height: 1px;
  background: var(--ink);
  transform: translateY(-50%);
  transition: width .35s var(--ease);
}
.navlist button:hover { color: var(--ink-2); }
.navlist button:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.navlist button.is-active { color: var(--ink); }
.navlist button.is-active::before { width: 11px; }

/* 标签：可多选，选中项加下划线。字号归到 12px 一档（与分组标题、计数一致）；
   row-gap 略大于 column-gap —— 折行后需要比横向间隔更明显的行间呼吸，否则
   三行标签会糊成一块。 */
.tagnav__list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tagnav__list button {
  position: relative;
  padding: 2px 0 3px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-3);
  background: none;
  border: 0;
  transition: color .3s var(--ease);
}
.tagnav__list button::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.tagnav__list button:hover { color: var(--ink-2); }
.tagnav__list button:hover::after { transform: scaleX(1); opacity: .3; }
.tagnav__list button:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.tagnav__list button.is-active { color: var(--ink); }
.tagnav__list button.is-active::after { transform: scaleX(1); opacity: 1; }

@media (max-width: 900px) {
  .archive { grid-template-columns: 1fr; row-gap: 22px; }
  .archive .sidenav       { grid-column: 1; grid-row: 1; position: static; }
  .archive .gallery       { grid-column: 1; grid-row: 2; }
  .archive .gallery-empty { grid-column: 1; grid-row: 3; }
  .sidenav { display: flex; flex-wrap: wrap; gap: 20px 44px; max-height: none; overflow: visible; }
  .sidenav__group + .sidenav__group { margin-top: 0; }
  .navlist { display: flex; flex-wrap: wrap; gap: 0 22px; }
  .navlist button { width: auto; padding: 5px 0 5px 16px; }
}

/* =============================================================
   作品集：筛选 + 网格
   ============================================================= */
/* 筛选行：一条细线贯穿做基线，选中项用下划线指示。
   比圆角胶囊更贴近"杂志目录"的语言，也和站内其它细线元素一致。 */
.filters {
  display: flex; flex-wrap: wrap;
  gap: 0;
  margin: 0;
}

.filters-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(26px, 3.8vw, 44px);
  border-bottom: 1px solid var(--line);   /* 基线 */
}
.filters-bar .filters { flex: 1 1 auto; }

.filters button {
  position: relative;
  font-size: 15px;
  letter-spacing: .14em;   /* 字号变大后收一点字距，避免显得松散 */
  color: var(--ink-3);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0 0 17px;
  margin-right: clamp(24px, 3.4vw, 50px);
  transition: color .35s var(--ease);
}
/* 下划线指示器：自左向右展开，正好压在那条基线上 */
.filters button::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease), opacity .35s var(--ease);
}
.filters button:hover { color: var(--ink); }
.filters button:hover::after { transform: scaleX(1); opacity: .3; }   /* 悬停先给个淡的预告 */
.filters button:focus-visible { outline: 1px solid var(--ink); outline-offset: 5px; }
.filters button.is-active { color: var(--ink); }
.filters button.is-active::after { transform: scaleX(1); opacity: 1; }

.filters__count {
  flex: none;
  padding-bottom: 17px;                 /* 与切换项文字底部齐平 */
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
.shot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-3);
  cursor: zoom-in;
  border: 1px solid var(--line);
  transition: border-color .6s var(--ease);
  animation: shotIn .6s var(--ease) both;
}
.shot:hover { border-color: var(--line-3); }
.shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.04) brightness(.9);
  transition: transform 1.5s var(--slow), filter .8s var(--ease);
}
.shot:hover img { transform: scale(1.05); filter: contrast(1.06) brightness(1); }
.shot__cap {
  position: absolute; inset: auto 0 0 0;
  padding: 58px 18px 18px;              /* 三行文字，渐变过渡区加高 */
  background: linear-gradient(transparent, rgba(0,0,0,.82));
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.shot:hover .shot__cap { opacity: 1; transform: none; }

/* 第一行：标题 */
.shot__cap h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
}
/* 第二行：标签，以 / 分隔 */
.shot__cap .shot__tags {
  margin: 7px 0 0;
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(255,255,255,.7);
}
/* 第三行：年份.月份 */
.shot__cap .shot__date {
  margin: 5px 0 0;
  font-size: 12px;
  letter-spacing: .18em;
  color: rgba(255,255,255,.5);
  font-variant-numeric: tabular-nums;
}
.shot.is-hidden { display: none; }
@keyframes shotIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.gallery-empty {
  display: none;
  padding: 88px 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: .06em;
}
.gallery-empty.is-visible { display: block; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 1000;
  background: #09090b;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease), visibility .45s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

/* 图片占满整屏：保持长宽比，长边撑满 */
.lightbox__stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  filter: contrast(1.04);
  transform: scale(.99);
  opacity: 0;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.lightbox.is-ready .lightbox__img { opacity: 1; transform: none; }

/* 说明栏（显隐见文末「沉浸查看」，默认隐藏） */
.lightbox__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px;
  padding: 88px clamp(20px, 4vw, 52px) clamp(20px, 3.6vh, 36px);
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.45) 40%, transparent 100%);
  color: var(--ink);
  pointer-events: none;               /* 点击可穿透到舞台，底部留白同样能关闭 */
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s var(--ease), transform .55s var(--ease);
}
.lightbox__info h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
}
.lightbox__info span {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-3);
}
/* 设备与拍摄参数：单独一行，比说明更弱 —— 不转大写、字距收窄，
   否则「Leica M10 · 35mm f/1.4」这类大小写混排会被拉散、读不出来。
   等宽数字避免翻页时 % / s 之类的字符宽窄跳动。 */
.lightbox__exif {
  margin: 9px 0 0;
  font-size: 11.5px;
  letter-spacing: .08em;
  line-height: 1.5;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  .lightbox__exif { margin-top: 7px; font-size: 10.5px; letter-spacing: .04em; }
  /* 窄屏里参数串会折行，容易顶到右下的计数器 —— 留出安全间距 */
  .lightbox__info { padding-right: 16px; }
}
.lightbox__counter {
  font-size: 13px; letter-spacing: .26em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  flex: none;               /* 计数是定长信息，不参与压缩 */
  white-space: nowrap;      /* 「01 / 15」绝不允许折行 */
  text-indent: .26em;       /* 补掉末位字距留下的右侧空隙，让右缘对齐 */
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px; height: 54px;
  display: grid; place-items: center;
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s;
}
.lb-btn:hover { background: rgba(255,255,255,.9); color: var(--bg); border-color: transparent; }
.lb-prev { left: clamp(12px, 3vw, 36px); }
.lb-next { right: clamp(12px, 3vw, 36px); }
.lb-close {
  position: absolute;
  top: clamp(16px, 3vh, 28px); right: clamp(14px, 3vw, 32px);
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s;
}
.lb-close:hover { background: rgba(255,255,255,.9); color: var(--bg); border-color: transparent; }

/* 控制按钮的显隐见文末「沉浸查看」 */

/* =============================================================
   关于我
   ============================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(34px, 6vw, 90px);
  align-items: start;
}
.about-portrait {
  position: sticky; top: 108px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.about-portrait img { width: 100%; filter: contrast(1.04) brightness(.95); }
.about-body p { margin: 0 0 1.3em; color: var(--ink-2); font-weight: 300; max-width: 66ch; }
.about-body .lead {
  font-family: var(--serif);
  font-size: clamp(20px, 2.3vw, 27px);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1em;
  font-weight: 400;
}

.detail-list { display: grid; gap: 0; margin: clamp(36px, 5vw, 60px) 0 0; }
.detail-list__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.detail-list__row:last-child { border-bottom: 1px solid var(--line); }
.detail-list__row dt {
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 4px;
}
.detail-list__row dd { margin: 0; color: var(--ink-2); font-size: 15.5px; }

.timeline { margin: clamp(44px, 6vw, 70px) 0 0; }
.timeline__item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.timeline__year {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
}
.timeline__text h4 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: .02em; }
.timeline__text p { margin: 5px 0 0; font-size: 14.5px; color: var(--ink-3); }

/* =============================================================
   联系
   ============================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(36px, 6vw, 86px);
  align-items: start;
}
.contact-info__item { padding: 24px 0; border-top: 1px solid var(--line); }
.contact-info__item:last-child { border-bottom: 1px solid var(--line); }
.contact-info__item span {
  display: block;
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.contact-info__item a, .contact-info__item strong {
  font-family: var(--serif);
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 500;
  transition: opacity .35s var(--ease);
}
.contact-info__item a:hover { opacity: .55; }

.form { display: grid; gap: 24px; }
.field { display: grid; gap: 8px; }
.field label {
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field textarea {
  width: 100%;
  padding: 13px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: transparent;
  border-radius: 0;
  outline: none;
  color: var(--ink);
  transition: border-color .35s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field textarea { resize: vertical; min-height: 136px; line-height: 1.75; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.btn {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 38px;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-3);
  transition: background .4s var(--ease), color .4s var(--ease), gap .4s var(--ease), border-color .4s;
}
.btn:hover { gap: 18px; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.form-note { font-size: 13.5px; color: var(--ink-4); line-height: 1.7; }
.form-note.is-sent { color: var(--ink-2); }

/* =============================================================
   页脚
   ============================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(52px, 9vh, 90px) 0 34px;
  margin-top: clamp(44px, 8vh, 96px);
  background: var(--bg-2);
}
/* 页脚左侧的宣言句已移除，现在只剩链接列。
   改成等分栅格铺满容器宽度，避免右侧空出一大片。 */
.footer-top { padding-bottom: 44px; }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.footer-col h4 {
  margin: 0 0 16px;
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}
.footer-col a {
  display: block;
  font-size: 14.5px;
  color: var(--ink-2);
  padding: 5px 0;
  opacity: .8;
  transition: color .35s var(--ease), opacity .35s var(--ease), transform .35s var(--ease);
}
.footer-col a:hover { color: var(--ink); opacity: 1; transform: translateX(3px); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-4);
  letter-spacing: .08em;
}

/* =============================================================
   滚动显现
   ============================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__media { animation: none; transform: none; }
}

/* =============================================================
   响应式
   ============================================================= */
@media (max-width: 1024px) {
  .series { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 24vw; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-portrait { position: static; max-width: 440px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(12,12,13,.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 10px var(--pad) 30px;
    transform: translateY(-16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
  }
  body.nav-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a {
    font-size: 14px; padding: 15px 0; width: 100%;
    border-bottom: 1px solid var(--line);
    opacity: .9;
  }
  .nav-links a::after { display: none; }

  .series { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr; grid-auto-rows: 64vw; }
  .mosaic .span-2x1, .mosaic .span-2x2, .mosaic .span-1x2 { grid-column: auto; grid-row: auto; }

  .detail-list__row, .timeline__item { grid-template-columns: 1fr; gap: 7px; }
  .field-row { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 页脚变 2 列后，「联系」列落到第二行第一格，列宽只剩 ~143px（390px 屏）/ 112px（320px）。
     邮箱 yan_fuhai@foxmail.com 在 14.5px 下要 ~163px，且地址中间没有断行点（`@` `.` 都不折行），
     于是整串会伸出列外 —— 溢出区恰好是空的第二格，肉眼看不见，但内容确实越过了容器边界。
     让这一列跨满整行即可（可用宽 390→311px、320→248px）。 */
  .footer-cols > .footer-col:last-child { grid-column: 1 / -1; }
  .lb-btn { width: 46px; height: 46px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

/* =============================================================
   作品集 · 走马灯 Carousel
   ============================================================= */
.carousel {
  position: relative;
  background: #0a0a0c;
  border: 1px solid var(--line);
  overflow: hidden;
}

.carousel__stage {
  position: relative;
  height: clamp(430px, 74vh, 800px);
  overflow: hidden;
}
/* 用当前照片做虚化背景，填补竖图两侧的留白 */
.carousel__stage::before {
  content: "";
  position: absolute; inset: -10%;
  background-image: var(--bg-img, none);
  background-size: cover;
  background-position: center;
  filter: blur(72px) grayscale(1) brightness(.32);
  transform: scale(1.15);
  opacity: .9;
  pointer-events: none;
  transition: opacity 1s var(--ease);
}

.slide {
  position: absolute; inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3.4vh, 46px) clamp(18px, 3.4vw, 58px) clamp(110px, 16vh, 160px);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 1s var(--ease), transform 1.4s var(--ease), visibility 1s;
}
.slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  cursor: zoom-in;
}
.slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  filter: contrast(1.04);
  box-shadow: 0 34px 90px rgba(0,0,0,.62);
}

/* 底部信息条 */
.carousel__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  padding: 92px clamp(20px, 4vw, 58px) clamp(22px, 3.4vh, 38px);
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.48) 42%, transparent 100%);
  color: var(--ink);
  pointer-events: none;
}
.carousel__info h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(19px, 2.4vw, 28px);
  line-height: 1.25;
}
.carousel__info span {
  display: block;
  margin-top: 7px;
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-3);
}
.carousel__counter {
  justify-self: end;
  font-size: 13px; letter-spacing: .26em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* 圆点 */
.carousel__dots {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 8px;
  pointer-events: auto;
}
.carousel__dot {
  width: 7px; height: 7px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  background: transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.carousel__dot:hover { border-color: #fff; }
.carousel__dot.is-on { background: var(--ink); border-color: var(--ink); transform: scale(1.3); }

/* 翻页箭头 */
.carousel__nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 4;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(10,10,12,.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.carousel__nav:hover { background: rgba(255,255,255,.92); color: var(--bg); border-color: transparent; }
.carousel__nav--prev { left: clamp(12px, 2.6vw, 34px); }
.carousel__nav--next { right: clamp(12px, 2.6vw, 34px); }

@media (max-width: 860px) {
  .carousel__stage { height: clamp(360px, 62vh, 620px); }
  .slide { padding-bottom: clamp(126px, 21vh, 200px); }
  .carousel__bar { grid-template-columns: 1fr auto; row-gap: 16px; }
  .carousel__dots { grid-column: 1 / -1; order: 3; padding-bottom: 0; }
  .carousel__nav { width: 46px; height: 46px; top: 42%; }
}
@media (max-width: 560px) {
  .carousel__nav--prev { left: 8px; }
  .carousel__nav--next { right: 8px; }
  .carousel__info h3 { font-size: 17px; }
  .carousel__counter { font-size: 12px; }
}

/* =============================================================
   作品集 · 全屏走马灯
   ============================================================= */
.gallery-full { position: relative; }

.carousel--full {
  height: 100svh;
  min-height: 540px;
  border: 0;
  background: #08080a;
}
.carousel--full .carousel__stage { position: absolute; inset: 0; height: auto; }

/* 顶部压暗，保证固定导航与标题可读 */
.carousel--full::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 36vh;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(0,0,0,.76) 0%, rgba(0,0,0,.34) 46%, transparent 100%);
  pointer-events: none;
}

/* 幻灯片：为上下浮动层留出空间 */
.carousel--full .slide {
  padding: clamp(118px, 17vh, 172px) clamp(56px, 7.5vw, 138px) clamp(120px, 16vh, 168px);
}

/* 顶部：标题 + 分类筛选 */
.carousel__top {
  position: absolute; left: 0; right: 0;
  top: calc(74px + clamp(16px, 3vh, 36px));
  z-index: 3;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 28px;
  padding: 0 clamp(20px, 4vw, 58px);
  pointer-events: none;
}
.carousel__intro h1 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: .01em;
}
.carousel__top .filters { margin: 0; pointer-events: auto; }
/* 走马灯浮层里的筛选沿用全站的下划线切换条，不加毛玻璃底（否则和新样式打架） */
.carousel__top .filters button { text-shadow: 0 1px 12px rgba(0,0,0,.7); }

/* 底部信息条：全屏下更宽松 */
.carousel--full .carousel__bar { padding: 112px clamp(20px, 4vw, 58px) clamp(26px, 4vh, 46px); }
.carousel--full .carousel__nav { top: 50%; }

@media (max-width: 1024px) {
  .carousel__top { flex-direction: column; align-items: flex-start; gap: 18px; }
  .carousel--full .slide { padding: clamp(198px, 26vh, 252px) clamp(52px, 7vw, 100px) clamp(132px, 17vh, 182px); }
}
@media (max-width: 720px) {
  .carousel--full .slide { padding: clamp(188px, 25vh, 242px) 50px clamp(148px, 19vh, 202px); }
  .carousel__intro h1 { font-size: 22px; }
  .carousel__top { gap: 14px; }
  .carousel__top .filters { gap: 0; }
  .carousel__top .filters button { margin-right: 16px; padding-bottom: 10px; font-size: 12px; letter-spacing: .16em; }
  .carousel--full .carousel__nav { top: 44%; }
  .carousel--full .carousel__bar { padding-bottom: clamp(22px, 3.4vh, 34px); }
}
@media (max-width: 420px) {
  .carousel--full .slide { padding: 170px 46px 192px; }
}

/* =============================================================
   沉浸查看：看大图时默认只有照片
   鼠标一动浮出界面，静止满 3 秒自动隐去
   ============================================================= */
.lightbox .lightbox__bar,
.lightbox .lb-btn,
.lightbox .lb-close {
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s var(--ease), transform .55s var(--ease),
              background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.lightbox .lightbox__bar { transform: translateY(18px); }
.lightbox .lb-btn { transform: translateY(-50%) translateX(-10px); }
.lightbox .lb-btn.lb-next { transform: translateY(-50%) translateX(10px); }
.lightbox .lb-close { transform: translateY(-12px); }

/* 界面浮出 */
.lightbox.ui-visible .lightbox__bar { opacity: 1; transform: none; }
.lightbox.ui-visible .lb-btn { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.lightbox.ui-visible .lb-close { opacity: 1; transform: none; pointer-events: auto; }

/* 灯箱层级：舞台铺满整屏且 DOM 顺序在关闭按钮/左箭头之后，
   必须显式抬高控件层级，否则控件会被图片盖住、点不动 */
.lightbox__stage { z-index: 1; }
.lightbox__bar   { z-index: 3; }
.lb-btn,
.lb-close        { z-index: 4; }

/* 到头即止：禁用态明确提示"不循环"
   注意：禁用按钮**不能**设 pointer-events:none —— 那样点击会穿透到图片舞台，
   被"点空白关闭"逻辑接住，导致在最后一张点下一张时灯箱被关掉。 */
.lightbox .lb-btn:disabled { cursor: default; }
.lightbox.ui-visible .lb-btn:disabled { opacity: .2; }

/* 看大图时锁定页面滚动。
   关键：overflow 必须加在**根元素 html** 上，不能加在 body 上。
   本页 html 带 overflow-x: hidden，按规范只有当 html 两轴都是 visible 时，
   body 的 overflow 才会传播给视口；这里不满足，所以写在 body 上会出现最坏组合 ——
   滚动条不消失（锁定根本没生效），但 padding-right 补偿照样生效，
   整页被推偏半个滚动条宽（约 7~8px），一开一关就是肉眼可见的左右抖动。
   写在 html 上才会真正作用于视口；滚动条消失后页面变宽，再用 padding-right 补回来，
   内容的位置与宽度分毫不动。固定定位的页头不随 body 的 padding 移动，需单独补同样宽度。 */
html.is-locked { overflow: hidden; }
html.is-locked body { padding-right: var(--sbw, 0px); }
html.is-locked .site-header { padding-right: var(--sbw, 0px); }

/* =============================================================
   404 页
   ⚠️ 这一页由 Cloudflare Pages 在**任意**未匹配路径下返回（浏览器地址栏不变），
   所以页面里的一切引用都必须写**根绝对路径**（/assets/…、/gallery）：
   相对路径会按出错的那层目录解析，深链接（如 /a/b/c）下必然取不到资源，
   页面会退化成一篇没有样式的裸 HTML。
   ============================================================= */
.error-nav { max-width: 720px; border-top: 1px solid var(--line); }
.error-nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 2px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 29px);
  color: var(--ink-2);
  transition: padding-left .4s var(--ease), color .4s var(--ease);
}
.error-nav a:hover { padding-left: 12px; color: var(--ink); }
.error-nav a .arrow {
  flex: none;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-3);
  transition: transform .4s var(--ease), color .4s var(--ease);
}
.error-nav a:hover .arrow { transform: translateX(5px); color: var(--ink); }

.error-note { margin: 26px 0 0; font-size: 13px; color: var(--ink-4); line-height: 1.7; }
