/* ============================================================
   拾光集 · AN ALBUM OF LIGHT
   纯本地资源，无外部字体 / 框架 / 网络请求
   ============================================================ */

:root {
  --paper:        #FAF6F0;
  --paper-warm:   #F4EDE2;
  --paper-card:   #FFFDF9;
  --ink:          #3B382F;
  --ink-soft:     #7B7467;
  --ink-faint:    #A79E8E;
  --sage:         #6E8268;
  --sage-deep:    #4E634C;
  --gold:         #C89B6A;
  --gold-soft:    #E3C39B;
  --rose:         #C79A8B;
  --line:         rgba(91, 78, 60, .14);
  --shadow-soft:  0 10px 30px rgba(88, 72, 51, .08), 0 2px 8px rgba(88, 72, 51, .05);
  --shadow-lift:  0 26px 54px rgba(88, 72, 51, .16), 0 6px 16px rgba(88, 72, 51, .08);
  --font-serif:   "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease:         cubic-bezier(.22, .72, .22, 1);
  --maxw:         1280px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.lb-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--gold-soft); color: var(--ink); }

/* 纸张颗粒 */
.page-grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .28;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='.82'%20numOctaves='3'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'%20opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* 滚动进度 */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70;
  background: linear-gradient(90deg, var(--sage), var(--gold), var(--rose));
  transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
}

