/* ==================================================================
   LILYCLEHEART 摄影集 — 画册式深色设计
   暖炭底 / 米白相纸字 / 朱砂点缀 / 宋体巨字 / mono 数据字
   ================================================================== */
:root {
  --ink: #101014;          /* 暖炭黑底 */
  --ink-2: #16161b;        /* 章内微差底 */
  --paper: #e8e4dc;        /* 米白(相纸留白) */
  --dim: #8b877f;          /* 暖灰 */
  --faint: #57534c;        /* 更暗暖灰 */
  --cinnabar: #c8452c;     /* 朱砂 —— 唯一点缀 */
  --line: rgba(232, 228, 220, .13);
  --serif: Georgia, "Times New Roman", "Songti SC", "STSong", SimSun, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "SF Mono", Consolas, "JetBrains Mono", "Courier New", monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--cinnabar); color: var(--paper); }

/* ---- 全局银盐颗粒(暗房质感) ---- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: .045;
  mix-blend-mode: overlay;
}

.mono { font-family: var(--mono); letter-spacing: .14em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 52px); }
.eyebrow { font-size: 11px; color: var(--faint); }

/* ============ 顶部导航 ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 4vw, 52px);
  transition: background .4s var(--ease), border-color .4s, padding .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(16, 16, 20, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 11px; padding-bottom: 11px;
}
.nav-logo {
  font-family: var(--serif); font-size: 16px; letter-spacing: .2em; color: var(--paper);
  display: flex; align-items: baseline; gap: 12px;
}
.nav-logo-cn { font-size: 11px; color: var(--faint); letter-spacing: .4em; }
.nav-links { display: flex; gap: clamp(18px, 3vw, 34px); }
.nav-links a {
  font-size: 13px; letter-spacing: .18em; color: var(--dim);
  transition: color .25s;
}
.nav-links a:hover { color: var(--paper); }

/* ============ 章节目录 ============ */
.toc {
  position: fixed; left: 26px; top: 50%; z-index: 40;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}
.toc.on { opacity: 1; visibility: visible; }
.toc a {
  font-family: var(--serif); font-size: 13px; color: var(--faint);
  writing-mode: vertical-rl; letter-spacing: .3em;
  padding: 2px; border-right: 2px solid transparent;
  transition: color .3s, border-color .3s;
}
.toc a.cur { color: var(--paper); border-right-color: var(--cinnabar); }
.toc a:hover { color: var(--paper); }
.toc-cmp {
  writing-mode: vertical-rl;
  font-family: var(--serif); font-size: 13px; color: var(--dim);
  letter-spacing: .3em;
  padding: 12px 2px;
  border-right: 2px solid var(--cinnabar);
  transition: color .3s;
}
.toc-cmp:hover { color: var(--paper); }
.toc-cmp.on { color: var(--paper); background: var(--cinnabar); border-right-color: var(--cinnabar); }

