/* ============================================================
   水彩 · 拾光 — 作品演示站
   ============================================================ */

:root {
  --paper: #f6f2ea;
  --paper-deep: #efe8db;
  --card: #fffdf8;
  --ink: #23211d;
  --ink-soft: #7a746a;
  --indigo: #3d6b74;
  --cinnabar: #b4472e;
  --line: rgba(35, 33, 29, 0.12);
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

::selection {
  background: rgba(180, 71, 46, 0.22);
}

:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 3px;
}

/* ---------- 顶部导航（仅覆盖首屏） ---------- */
.site-head {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(16px, 2.4vw, 30px) clamp(20px, 4vw, 56px);
  color: #fff;
}

.brand {
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 22px);
  letter-spacing: 0.08em;
}

.brand span {
  margin: 0 0.18em;
  opacity: 0.7;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.site-nav a {
  opacity: 0.82;
  transition: opacity 0.3s var(--ease);
}

.site-nav a:hover {
  opacity: 1;
}

.site-nav__count {
  font-size: 10px;
  letter-spacing: 0.24em;
  opacity: 0.55;
}

/* ---------- 通用对比组件 ---------- */
.compare {
  position: relative;
  overflow: hidden;
  background: #17150f;
}

.compare__base,
.compare__top {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.compare__top {
  clip-path: inset(0 calc(100% - var(--pos, 50) * 1%) 0 0);
  will-change: clip-path;
}

.compare__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--pos, 50) * 1%);
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.45);
  transform: translateX(-1px);
  z-index: 3;
  transition: opacity 0.25s;
}

.compare__handle {
  position: absolute;
  top: 50%;
  left: calc(var(--pos, 50) * 1%);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.compare__tags {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.18em;
  pointer-events: none;
}

.compare__tags span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.compare__range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: none;
  -webkit-appearance: none;
  appearance: none;
}

.compare__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 64px;
  height: 100%;
}

.compare__range::-moz-range-thumb {
  width: 64px;
  height: 100%;
  border: 0;
}

.compare.is-plain .compare__line,
.compare.is-plain .compare__handle {
  opacity: 0;
}

.compare__hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 0.4s;
}

.compare__hint.is-hidden {
  opacity: 0;
}

/* ---------- 1. 首屏 ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: #17150f;
  color: #fff;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media .compare__top {
  transition: clip-path 0.12s linear;
}

.hero .compare__line {
  width: 1px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(15, 14, 12, 0.78) 0%, rgba(15, 14, 12, 0.42) 38%, rgba(15, 14, 12, 0.1) 62%, rgba(15, 14, 12, 0.42) 100%),
    radial-gradient(130% 95% at 40% 20%, transparent 42%, rgba(15, 14, 12, 0.55) 100%);
  pointer-events: none;
}

.hero__content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: clamp(24px, 6vw, 96px);
  max-width: min(880px, 82vw);
  transform: translateY(-52%);
}

.hero__eyebrow {
  margin: 0 0 clamp(14px, 2.4vh, 26px);
  font-size: clamp(9px, 0.78vw, 11px);
  letter-spacing: 0.34em;
  color: rgba(255, 255, 255, 0.68);
}

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 13.5vw, 10.5rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: 0.015em;
  text-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.hero__title span {
  margin: 0 0.06em;
  font-size: 0.52em;
  vertical-align: 0.3em;
  opacity: 0.72;
}

.hero__sub {
  margin: clamp(18px, 3vh, 30px) 0 0;
  font-size: clamp(15px, 1.45vw, 21px);
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.9);
}

.hero__meta {
  margin: 8px 0 0;
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.58);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  margin-top: clamp(26px, 4.4vh, 44px);
  padding: 13px 26px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.2em;
  background: rgba(22, 20, 17, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s;
}

.btn:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.hero__labels {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  bottom: clamp(22px, 4vh, 42px);
  z-index: 2;
  display: flex;
  gap: 22px;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.62);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3vh, 30px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  letter-spacing: 0.24em;
  white-space: nowrap;
}

.hero__scroll i {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(rgba(255, 255, 255, 0.7), transparent);
  animation: scroll-pulse 2.4s var(--ease) infinite;
}

@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(0.5); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

/* ---------- 2. 滚动剧场 ---------- */
.theatre {
  position: relative;
  height: 260svh;
  background: var(--paper);
}