/* ===================== 顶部导航 ===================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 18px max(28px, calc((100vw - var(--maxw)) / 2));
  transition: background .4s ease, box-shadow .4s ease, padding .4s ease, backdrop-filter .4s ease;
}
.topbar.is-scrolled {
  padding-top: 12px; padding-bottom: 12px;
  background: rgba(250, 246, 240, .82);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(88, 72, 51, .05);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 34px; height: 34px; color: var(--gold); flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { font-family: var(--font-serif); font-size: 18px; letter-spacing: .16em; line-height: 1.15; }
.brand-text em {
  display: block; font-family: var(--font-sans); font-style: normal;
  font-size: 9px; letter-spacing: .28em; color: var(--ink-faint); margin-top: 3px;
}
.topbar-right { display: flex; align-items: center; gap: 26px; }
.topbar-note { font-size: 12px; letter-spacing: .12em; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 9px; }
.topbar-note i { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); display: block; }
.topbar-link {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; letter-spacing: .1em;
  padding: 8px 17px; border: 1px solid var(--line); border-radius: 999px;
  transition: background .3s, border-color .3s, transform .3s var(--ease), color .3s;
}
.topbar-link svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.topbar-link:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.topbar-link:hover svg { transform: translateX(3px); }
/* 首屏整屏都是照片：导航统一浅字，滚动后恢复纸面深色 */
.topbar:not(.is-scrolled) { background: linear-gradient(90deg, rgba(12, 20, 14, .50) 0%, rgba(12, 20, 14, .20) 44%, transparent 74%); }
.topbar:not(.is-scrolled) .brand-mark { color: var(--gold-soft); }
.topbar:not(.is-scrolled) .brand-text { color: #FFFDF7; text-shadow: 0 1px 10px rgba(12, 20, 12, .6); }
.topbar:not(.is-scrolled) .brand-text em { color: rgba(255, 253, 247, .74); }
.topbar:not(.is-scrolled) .topbar-note { color: rgba(255, 253, 247, .86); }
.topbar:not(.is-scrolled) .topbar-note i { background: var(--gold-soft); }
.topbar:not(.is-scrolled) .topbar-link { color: #FFFDF7; border-color: rgba(255, 253, 247, .44); }
.topbar:not(.is-scrolled) .topbar-link:hover { background: #FFFDF7; color: var(--ink); border-color: #FFFDF7; }
/* 桌面右上落在半透明奶油纸上，改回墨字；移动端顶部仍是照片，保持浅字 */
@media (min-width: 901px) {
  .topbar:not(.is-scrolled) .topbar-right {
    background: rgba(250, 246, 240, .78); padding: 5px 14px; border-radius: 999px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px rgba(20, 28, 18, .12);
  }
  .topbar:not(.is-scrolled) .topbar-note { color: var(--ink-soft); }
  .topbar:not(.is-scrolled) .topbar-note i { background: var(--sage); }
  .topbar:not(.is-scrolled) .topbar-link { color: var(--ink); border-color: var(--line); }
  .topbar:not(.is-scrolled) .topbar-link:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); text-shadow: none; }
}

/* 返回入口落在右上奶油纸胶囊内时改为纯文字，避免胶囊套胶囊 */
@media (min-width: 901px) {
  .topbar-right .hub-back {
    border-color: transparent; border-right: 1px solid var(--line); border-radius: 0;
    background: transparent; box-shadow: none; padding: 5px 14px 5px 2px;
  }
  .topbar-right .hub-back:hover { background: transparent; opacity: .65; }
}

/* ===================== 封面 ===================== */
/* 08.webp 整屏铺满（1080P 满屏）；文案叠在照片左侧树林上。
   左侧密林用暗角压出可读底、浅色字压图，右侧逆光亮部留给人物；
   移动端另走「上照片 / 下奶油纸 + 墨字」版式，见响应式段 */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: #141C17; color: var(--ink);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("../assets/thumbs/08.webp") center bottom / cover no-repeat;
  opacity: .10; filter: blur(24px) saturate(.9); transform: scale(1.06);
}
.cover-media {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.cover-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.cover-topshade {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1; pointer-events: none;
  height: 240px;
  background: linear-gradient(180deg, rgba(12, 20, 14, .50), rgba(12, 20, 14, 0));
}
/* 左侧暗角：把密林压成可读的文字底，右侧逆光与人物保持原亮度 */
.cover-paper {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(270deg,
      rgba(12, 20, 14, 0) 44%,
      rgba(12, 20, 14, .20) 58%,
      rgba(12, 20, 14, .50) 74%,
      rgba(12, 20, 14, .70) 100%);
  animation: cover-paper-in 1.15s var(--ease) both;
}
@keyframes cover-paper-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cover-glow {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(520px 380px at 26% 42%, rgba(227, 195, 155, .16), transparent 72%);
  display: none; /* 左侧暗角版不叠加暖光晕，避免提亮文字区 */
}
[data-parallax] { --py: 0px; transform: translate3d(0, var(--py), 0) rotate(var(--rot, 0deg)); will-change: transform; }

/* 文案贴在左侧，叠在压暗的树林上 */
.cover-inner {
  position: relative; z-index: 3; flex: 1;
  display: flex; align-items: flex-end; justify-content: flex-start;
  width: 100%; max-width: none; margin: 0;
  padding: 0 40px 96px max(56px, calc((100vw - 1200px) / 2));
}
.cover-copy { position: relative; isolation: isolate; width: 420px; flex: none; max-width: none; }
.cover-copy::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -48px -80px -44px -56px;
  background: radial-gradient(ellipse closest-side at 44% 50%,
    rgba(14, 22, 16, .82), rgba(14, 22, 16, .50) 58%, rgba(14, 22, 16, 0) 100%);
}
.cover-copy > * { animation: cover-rise .85s var(--ease) both; }
.cover-copy > :nth-child(1) { animation-delay: .16s; }
.cover-copy > :nth-child(2) { animation-delay: .28s; }
.cover-copy > :nth-child(3) { animation-delay: .40s; }
.cover-copy > :nth-child(4) { animation-delay: .52s; }
.cover-copy > :nth-child(5) { animation-delay: .62s; }
@keyframes cover-rise {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}
.eyebrow {
  display: flex; align-items: center; gap: 14px; margin: 0 0 24px;
  font-size: 11px; letter-spacing: .3em; color: #DCE4D2; font-weight: 600;
}
.eyebrow-line { display: block; width: 42px; height: 1px; background: #DCE4D2; opacity: .7; }
.hero-title { margin: 0; font-family: var(--font-serif); font-weight: 500; line-height: 1.18; }
.hero-title-top {
  display: block; font-size: clamp(64px, 8vw, 116px); letter-spacing: .16em;
  color: var(--ink); margin-bottom: 12px;
  background: linear-gradient(120deg, #FBF6EA 0%, #EADFC8 46%, #D8B98C 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-title-sub { display: block; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: .1em; color: rgba(251, 246, 234, .84); line-height: 1.6; }
.hero-lead { margin: 26px 0 30px; font-size: 14.5px; line-height: 2.15; color: rgba(251, 246, 234, .84); letter-spacing: .04em; }
.hero-stats { display: flex; align-items: center; gap: 26px; margin-bottom: 34px; }
.stat { display: flex; align-items: baseline; gap: 9px; }
.stat strong { font-family: var(--font-serif); font-size: 27px; font-weight: 500; color: #EADFC8; }
.stat span { font-size: 11.5px; letter-spacing: .14em; color: rgba(251, 246, 234, .84); }
.stat-sep { width: 1px; height: 22px; background: rgba(251, 246, 234, .30); }
.hero-cta {
  display: inline-flex; align-items: center; gap: 14px; padding: 13px 26px 13px 28px;
  border-radius: 999px; background: #FBF6EA; color: #26301F;
  font-size: 13px; letter-spacing: .16em; box-shadow: 0 14px 30px rgba(59, 56, 47, .18);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s;
}
.hero-cta svg { width: 18px; height: 18px; animation: float-down 2.4s ease-in-out infinite; }
.hero-cta:hover { transform: translateY(-4px); background: #EADFC8; color: #26301F; box-shadow: 0 20px 38px rgba(59, 56, 47, .22); }
@keyframes float-down { 0%,100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* 底部页码条 */
.cover-footbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 40px;
  border-top: 1px solid rgba(91, 78, 60, .18); background: rgba(250, 246, 240, .88);
  backdrop-filter: blur(12px) saturate(1.05); -webkit-backdrop-filter: blur(12px) saturate(1.05);
  font-size: 9px; letter-spacing: .22em; color: var(--ink-soft);
}
.cover-foot-left i { font-style: normal; margin: 0 6px; opacity: .6; }
.cover-open {
  display: inline-flex; align-items: center; gap: 9px; padding: 4px 0;
  font-size: 10px; letter-spacing: .14em; color: var(--sage-deep);
  transition: color .3s, gap .3s var(--ease);
}
.cover-open:hover { color: var(--gold); gap: 13px; }
.cover-open svg { width: 12px; height: 12px; }
.cover-open:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }

/* ===================== 相册区 ===================== */
.gallery { position: relative; padding: 110px max(28px, calc((100vw - var(--maxw)) / 2)) 90px; }
.gallery::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 420px at 12% 8%, rgba(227, 195, 155, .16), transparent 70%),
              radial-gradient(700px 420px at 88% 76%, rgba(160, 182, 150, .14), transparent 70%);
}
.section-head { position: relative; text-align: center; max-width: 660px; margin: 0 auto 34px; }
.section-kicker { margin: 0 0 14px; font-size: 10.5px; letter-spacing: .32em; color: var(--gold); }
.section-kicker span { margin: 0 8px; opacity: .6; }
.section-title { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: .1em; line-height: 1.5; }
.section-title em { font-style: normal; color: var(--sage-deep); position: relative; }
.section-title em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 6px; background: rgba(200, 155, 106, .28); border-radius: 3px; transform: rotate(-1deg); }
.section-desc { margin: 18px 0 0; font-size: 13.5px; color: var(--ink-soft); letter-spacing: .06em; }

/* 交错入场 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* 筛选 */
.filter-bar { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 0 0 48px; }
.filter {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 253, 249, .7);
  font-size: 13px; letter-spacing: .1em; color: var(--ink-soft);
  transition: color .3s, background .3s, border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.filter span { font-size: 10px; color: var(--ink-faint); letter-spacing: .04em; }
.filter:hover { transform: translateY(-3px); border-color: rgba(200, 155, 106, .5); color: var(--ink); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 10px 22px rgba(59, 56, 47, .16); }
.filter.is-active span { color: var(--gold-soft); }

/* 瀑布流网格（JS 计算 span） */
.grid {
  --cols: 4;
  position: relative; display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: 8px; column-gap: 22px;
}
.card {
  align-self: start; position: relative; grid-row-end: span 40;
  margin: 0 0 24px; padding: 8px 8px 0; border-radius: 13px;
  background: var(--paper-card); box-shadow: var(--shadow-soft);
  opacity: 0; transform: translateY(28px) scale(.99);
  transition: opacity .75s var(--ease), transform .75s var(--ease), box-shadow .45s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.card.is-visible { opacity: 1; transform: none; }
.card.is-visible:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); transition-delay: 0ms; }
.card.is-hidden { display: none; }
.card-hit { position: absolute; inset: 0; z-index: 6; border-radius: 13px; }
.card-media {
  position: relative; width: 100%; overflow: hidden; border-radius: 7px;
  background: var(--tone, var(--paper-warm)); isolation: isolate;
}
.card-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-lqip { filter: blur(16px) saturate(1.1); transform: scale(1.12); opacity: .9; transition: opacity .7s ease; }
.card-img {
  opacity: 0; transform: scale(1.06); filter: blur(6px);
  transition: opacity .8s ease, transform 1.1s var(--ease), filter .8s ease;
}
.card-media.is-loaded .card-img { opacity: 1; transform: scale(1); filter: none; }
.card-media.is-loaded .card-lqip { opacity: 0; }
.card.is-visible:hover .card-media.is-loaded .card-img { transform: scale(1.055); transition-duration: .9s; }
.card-overlay {
  position: absolute; inset: 0; z-index: 2; opacity: 0; transition: opacity .45s ease;
  background: linear-gradient(to top, rgba(40, 36, 29, .46), rgba(40, 36, 29, 0) 48%);
}
.card.is-visible:hover .card-overlay { opacity: 1; }
.card-zoom {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%; color: var(--ink);
  background: rgba(255, 253, 249, .92); box-shadow: 0 4px 14px rgba(0,0,0,.14);
  opacity: 0; transform: translateY(10px) scale(.85);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.card-zoom svg { width: 16px; height: 16px; }
.card.is-visible:hover .card-zoom { opacity: 1; transform: none; }
.card-info { padding: 13px 6px 15px; }
.card-line { display: flex; align-items: center; justify-content: space-between; }
.card-no { font-size: 10px; letter-spacing: .18em; color: var(--gold); }
.card-no i { font-style: normal; color: var(--ink-faint); margin: 0 3px; }
.card-cat { font-size: 10px; letter-spacing: .14em; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.card-title { margin: 8px 0 2px; font-family: var(--font-serif); font-size: 17px; font-weight: 500; letter-spacing: .06em; }
.card-moment { margin: 0; font-size: 11px; letter-spacing: .08em; color: var(--ink-faint); }
.gallery-end { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 56px 0 0; font-size: 11px; letter-spacing: .22em; color: var(--ink-faint); }
.gallery-end span { width: 46px; height: 1px; background: var(--line); }

/* ===================== 页脚 ===================== */
.footer { position: relative; padding: 88px 28px 54px; text-align: center; background: linear-gradient(180deg, rgba(244, 237, 226, 0), rgba(233, 222, 207, .6)); }
.footer-inner { max-width: 620px; margin: 0 auto; }
.footer-quote { margin: 0; font-family: var(--font-serif); font-size: clamp(19px, 2.4vw, 26px); line-height: 2; letter-spacing: .1em; color: var(--ink-soft); }
.footer-line { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 34px 0 26px; color: var(--gold); }
.footer-line i { width: 76px; height: 1px; background: var(--line); }
.footer-line svg { width: 20px; height: 20px; }
.footer-meta { margin: 0; font-size: 11px; letter-spacing: .22em; color: var(--ink-soft); }
.footer-meta span { margin: 0 8px; color: var(--gold); }
.footer-small { margin: 10px 0 0; font-size: 10.5px; letter-spacing: .12em; color: var(--ink-faint); font-style: italic; }

/* 回到顶部 */
.to-top {
  position: fixed; right: 28px; bottom: 28px; z-index: 45; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%; color: var(--ink);
  background: rgba(255, 253, 249, .92); box-shadow: var(--shadow-soft);
  border: 1px solid var(--line); opacity: 0; pointer-events: none; transform: translateY(14px) scale(.9);
  transition: opacity .4s, transform .4s var(--ease), background .3s, color .3s;
}
.to-top svg { width: 18px; height: 18px; }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--ink); color: var(--paper); transform: translateY(-4px); }