/* ============ 封面 ============ */
/* 容器限宽:超宽屏上两侧露出页面底色,图片不至被过度裁切 */
.cover { position: relative; height: 100svh; min-height: 600px; overflow: hidden; max-width: 1800px; margin: 0 auto; }
.cover-bg {
  position: absolute; inset: 0;
  background: url("media/large/DSC_5948-已增强-NR.jpg") center 40% / cover no-repeat;
  animation: coverDrift 30s var(--ease) both;
}
@keyframes coverDrift { from { transform: scale(1.08); } to { transform: scale(1); } }
.cover-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(16,16,20,.52) 0%, rgba(16,16,20,.12) 42%, rgba(16,16,20,.72) 82%, var(--ink) 100%);
}
.cover-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 clamp(20px, 5vw, 72px) clamp(88px, 13vh, 150px);
}
.cover-eyebrow { font-size: 12px; color: rgba(232,228,220,.8); margin-bottom: 18px; }
.cover-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 10vw, 148px);
  letter-spacing: .06em; line-height: 1.04; color: var(--paper);
  text-shadow: 0 2px 46px rgba(0,0,0,.5);
}
.cover-sub {
  margin-top: 16px; font-family: var(--serif);
  font-size: clamp(15px, 2vw, 21px); letter-spacing: .58em;
  color: rgba(232,228,220,.92);
}
.cover-line {
  margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px clamp(20px, 3vw, 40px);
}
.cover-line a {
  font-family: var(--serif); font-size: 16px; letter-spacing: .32em;
  color: rgba(232,228,220,.72);
  padding-bottom: 7px; border-bottom: 1px solid rgba(232,228,220,.22);
  transition: color .3s, border-color .3s;
}
.cover-line a i {
  font-style: normal; font-family: var(--mono); font-size: 11px;
  color: var(--cinnabar); margin-right: 9px; vertical-align: 3px; letter-spacing: 0;
}
.cover-line a:hover { color: var(--paper); border-bottom-color: var(--cinnabar); }
.cover-seal {
  position: absolute; right: clamp(20px, 5vw, 72px); bottom: clamp(96px, 14vh, 160px);
  width: 58px; height: 58px; background: var(--cinnabar);
  color: var(--paper); font-family: var(--serif);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 21px; line-height: 1.18; font-weight: 700;
  border-radius: 8px 7px 9px 6px;
  box-shadow:
    inset 0 0 14px rgba(120, 20, 8, .55),
    inset 2px 3px 6px rgba(255, 235, 225, .22),
    0 6px 30px rgba(200, 69, 44, .35);
}
.cover-foot {
  position: absolute; left: clamp(20px, 5vw, 72px); bottom: 34px;
  font-size: 11.5px; color: var(--faint);
}
.cover-down {
  position: absolute; right: clamp(24px, 5vw, 74px); bottom: 30px;
  color: rgba(232,228,220,.66); animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ============ 章节 ============ */
.chapter-head {
  position: relative; height: 86svh; min-height: 520px;
  overflow: hidden; display: flex; align-items: flex-end;
  max-width: 1800px; margin: 0 auto;
}
.chapter-bg { position: absolute; inset: 0; }
.chapter-bg img { width: 100%; height: 100%; object-fit: cover; transition: filter .5s var(--ease), transform .5s var(--ease); }
/* 章头大图可点击打开灯箱 */
.chapter-head-fig { cursor: pointer; }
.chapter-head-fig:hover .ph-edit,
.chapter-head-fig:hover .ph-orig { filter: brightness(1.06); transform: scale(1.015); }
.chapter-head::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,16,20,.42), rgba(16,16,20,.06) 40%, rgba(16,16,20,.78) 88%, var(--ink));
}
/* 竖图头图:仍 cover 拉伸铺满,但章头容器按视口高度收窄(约 66vh),
   让竖图上下裁切从全宽的 60%+ 降到 13%~20%,拉伸有张力但范围受限;
   左右留出的纸底用微光衬底,避免空旷 */
.chapter-head.tall-head { max-width: clamp(520px, 66vh, 860px); }
.chapter-head.tall-head .chapter-bg img,
.chapter-head.tall-head .chapter-bg .ph-orig { object-fit: cover; }
.chapter-head.tall-head .chapter-bg {
  background:
    radial-gradient(ellipse 62% 78% at 50% 42%, rgba(232,228,220,.055), transparent 72%),
    radial-gradient(ellipse 46% 60% at 50% 100%, rgba(200,69,44,.045), transparent 70%),
    var(--ink-2);
}
/* 无横向图的章(造梦):文字扉页 */
.chapter-head.plain { height: 56svh; min-height: 380px; }
.chapter-head.plain::after {
  background:
    radial-gradient(ellipse 70% 90% at 78% 30%, rgba(232,228,220,.05), transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, rgba(16,16,20,.4) 60%, var(--ink) 100%);
}
.chapter-name {
  position: absolute; z-index: 2;
  top: 8svh; right: clamp(14px, 4vw, 60px);
  writing-mode: vertical-rl;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(84px, 15vw, 220px);
  letter-spacing: .18em; line-height: 1;
  color: var(--paper);
  mix-blend-mode: difference;
}
.chapter-meta {
  position: absolute; z-index: 2;
  left: clamp(20px, 5vw, 72px); bottom: clamp(28px, 6vh, 56px);
}
.chapter-no { font-family: var(--mono); font-size: 12px; letter-spacing: .3em; color: var(--cinnabar); }
.chapter-desc {
  margin-top: 10px; max-width: 460px;
  font-size: 14px; color: rgba(232,228,220,.82); letter-spacing: .06em;
}