.theatre__stage {
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  height: 100svh;
  overflow: hidden;
  padding: clamp(16px, 3vw, 48px);
}

.theatre__frame {
  width: min(1180px, 92vw);
  aspect-ratio: 3 / 2;
  box-shadow: 0 40px 120px -40px rgba(35, 33, 29, 0.45);
}

.theatre__frame .compare__top {
  transition: clip-path 0.08s linear;
}

.theatre__frame::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 42%;
  background: linear-gradient(transparent, rgba(15, 14, 12, 0.66));
  content: "";
  pointer-events: none;
}

.theatre__labels {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.2em;
  pointer-events: none;
}

.theatre__labels span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.4);
}

.theatre__copy {
  position: absolute;
  left: clamp(14px, 2.4vw, 40px);
  bottom: clamp(14px, 3.6vh, 34px);
  z-index: 5;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.theatre__rail {
  position: absolute;
  top: 50%;
  right: 14px;
  z-index: 4;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  letter-spacing: 0.36em;
  writing-mode: vertical-rl;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
  transform: translateY(-50%);
  pointer-events: none;
}

.theatre__steps {
  display: flex;
  gap: clamp(18px, 3vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.theatre__steps li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  opacity: 0.48;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.theatre__steps li.is-active {
  opacity: 1;
  transform: translateY(-2px);
}

.theatre__steps b {
  font-family: var(--serif);
  font-size: clamp(22px, 2.8vw, 38px);
  font-weight: 600;
}

.theatre__steps span {
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: 0.14em;
}

/* ---------- 3. 画廊 ---------- */
.gallery {
  position: relative;
  padding: clamp(64px, 11vh, 132px) clamp(18px, 5vw, 72px) clamp(72px, 12vh, 140px);
  background:
    radial-gradient(60% 40% at 12% 4%, rgba(61, 107, 116, 0.07), transparent 70%),
    radial-gradient(50% 36% at 92% 22%, rgba(180, 71, 46, 0.06), transparent 70%),
    var(--paper);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: clamp(20px, 4vw, 64px);
  padding-bottom: clamp(24px, 4vh, 44px);
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 10px;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

.lede {
  margin: 0 0 6px;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.9;
  color: var(--ink-soft);
}

.filters {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  margin: 0 calc(clamp(18px, 5vw, 72px) * -1) 12px;
  padding: 14px clamp(18px, 5vw, 72px);
  overflow-x: auto;
  background: rgba(246, 242, 234, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(35, 33, 29, 0.07);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.filter em {
  font-style: normal;
  font-size: 10px;
  opacity: 0.6;
}

.filter:hover {
  color: var(--ink);
}

.filter.is-active {
  border-color: rgba(35, 33, 29, 0.16);
  background: linear-gradient(120deg, rgba(61, 107, 116, 0.16), rgba(180, 71, 46, 0.13));
  color: var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 8px;
  grid-auto-flow: dense;
  column-gap: clamp(16px, 2vw, 28px);
  row-gap: 24px;
  margin-top: clamp(18px, 3vh, 32px);
}

.card {
  grid-column: span 4;
  align-self: start;
  min-width: 0;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.card.is-in {
  opacity: 1;
  transform: none;
}

.card--feature {
  grid-column: span 8;
}

.card[hidden] {
  display: none !important;
}

.card__link {
  display: block;
}

.card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 1.5);
  background: #e6dfd2;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(35, 33, 29, 0.08), 0 18px 44px -28px rgba(35, 33, 29, 0.4);
}

.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.55s var(--ease), transform 0.9s var(--ease);
}

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(20, 18, 14, 0.24));
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.card__img--o {
  opacity: 0;
}

.card__tag,
.card__hint {
  position: absolute;
  z-index: 2;
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.16em;
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}

.card__tag {
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card__hint {
  left: 14px;
  bottom: 12px;
  transform: translateY(6px);
}

.card__meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 12px 2px 0;
}

.card__seq {
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--ink-soft);
}

.card__title {
  margin: 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(14px, 1.35vw, 17px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__title::after {
  display: block;
  width: 0;
  height: 1px;
  margin-top: 4px;
  background: var(--ink);
  content: "";
  transition: width 0.4s var(--ease);
}

.card__model {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.card__model::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--indigo);
  content: "";
}

.card__model[data-model*="flare"]::before {
  background: var(--cinnabar);
}

.card__cat {
  display: none;
}

.card--feature .card__title {
  font-size: clamp(17px, 1.8vw, 22px);
}

@media (hover: hover) {
  .card:hover .card__img {
    transform: scale(1.035);
  }

  .card:hover .card__img--o {
    opacity: 1;
  }

  .card:hover .card__media::after {
    opacity: 1;
  }

  .card:hover .card__media {
    box-shadow: 0 2px 0 rgba(35, 33, 29, 0.1), 0 32px 60px -30px rgba(35, 33, 29, 0.5);
  }

  .card:hover .card__tag,
  .card:hover .card__hint {
    opacity: 1;
  }

  .card:hover .card__hint {
    transform: none;
  }

  .card:hover .card__title::after {
    width: 26px;
  }
}

/* ---------- 4. 制作说明 ---------- */
.process {
  position: relative;
  padding: clamp(72px, 14vh, 160px) clamp(20px, 6vw, 96px);
  overflow: hidden;
  background:
    radial-gradient(55% 60% at 18% 20%, rgba(61, 107, 116, 0.12), transparent 68%),
    radial-gradient(45% 50% at 88% 78%, rgba(180, 71, 46, 0.1), transparent 70%),
    var(--paper-deep);
  border-top: 1px solid rgba(35, 33, 29, 0.08);
}

.process__inner {
  max-width: 1240px;
  margin: 0 auto;
}

.process__count {
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 2vw, 24px);
}

.process__count span {
  font-family: var(--serif);
  font-size: clamp(6rem, 22vw, 18rem);
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.03em;
}

.process__count em {
  font-style: normal;
  font-size: clamp(13px, 1.4vw, 18px);
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.process__quote {
  margin: clamp(18px, 3vh, 32px) 0 clamp(40px, 7vh, 72px);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.2vw, 2.6rem);
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.process__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: clamp(20px, 4vh, 36px);
}

.process__steps li {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.process__steps b {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cinnabar);
}

.process__steps span {
  font-size: clamp(13px, 1.15vw, 15px);
  line-height: 1.8;
  color: var(--ink-soft);
}

.process__tech {
  margin: clamp(30px, 6vh, 56px) 0 0;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(20px, 5vw, 72px) calc(26px + env(safe-area-inset-bottom));
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* ---------- 5. 全屏对比灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: rgba(16, 15, 13, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease), visibility 0.28s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 5svh clamp(12px, 3vw, 40px);
}

.lightbox__frame {
  width: min(76vw, calc(88svh * var(--ratio, 1.5)));
  aspect-ratio: var(--ratio, 1.5);
  max-height: 88svh;
  border-radius: 2px;
  box-shadow: 0 40px 140px -30px rgba(0, 0, 0, 0.75);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.36s var(--ease), opacity 0.36s var(--ease);
}

.lightbox.is-open .lightbox__frame {
  transform: none;
  opacity: 1;
}

.lightbox__frame .compare__top {
  transition: clip-path 0.06s linear;
}

.lightbox__frame.is-auto .compare__top {
  transition: clip-path 0.4s linear;
}

.lightbox__modes {
  position: absolute;
  top: clamp(12px, 2.5vh, 24px);
  left: 50%;
  z-index: 6;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.lightbox__modes button {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
}

.lightbox__modes button.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(20, 18, 14, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 17px;
  transition: background 0.25s;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lightbox__nav--prev {
  left: clamp(8px, 1.6vw, 22px);
}

.lightbox__nav--next {
  right: clamp(8px, 1.6vw, 22px);
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(20, 18, 14, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 14px;
  transition: background 0.25s;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lightbox__tools {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 8;
  display: flex;
  gap: 8px;
}

.lightbox__tool {
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.58);
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  letter-spacing: 0.12em;
  transition: background 0.25s, color 0.25s;
}

.lightbox__tool:hover,
.lightbox__tool[aria-expanded="true"],
.lightbox__tool[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.lightbox__panel {
  position: absolute;
  top: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  width: min(380px, 86vw);
  min-height: 0;
  padding: clamp(20px, 2.4vw, 30px);
  overflow-y: auto;
  border-radius: 4px;
  background: rgba(246, 242, 234, 0.97);
  color: var(--ink);
  box-shadow: 0 30px 90px -24px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateX(calc(100% + 32px));
  transition: transform 0.36s var(--ease), opacity 0.3s var(--ease), visibility 0.36s;
}

.lightbox.is-info .lightbox__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.lightbox__panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(35, 33, 29, 0.12);
  border-radius: 50%;
  background: rgba(35, 33, 29, 0.08);
  color: var(--ink);
  font-size: 11px;
  transition: background 0.25s, color 0.25s;
}

.lightbox__panel-close:hover {
  background: rgba(35, 33, 29, 0.12);
  color: var(--ink);
}

/* 灯箱全屏放大 */
.lightbox.is-full .lightbox__stage {
  padding: 0;
}

.lightbox.is-full .lightbox__frame {
  width: 100vw;
  height: 100svh;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}

/* 全屏时两图同样铺满，避免不同比例导致的高低错位 */
.lightbox.is-full .compare__base,
.lightbox.is-full .compare__top {
  object-fit: cover;
}

/* 移动端全屏：左右滑动切换提示 */
.lightbox__swipe {
  position: absolute;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 7;
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
}

.lightbox__swipe i {
  font-style: normal;
  font-size: 13px;
  line-height: 1;
  opacity: 0.5;
  animation: swipe-nudge 1.6s var(--ease) infinite;
}

.lightbox__swipe i:last-child {
  animation-direction: reverse;
}

@keyframes swipe-nudge {
  0%, 100% { transform: translateX(0); opacity: 0.4; }
  50% { transform: translateX(4px); opacity: 1; }
}

@keyframes swipe-in {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 触屏 / 移动端全屏时显示滑动切换提示（首次滑动或退出全屏后隐藏） */
@media (max-width: 1099px), (pointer: coarse) {
  .lightbox.is-full .lightbox__swipe {
    display: inline-flex;
    animation: swipe-in 0.5s var(--ease) forwards;
  }

  .lightbox.is-full .lightbox__swipe.is-hidden {
    display: none;
  }
}

/* 并置模式下滑动用于平移画面，不显示切换提示 */
.lightbox.is-diptych .lightbox__swipe {
  display: none;
}

/* ---------- 5.1 双联巨幕（并置） ---------- */
.lightbox__ambient {
  position: absolute;
  inset: -8%;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(72px) saturate(1.08) brightness(0.32);
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}

.lightbox.is-diptych .lightbox__ambient {
  opacity: 0.9;
}

.lightbox.is-diptych .lightbox__frame {
  display: none;
}

.lightbox.is-diptych .lightbox__stage {
  padding: 0;
}

.lightbox.is-diptych #lbFull {
  display: none;
}

.diptych {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.lightbox.is-diptych .diptych {
  display: grid;
}

.diptych__pane {
  position: relative;
  min-width: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.diptych__pane.is-dragging {
  cursor: grabbing;
}

.diptych__pane img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: none;
  max-height: none;
  object-fit: cover;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}

.lightbox.is-open .diptych__pane img {
  opacity: 1;
}

.diptych.is-turn .diptych__pane img {
  animation: dipTurn 0.5s var(--ease);
}

@keyframes dipTurn {
  from {
    opacity: 0.25;
    filter: blur(6px);
  }

  to {
    opacity: 1;
    filter: none;
  }
}

.diptych__tag {
  position: absolute;
  top: calc(72px + env(safe-area-inset-top));
  z-index: 4;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(15, 14, 12, 0.5);
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  letter-spacing: 0.18em;
  pointer-events: none;
}

.diptych__pane--original .diptych__tag {
  left: 20px;
}

.diptych__pane--watercolor .diptych__tag {
  right: 20px;
}

.diptych__seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 3;
  width: 1px;
  background: rgba(246, 242, 234, 0.62);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.22);
  transform: scaleY(0);
  transition: transform 0.7s var(--ease) 0.12s;
  pointer-events: none;
}

.lightbox.is-open .diptych__seam {
  transform: scaleY(1);
}

.diptych__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  gap: clamp(14px, 2vw, 28px);
  padding: clamp(56px, 12vh, 110px) clamp(20px, 3vw, 40px) calc(26px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(10, 9, 8, 0.78) 62%);
  pointer-events: none;
}

.diptych__id {
  flex: 1 1 auto;
  min-width: 0;
}

.diptych__seq {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.55);
}

.diptych__title {
  margin: 0 0 8px;
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: #f6f2ea;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diptych__meta {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
}

.diptych__hint {
  margin: 0 0 4px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
}

.diptych__zoom {
  margin-bottom: 2px;
  padding: 4px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.diptych__rail {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.diptych__rail span {
  display: block;
  width: 0;
  height: 100%;
  background: rgba(246, 242, 234, 0.85);
  transition: width 0.5s var(--ease);
}

.diptych__loupe {
  position: absolute;
  z-index: 6;
  width: clamp(170px, 18vw, 230px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1.5px solid rgba(246, 242, 234, 0.85);
  border-radius: 50%;
  background: #111;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%);
  transition: opacity 0.18s var(--ease), visibility 0.18s;
  pointer-events: none;
}

.diptych__loupe.is-on {
  opacity: 1;
  visibility: visible;
}

.diptych__loupe-layer {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}

#lbLoupeOrig {
  clip-path: inset(0 50% 0 0);
}

#lbLoupePaint {
  clip-path: inset(0 0 0 50%);
}

.diptych__loupe-cross {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(246, 242, 234, 0.55);
}

.diptych__loupe-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 14, 12, 0.55);
  color: rgba(255, 255, 255, 0.8);
  font-size: 9px;
  letter-spacing: 0.16em;
  transform: translateX(-50%);
}

.lightbox__seq {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
}

.lightbox__title {
  margin: 4px 0 12px;
  padding-right: 30px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.03em;
}

.lightbox__meta {
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.lightbox__meta b {
  font-weight: 500;
  color: var(--ink);
}

.prompt {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.prompt summary {
  padding: 14px 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.prompt summary::-webkit-details-marker {
  display: none;
}

.prompt summary::after {
  float: right;
  color: var(--ink-soft);
  content: "+";
  transition: transform 0.25s;
}

.prompt[open] summary::after {
  content: "−";
}

.prompt__body {
  position: relative;
  padding: 0 0 16px;
}

.prompt__copy {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.prompt__copy:hover {
  color: var(--ink);
  border-color: rgba(35, 33, 29, 0.3);
}

.prompt pre {
  max-height: 34svh;
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  border-radius: 3px;
  background: rgba(35, 33, 29, 0.045);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.75;
  color: #4a463f;
  white-space: pre-wrap;
  word-break: break-word;
}

.lightbox__tips {
  margin-top: 18px;
  font-size: 11px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.lightbox__tips p {
  margin: 0;
}

.lightbox__tips b {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1099px) {
  .grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .card {
    grid-column: span 4;
  }

  .card--feature {
    grid-column: span 8;
  }

  .diptych__hint {
    display: none;
  }
}

@media (max-width: 899px), (max-height: 599px) {
  .lightbox__modes .only-wide {
    display: none;
  }
}

@media (max-width: 899px) {
  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
  }

  .lightbox {
    grid-template-rows: minmax(0, 1fr);
  }

  .lightbox__stage {
    padding: calc(52px + env(safe-area-inset-top)) 12px 72px;
  }

  .lightbox__frame {
    width: min(92vw, calc(66svh * var(--ratio, 1.5)));
    max-height: 66svh;
  }

  .lightbox__modes {
    top: calc(8px + env(safe-area-inset-top));
  }

  .lightbox__modes button {
    padding: 6px 13px;
    font-size: 11px;
  }

  .lightbox__tools {
    top: auto;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    transition: opacity 0.25s, visibility 0.25s;
  }

  .lightbox.is-info .lightbox__tools {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .lightbox__tool {
    padding: 8px 18px;
    font-size: 11px;
  }

  .lightbox.is-full .compare__tags {
    top: calc(62px + env(safe-area-inset-top));
  }

  .lightbox.is-full .compare__hint {
    display: none;
  }

  .lightbox__panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 0;
    width: auto;
    max-height: 76svh;
    margin: 0;
    padding: 20px 20px calc(22px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    transform: translateY(calc(100% + 24px));
  }

  .lightbox__seq {
    display: none;
  }

  .lightbox__title {
    margin-top: 0;
    font-size: 22px;
  }

  .lightbox__meta {
    margin-bottom: 12px;
  }

  .prompt pre {
    max-height: 22svh;
  }

  .lightbox__nav {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }

  .lightbox__close {
    top: calc(10px + env(safe-area-inset-top));
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .theatre__copy {
    left: 20px;
    bottom: 22px;
  }

  .theatre__steps li span {
    display: none;
  }

  .process__steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .site-nav a {
    display: none;
  }

  .hero {
    min-height: 540px;
  }

  .hero__content {
    left: 20px;
    max-width: calc(100vw - 40px);
  }

  .hero__title {
    font-size: clamp(2.8rem, 17.5vw, 6rem);
    white-space: nowrap;
  }

  .hero__labels {
    right: 20px;
    bottom: 84px;
    gap: 14px;
  }

  .hero__scroll {
    display: none;
  }

  .btn {
    width: 100%;
    margin-top: 26px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 20px;
  }

  .card {
    grid-column: span 1;
  }

  .card--feature {
    grid-column: span 2;
  }

  .card__meta {
    gap: 6px;
    padding-top: 9px;
  }

  .card__model {
    display: none;
  }

  .card__title {
    font-size: 13px;
  }

  .card--feature .card__title {
    font-size: 16px;
  }

  .card__media {
    border-radius: 2px;
  }

  .filters {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .theatre {
    height: 200svh;
  }

  .theatre__stage {
    padding: 0;
    background: #17150f;
  }

  .theatre__frame {
    width: 100vw;
    height: 100svh;
    aspect-ratio: auto;
    box-shadow: none;
  }

  .theatre__frame::after {
    height: 46%;
    background: linear-gradient(transparent, rgba(12, 11, 9, 0.9));
  }

  .theatre__labels {
    top: calc(16px + env(safe-area-inset-top));
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
  }

  .theatre__copy {
    bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .theatre__steps {
    gap: 14px;
  }

  .theatre__steps li {
    gap: 6px;
  }

  .theatre__steps b {
    font-size: 20px;
  }

  .theatre__steps li span {
    display: inline;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .theatre__kicker {
    display: none;
  }

  .process__count span {
    font-size: clamp(5rem, 30vw, 9rem);
  }

  .site-foot {
    font-size: 10px;
  }
}

@media (max-width: 479px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .card,
  .card--feature {
    grid-column: span 1;
  }

  .card--feature .card__title {
    font-size: 17px;
  }

  .hero__sub {
    font-size: 14px;
  }

  .hero__meta {
    font-size: 10px;
  }

  .section-head h2 {
    font-size: 3rem;
  }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .card {
    opacity: 1;
    transform: none;
  }
}