/* ===================== 大图预览 ===================== */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .38s ease, visibility .38s;
}
.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.lb-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(1100px 700px at 50% 42%, rgba(62, 54, 44, .86), rgba(24, 21, 18, .97));
  backdrop-filter: blur(18px) saturate(.9); -webkit-backdrop-filter: blur(18px) saturate(.9);
}
.lb-top { position: relative; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 34px 8px; }
.lb-heading { min-width: 0; }
.lb-index { display: block; font-size: 10.5px; letter-spacing: .28em; color: var(--gold-soft); margin-bottom: 6px; }
.lb-title { margin: 0; font-family: var(--font-serif); font-size: 22px; font-weight: 500; letter-spacing: .1em; color: #F8F2E8; line-height: 1.4; }
.lb-moment { margin: 3px 0 0; font-size: 11px; letter-spacing: .14em; color: rgba(248, 242, 232, .5); }
.lb-tools { display: flex; gap: 10px; flex: none; }
.lb-tool {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px;
  border: 1px solid rgba(248, 242, 232, .2); color: rgba(248, 242, 232, .82);
  font-size: 11.5px; letter-spacing: .12em;
  transition: background .3s, border-color .3s, transform .3s var(--ease), color .3s;
}
.lb-tool svg { width: 15px; height: 15px; }
.lb-tool:hover { background: rgba(248, 242, 232, .14); transform: translateY(-2px); border-color: rgba(248, 242, 232, .45); }
.lb-tool.is-active { background: rgba(200, 155, 106, .26); border-color: rgba(227, 195, 155, .7); color: #F8F2E8; }
.lb-tool .ico-pause { display: none; }
.lb-tool.is-active .ico-play { display: none; }
.lb-tool.is-active .ico-pause { display: block; }

.lb-nav {
  position: absolute; top: 50%; z-index: 4; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: rgba(248, 242, 232, .88);
  border: 1px solid rgba(248, 242, 232, .24); background: rgba(255, 253, 249, .07);
  transform: translateY(-50%); transition: background .3s, transform .35s var(--ease), border-color .3s;
}
.lb-nav svg { width: 22px; height: 22px; }
.lb-nav:hover { background: rgba(248, 242, 232, .18); border-color: rgba(248, 242, 232, .5); }
.lb-prev { left: 26px; } .lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next { right: 26px; } .lb-next:hover { transform: translateY(-50%) translateX(3px); }

.lb-stage {
  position: relative; z-index: 2; flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 8px 0; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.lb-frame {
  position: relative; flex: none; width: 300px; height: 200px; overflow: hidden;
  border-radius: 4px; background-position: center; background-size: cover;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(248, 242, 232, .14);
  transition: width .44s var(--ease), height .44s var(--ease), transform .44s var(--ease);
}
.lb-frame::before {
  content: ""; position: absolute; inset: -12%; background-image: inherit;
  background-size: cover; background-position: center; filter: blur(20px); opacity: .6;
}
.lb-frame.no-anim { transition: none; }
.lb-stage.is-dragging .lb-frame { transition: none; cursor: grabbing; }
.lb-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: translateX(0) scale(1); -webkit-user-drag: none;
  transition: opacity .4s ease, transform .46s var(--ease);
}
.lb-img.is-current { opacity: 1; transform: none; z-index: 2; }
.lb-img.from-right, .lb-img.to-right { opacity: 0; transform: translateX(46px) scale(.985); }
.lb-img.from-left, .lb-img.to-left { opacity: 0; transform: translateX(-46px) scale(.985); }
.lb-frame.is-flipping .lb-img { opacity: 0 !important; transition: none; }
.lb-caption { margin: 0; max-width: min(80vw, 760px); text-align: center; font-family: var(--font-serif); font-size: 13.5px; letter-spacing: .1em; color: rgba(248, 242, 232, .72); }
.lb-hint { position: relative; z-index: 2; margin: 4px 0 14px; text-align: center; font-size: 10px; letter-spacing: .18em; color: rgba(248, 242, 232, .38); }
.lb-hint span { margin: 0 8px; }
.lb-filmstrip {
  position: relative; z-index: 3; display: flex; gap: 9px; overflow-x: auto; overflow-y: hidden;
  padding: 12px 34px 4px; scrollbar-width: none; -ms-overflow-style: none;
}
.lb-filmstrip::-webkit-scrollbar { display: none; }
.lb-thumb {
  flex: 0 0 auto; width: 66px; height: 48px; padding: 0; border-radius: 4px; overflow: hidden;
  opacity: .42; filter: saturate(.7); border: 2px solid transparent;
  transition: opacity .35s, transform .35s var(--ease), filter .35s, border-color .35s;
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: .85; transform: translateY(-3px); }
.lb-thumb.is-current { opacity: 1; filter: none; border-color: var(--gold-soft); transform: translateY(-3px); }
.lb-playbar { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; z-index: 5; }
.lb-playbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sage), var(--gold-soft)); }
.lb-playbar.is-playing i { animation: playfill 3.8s linear forwards; }
@keyframes playfill { from { width: 0; } to { width: 100%; } }