/* ---- 画册网格:宽窄交错 ---- */
.chapter-body {
  position: relative;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) clamp(20px, 4vw, 52px) clamp(72px, 10vh, 130px);
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(14px, 2.4vw, 34px);
  row-gap: clamp(56px, 10vh, 120px);
}
.chapter-body::before {           /* 章首灯下翻页的微光 */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 80vh;
  background:
    radial-gradient(ellipse 62% 52% at 50% 0%, rgba(232, 228, 220, .065), transparent 72%),
    radial-gradient(ellipse 40% 30% at 82% 100%, rgba(200, 69, 44, .028), transparent 70%);
  pointer-events: none;
}
.chapter-wm {                     /* 章名水印 */
  position: absolute; top: clamp(30px, 6vh, 80px); right: -0.06em;
  writing-mode: vertical-rl;
  font-family: var(--serif); font-size: clamp(150px, 26vw, 380px);
  letter-spacing: .12em; line-height: 1;
  color: var(--paper); opacity: .07;
  pointer-events: none; user-select: none;
}
/* 章末页码条 */
.chapter-colophon {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: clamp(16px, 4vh, 48px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--faint);
}
.plate { position: relative; cursor: zoom-in; }
.plate.wide { grid-column: span 8; }
.plate.wide.alt { grid-column: 5 / 13; }
.plate.tall { grid-column: span 4; }
.plate.tall.alt { grid-column: 8 / 13; }
.plate.tall { align-self: start; margin-top: clamp(30px, 8vh, 110px); }   /* 竖图下沉错位 */
.plate.tall.alt { margin-top: 0; }
.plate img {
  width: 100%; height: auto;
  border-radius: 2px;
  transition: transform .9s var(--ease), filter .9s var(--ease);
}
.plate:hover img { transform: scale(1.018); filter: brightness(1.05); }
/* hover 对焦角 */
.plate::before, .plate::after {
  content: ""; position: absolute; z-index: 2; pointer-events: none;
  width: 26px; height: 26px; opacity: 0;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.plate::before {
  top: 10px; left: 10px; border-top: 2px solid var(--cinnabar); border-left: 2px solid var(--cinnabar);
  transform: translate(6px, 6px);
}
.plate::after {
  bottom: 10px; right: 10px; border-bottom: 2px solid var(--cinnabar); border-right: 2px solid var(--cinnabar);
  transform: translate(-6px, -6px);
}
.plate:hover::before, .plate:hover::after { opacity: 1; transform: translate(0, 0); }
/* 图注 */
.plate-cap {
  position: relative; z-index: 4;   /* 图片层切换动画时图注永远在上方 */
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: 12px;
  font-size: 12.5px; color: var(--dim); letter-spacing: .1em;
}
.plate-cap b {
  font-family: var(--serif); font-weight: 700; font-size: 16.5px; letter-spacing: .18em; color: var(--paper);
  display: inline-flex; align-items: center; gap: 8px;
}
.edited-mark {
  font-style: normal; font-family: var(--serif);
  font-size: 10px; letter-spacing: 0; line-height: 1;
  color: var(--paper); background: var(--cinnabar);
  padding: 3px 4px; border-radius: 3px;
  transform: translateY(-1px);
}
.plate-cap .mono { font-size: 11.5px; color: var(--dim); white-space: nowrap; }

/* ---- 对比双图(后期修图向变体 ?mode=edit) ---- */
.plate.pair { grid-column: span 12; cursor: zoom-in; }
.pair-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: rgba(232, 228, 220, .28);
  border-radius: 2px; overflow: hidden;
}
.pair-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 0;
  transition: filter .9s var(--ease);
}
.plate.pair:hover .pair-wrap img { filter: brightness(1.05); }
.pair-wrap .lb-tag { z-index: 3; }
@media (max-width: 560px) {
  .pair-wrap { grid-template-columns: 1fr; gap: 0; }
  .pair-wrap .tag-o { top: 12px; bottom: auto; }
}

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============ 视频后期 · 别册 ============ */
.film { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.film .wrap { padding-top: clamp(64px, 9vw, 110px); padding-bottom: clamp(72px, 10vw, 130px); }
.film-head { margin-bottom: clamp(30px, 4vw, 54px); }
.film-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4.4vw, 54px); letter-spacing: .05em;
  display: flex; align-items: baseline; gap: 22px; flex-wrap: wrap;
}
.film-title span { font-size: clamp(16px, 2vw, 24px); color: var(--dim); letter-spacing: .3em; }
.film-desc { margin-top: 10px; font-size: 12px; color: var(--faint); }
.film-card { position: relative; overflow: hidden; border-radius: 4px; cursor: pointer; background: #000; }
.film-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.2s var(--ease); }
.film-card:hover img { transform: scale(1.02); }
.film-card.playing img, .film-card.playing .film-play { display: none; }
.film-card video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.film-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: clamp(74px, 9vw, 100px); height: clamp(74px, 9vw, 100px);
  border-radius: 50%; border: 1px solid rgba(232,228,220,.55);
  background: rgba(16,16,20,.42); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  color: var(--paper); transition: transform .4s var(--ease), background .4s;
}
.film-play svg { width: 38%; height: 38%; margin-left: 6%; }
.film-card:hover .film-play { transform: translate(-50%, -50%) scale(1.1); background: rgba(16,16,20,.62); }

/* ============ 关于 · 版权页 ============ */
.about .wrap {
  padding-top: clamp(72px, 10vw, 130px); padding-bottom: clamp(72px, 10vw, 130px);
  display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(28px, 5vw, 90px);
}
.about-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 4.6vw, 58px); letter-spacing: .3em; margin-top: 10px;
}
.about-seal {
  margin-top: 30px; width: 52px; height: 52px; background: var(--cinnabar);
  color: var(--paper); font-family: var(--mono);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; letter-spacing: .1em; border-radius: 6px;
}
.about-body p { color: var(--dim); font-size: 15.5px; }
.about-body p + p { margin-top: 14px; }
/* 求职定位句 */
.about-intro {
  margin-bottom: 22px;
  padding: 14px 18px;
  border: 1px solid var(--line); border-left: 3px solid var(--cinnabar);
  background: rgba(232, 228, 220, .035);
}
.about-intro b {
  display: block; margin-bottom: 6px;
  font-family: var(--serif); font-weight: 700;
  font-size: 17px; letter-spacing: .14em; color: var(--paper);
}
.about-intro span { font-size: 14px; line-height: 1.85; color: var(--dim); }
.about-specs {
  margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px;
  font-size: 12.5px;
}
.about-specs div { display: flex; gap: 14px; }
.about-specs dt { color: var(--faint); white-space: nowrap; }
.about-specs dd { color: var(--dim); }
.about-mail { margin-top: 26px; font-size: 15px !important; letter-spacing: .04em; }
.about-mail a { color: var(--paper); border-bottom: 1px solid rgba(232,228,220,.3); transition: border-color .25s; }
.about-mail a:hover { border-color: var(--cinnabar); }
.contact-sep { margin: 0 12px; color: var(--faint); }
#contactWechat { color: var(--dim); }