/* 打开 / 关闭时飞入的照片 */
.flip-ghost {
  position: fixed; z-index: 200; margin: 0; object-fit: cover; pointer-events: none;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

/* ===================== 响应式 ===================== */
@media (max-width: 1180px) {
  .grid { --cols: 3; }
  .hero-title-sub { font-size: clamp(20px, 2.2vw, 26px); }
}
@media (max-width: 900px) {
  /* 上半屏完整显示照片（人物不被压白、不被文案遮挡），下半屏纯奶油纸承载文案；
     分区高度随视口自适应，保证纸面至少留 360px 给文案与页码条 */
  .hero { min-height: 100svh; --cover-split: min(54svh, calc(100svh - 360px)); }
  .hero::before { display: none; }
  .cover-media { inset: 0 0 auto 0; width: 100%; height: var(--cover-split); }
  .cover-photo { object-position: 88% 100%; }
  .cover-topshade { height: 24%; }
  .cover-paper {
    background: linear-gradient(180deg,
      transparent 0, transparent var(--cover-split),
      #FAF6F0 var(--cover-split), #FAF6F0 100%);
  }
  /* 右上角只留「三册首页」；下方已有「开始翻阅」，不再重复 */
  .topbar-right { gap: 10px; }
  .topbar-link { display: none; }
  .topbar:not(.is-scrolled) .topbar-right .hub-back {
    color: #FFFDF7; border-color: rgba(255, 253, 247, .50);
    background: rgba(12, 20, 14, .16);
  }
  /* 下半屏是纯奶油纸 → 显式恢复深墨字与深色按钮，避免继承桌面左侧版的浅色字 */
  .cover-glow { display: block; background: radial-gradient(560px 360px at 50% 30%, rgba(227, 195, 155, .22), transparent 70%); }
  .eyebrow { color: var(--sage-deep); }
  .eyebrow-line { background: var(--sage); }
  .hero-title-top { background: linear-gradient(120deg, #4C4638 0%, #8C7350 46%, #B78959 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  .hero-title-sub, .hero-lead { color: var(--ink-soft); }
  .stat strong { color: var(--sage-deep); }
  .stat span { color: var(--ink-faint); }
  .stat-sep { background: var(--line); }
  .hero-cta { background: var(--ink); color: var(--paper); }
  .hero-cta:hover { background: var(--sage-deep); color: var(--paper); }
  /* 文案限定在下半纸面区内垂直居中，平板 / 手机都不会出现大片空白 */
  .cover-inner {
    flex: none; height: calc(100svh - var(--cover-split)); margin-top: var(--cover-split);
    align-items: center; justify-content: flex-start; padding: 0 28px 40px;
  }
  .cover-copy { width: min(560px, 100%); }
  .cover-copy::before { inset: -30px -30px -24px -30px;
    background: radial-gradient(ellipse closest-side at 50% 50%,
      rgba(250, 246, 240, .92), rgba(250, 246, 240, .62) 58%, rgba(250, 246, 240, 0) 100%); }
  .eyebrow { margin-bottom: 14px; font-size: 9.5px; }
  .hero-title-top { font-size: clamp(52px, 8vw, 72px); margin-bottom: 8px; }
  .hero-title-sub { font-size: clamp(19px, 3vw, 24px); }
  .hero-title-sub br { display: none; }
  .hero-lead { font-size: 12.5px; line-height: 1.9; margin: 12px 0 16px; }
  .hero-lead br { display: none; }
  .hero-stats { gap: 14px; margin-bottom: 18px; }
  .stat strong { font-size: 21px; }
  .hero-cta { padding: 10px 20px; font-size: 12px; }
  .grid { --cols: 2; }
  .gallery { padding-top: 80px; }
  .lb-nav { width: 42px; height: 42px; }
  .lb-prev { left: 12px; } .lb-next { right: 12px; }
}
@media (max-width: 600px) {
  .topbar { padding: 13px 18px; }
  .topbar.is-scrolled { padding: 10px 18px; }
  .brand-text { font-size: 16px; }
  .topbar-note { display: none; }
  .topbar-right { gap: 8px; }
  .cover-photo { object-position: 88% 100%; }
  .cover-topshade { height: 22%; }
  /* 渐变沿用 900px 断点的「上照片 / 下纯纸」硬切 */
  .cover-inner { padding: 0 20px 40px; }
  .eyebrow { margin-bottom: 12px; font-size: 9px; letter-spacing: .18em; }
  .eyebrow-line { width: 26px; }
  .hero-title-top { font-size: clamp(48px, 13vw, 64px); margin-bottom: 6px; }
  .hero-title-sub { font-size: clamp(18px, 5vw, 22px); line-height: 1.5; }
  .hero-title-sub br { display: none; }
  .hero-lead { font-size: 12px; line-height: 1.9; margin: 12px 0 16px; }
  .hero-lead br { display: none; }
  .hero-stats { gap: 12px; margin-bottom: 16px; }
  .stat strong { font-size: 20px; }
  .stat span { font-size: 9.5px; }
  .hero-cta { padding: 10px 18px; font-size: 11.5px; }
  .cover-footbar { padding: 11px 20px; }
  .cover-foot-left { display: none; }
  .cover-open { margin-left: auto; font-size: 9.5px; }
  .gallery { padding: 68px 14px 60px; }
  .section-head { margin-bottom: 26px; }
  .section-desc { font-size: 12.5px; }
  .filter-bar { gap: 7px; margin-bottom: 30px; }
  .filter { padding: 7px 14px; font-size: 12px; }
  .grid { column-gap: 12px; }
  .card { margin-bottom: 14px; padding: 5px 5px 0; border-radius: 10px; }
  .card-media { border-radius: 6px; }
  .card-info { padding: 9px 3px 11px; }
  .card-title { font-size: 14px; margin-top: 6px; }
  .card-moment { font-size: 9.5px; }
  .card-no, .card-cat { font-size: 9px; }
  .card-zoom { width: 28px; height: 28px; right: 8px; bottom: 8px; }
  .footer { padding: 68px 20px 44px; }
  .to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; }

  .lb-top { padding: 14px 16px 6px; align-items: center; }
  .lb-title { font-size: 17px; }
  .lb-moment { font-size: 10px; }
  .lb-tool-label { display: none; }
  .lb-tool { padding: 8px; }
  .lb-nav { width: 36px; height: 36px; background: rgba(24, 21, 18, .36); }
  .lb-nav svg { width: 18px; height: 18px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-stage { gap: 12px; }
  .lb-caption { font-size: 12px; padding: 0 12px; }
  .lb-hint { display: none; }
  .lb-filmstrip { padding: 10px 14px 12px; gap: 7px; }
  .lb-thumb { width: 52px; height: 38px; }
}
@media (max-width: 360px) {
  .grid { --cols: 1; }
  .hero-stats { flex-wrap: wrap; }
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal, .card { opacity: 1; transform: none; }
  [data-parallax] { transform: none; }
}