/* ============ 页脚 ============ */
.footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 22px;
  border-top: 1px solid var(--line);
  padding: 24px clamp(20px, 4vw, 52px);
  font-size: 11.5px; color: var(--dim);
}
.footer-dim { color: var(--faint); }

/* ============ 灯箱 · 取景器 ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 10, 13, .97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-stage {
  max-width: min(92vw, 1500px); max-height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  padding: 22px 0 16px;
}
.lb-frame { position: relative; }
#lbImg, #lbVideo {
  max-width: 100%; max-height: calc(100svh - 150px);
  width: auto; height: auto; object-fit: contain;
  border-radius: 2px;
  animation: lbIn .45s var(--ease);
}
@keyframes lbIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
.lb-corner {
  position: absolute; z-index: 3; width: 30px; height: 30px; pointer-events: none;
  border: 0 solid var(--paper); opacity: .92;
}
.c1 { top: -7px; left: -7px; border-top-width: 2px; border-left-width: 2px; }
.c2 { top: -7px; right: -7px; border-top-width: 2px; border-right-width: 2px; }
.c3 { bottom: -7px; left: -7px; border-bottom-width: 2px; border-left-width: 2px; }
.c4 { bottom: -7px; right: -7px; border-bottom-width: 2px; border-right-width: 2px; }
.lb-caption { width: 100%; padding: 18px 4px 0; }
.lb-line1 { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.lb-line1-r { display: flex; align-items: baseline; gap: 18px; }
.lb-title { font-family: var(--serif); font-size: 19px; letter-spacing: .24em; color: var(--paper); }
.lb-count { font-size: 12px; color: var(--cinnabar); }
/* 调色对比(灯箱内直线滑块) */
.lb-cmp-btn {
  font-size: 12px; color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px;
  transition: color .25s, border-color .25s, background .25s;
}
.lb-cmp-btn:hover { color: var(--paper); border-color: rgba(232,228,220,.35); }
.lb-cmp-btn.on { color: var(--paper); background: var(--cinnabar); border-color: var(--cinnabar); }
.lb-compare {
  position: absolute; inset: 0; z-index: 2;
  cursor: ew-resize; touch-action: none;
  --pos: 50%;
}
#lbOrig {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  pointer-events: none;
}
.lb-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 2px; margin-left: -1px;
  background: rgba(232,228,220,.95);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0,0,0,.5);
}
.lb-grip {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--cinnabar); border: 2px solid var(--paper);
  box-shadow: 0 2px 14px rgba(0,0,0,.5);
  background-image:
    linear-gradient(90deg, transparent 45%, var(--paper) 45%, var(--paper) 55%, transparent 55%),
    linear-gradient(90deg, transparent 30%, var(--paper) 30%, var(--paper) 40%, transparent 40%),
    linear-gradient(90deg, transparent 60%, var(--paper) 60%, var(--paper) 70%, transparent 70%);
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}
.lb-tag {
  position: absolute; bottom: 12px;
  font-size: 11px; padding: 4px 12px;
  border-radius: 999px;
  background: rgba(10,10,13,.6); color: var(--paper);
  border: 1px solid rgba(232,228,220,.25);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.tag-o { left: 12px; }
.tag-e { right: 12px; }

/* ============ 全站原片/成片圆形遮罩切换(布局不变) ============ */
/* 一个以按钮为圆心的全局圆波扫过全页:圆内原片、圆外成片;波前圆环可见 */
.ph-wrap { position: relative; }
.plate .ph-orig, .chapter-bg .ph-orig {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
}
body.orig-mode .plate .ph-orig,
body.orig-mode .chapter-bg .ph-orig { opacity: 1; }
/* 返回成片:成片层提升做圆形扩散(圆内成片、圆外原片) */
body.rev-mode .plate .ph-edit,
body.rev-mode .chapter-bg .ph-edit { position: relative; z-index: 3; }
/* 切换动画期间,章头文字永远在图片层之上 */
body.orig-mode .chapter-name,
body.orig-mode .chapter-meta,
body.rev-mode .chapter-name,
body.rev-mode .chapter-meta { z-index: 5; }
/* 两个方向都保证渐变遮罩在图片层之上、文字之下:
   orig-mode 时原片层(z1)会盖住默认(auto)的遮罩,导致切换后章头渐变消失 */
body.orig-mode .chapter-head::after,
body.rev-mode .chapter-head::after { z-index: 4; }
.chapter-bg .ph-orig { z-index: 1; }
.reveal-wave {
  position: fixed; z-index: 129;
  border-radius: 50%;
  border: 2px solid rgba(200, 69, 44, .95);
  box-shadow:
    0 0 46px rgba(200, 69, 44, .4),
    inset 0 0 60px rgba(200, 69, 44, .18);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}
.lb-exif {
  margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-size: 12px; color: var(--dim);
}
.lb-exif span { white-space: nowrap; }
.lb-close, .lb-arrow {
  position: fixed; z-index: 101;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--dim); border: 1px solid transparent;
  transition: color .25s, border-color .25s, background .25s;
}
.lb-close:hover, .lb-arrow:hover { color: var(--paper); border-color: var(--line); background: rgba(232,228,220,.05); }
.lb-close svg, .lb-arrow svg { width: 22px; height: 22px; }
.lb-close { top: 22px; right: 26px; }
.lb-prev { left: clamp(10px, 2.4vw, 34px); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(10px, 2.4vw, 34px); top: 50%; transform: translateY(-50%); }

/* ============ 响应式 ============ */
@media (max-width: 820px) {
  /* 章节目录:移动端底部常驻横排(允许换行居中,避免文字被压缩堆叠) */
  .toc {
    display: flex; flex-wrap: wrap; justify-content: center;
    left: 0; right: 0; top: auto; bottom: 0;
    transform: none;
    flex-direction: row; align-items: center;
    column-gap: clamp(4px, 1.6vw, 12px); row-gap: 2px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    opacity: 1 !important; visibility: visible !important;
    max-width: 100vw;
    background: rgba(16, 16, 20, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .toc a {
    writing-mode: horizontal-tb;
    font-size: 12px; letter-spacing: .1em; line-height: 1.3;
    padding: 4px 3px;
    border-right: 0; border-bottom: 2px solid transparent;
  }
  .toc a.cur { border-bottom-color: var(--cinnabar); }
  .toc-cmp {
    writing-mode: horizontal-tb;
    font-size: 12px; letter-spacing: .08em; line-height: 1.3;
    padding: 4px 6px;
    border: 0; border-bottom: 2px solid var(--cinnabar);
    color: var(--paper);
  }
  .toc-cmp .t-full { display: none; }
  .toc-cmp .t-short { display: inline; }
  .toc-cmp.on { border-bottom-color: var(--cinnabar); }
  body { padding-bottom: 60px; }
  .about-grid { grid-template-columns: 1fr; }
  .plate.wide, .plate.wide.alt { grid-column: 1 / 13; }
  .plate.tall { grid-column: 1 / 8; }
  .plate.tall.alt { grid-column: 6 / 13; }
  .plate.tall { margin-top: clamp(20px, 5vh, 48px); }
  .chapter-name { font-size: clamp(72px, 20vw, 130px); top: 6svh; }
}
@media (max-width: 560px) {
  .nav { padding-left: 16px; padding-right: 16px; }
  .nav-logo { font-size: 14px; letter-spacing: .1em; gap: 8px; }
  .nav-logo-cn { display: none; }   /* 小屏收起「摄影集」小字,保证导航单行 */
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 12px; letter-spacing: .06em; white-space: nowrap; }
  .chapter-body { row-gap: 44px; }
  .plate.wide, .plate.wide.alt, .plate.tall, .plate.tall.alt { grid-column: 1 / 13; margin-top: 0; }
  .plate-cap b { font-size: 14px; }
  .cover-seal { width: 46px; height: 46px; font-size: 17px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; } .lb-close { top: 10px; right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cover-bg, .cover-down { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}