/* ==========================================================================
   给最爱的你 —— 样式表
   配色：奶油白 / 浅米 / 淡粉 / 暖褐文字，全部低饱和
   ========================================================================== */

/* ---------- 0. 变量与重置 ---------- */
:root {
  --cream:      #FBF7F1;
  --cream-deep: #F8F1E8;
  --sand:       #EFE4D7;
  --blush:      #F3DBD2;
  --rose:       #C89A8D;
  --rose-deep:  #A97C6F;
  --ink:        #3B332D;
  --ink-soft:   #7C7168;
  --ink-faint:  #A99C92;
  --paper:      #FFFDF9;

  --card-w: 280px;

  --ease:      cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.22, .61, .36, 1);

  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
                "SimSun", Georgia, "Times New Roman", serif;
  --font-sans:  "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow: hidden;                 /* 首页未进入前锁定滚动 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-entered { overflow-x: hidden; overflow-y: auto; }
body.is-locked  { overflow: hidden; }

img { max-width: 100%; }

button { font: inherit; color: inherit; }

h1, h2, p, figure { margin: 0; }

::selection { background: rgba(200, 154, 141, .28); color: var(--ink); }

/* ---------- 1. 全站颗粒质感 ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ==========================================================================
   2. 首页
   ========================================================================== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(88% 68% at 22% 16%, #FBEBE2 0%, rgba(251, 235, 226, 0) 62%),
    radial-gradient(78% 60% at 84% 78%, #F6EADB 0%, rgba(246, 234, 219, 0) 60%),
    linear-gradient(180deg, #FDF9F3 0%, #F9F2E9 52%, #F5EDE3 100%);
  transition: opacity 1.15s var(--ease), visibility 1.15s;
}

.intro.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro__aura {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(105px);
  will-change: transform;
}

.aura--1 {
  width: 56vw; height: 56vw; max-width: 700px; max-height: 700px;
  background: #F6D2C3; opacity: .52;
  top: -20%; left: -14%;
  animation: drift-a 22s ease-in-out infinite;
}

.aura--2 {
  width: 46vw; height: 46vw; max-width: 560px; max-height: 560px;
  background: #EBDCC4; opacity: .55;
  bottom: -16%; right: -7%;
  animation: drift-b 27s ease-in-out infinite;
}

.aura--3 {
  width: 32vw; height: 32vw; max-width: 400px; max-height: 400px;
  background: #F5DFD1; opacity: .44;
  top: 30%; right: 14%;
  animation: drift-c 31s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(4%, 5%, 0) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.04); }
  50%      { transform: translate3d(-5%, -4%, 0) scale(1); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-3%, 6%, 0) scale(1.1); }
}

/* 光点 */
.intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(56% 46% at 50% 46%,
    rgba(255, 253, 250, .84) 0%,
    rgba(255, 253, 250, .34) 46%,
    rgba(255, 253, 250, 0) 72%);
}

.intro__sparks { position: absolute; inset: 0; z-index: 2; overflow: hidden; }

.spark {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 255, 255, .95) 0%,
    rgba(255, 243, 234, .55) 42%,
    rgba(255, 243, 234, 0) 72%);
  animation-name: float-up;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

@keyframes float-up {
  0%   { transform: translate3d(0, 0, 0) scale(.65); opacity: 0; }
  14%  { opacity: .85; }
  68%  { opacity: .45; }
  100% { transform: translate3d(var(--dx, 12px), -70vh, 0) scale(1.1); opacity: 0; }
}

.intro__inner {
  position: relative;
  z-index: 3;
  width: min(86vw, 640px);
  text-align: center;
  padding: 0 8px;
  transition: transform 1.2s var(--ease);
  will-change: transform;
}

.intro.is-out .intro__inner { transform: scale(1.035); }

.intro__eyebrow {
  font-size: 11px;
  letter-spacing: .44em;
  text-indent: .44em;
  color: var(--rose-deep);
  opacity: .85;
  animation: rise .95s var(--ease) .1s both;
}

.intro__title {
  margin-top: 26px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(41px, 8.6vw, 80px);
  line-height: 1.34;
  letter-spacing: .1em;
  text-indent: .1em;
  color: var(--ink);
  animation: rise 1.25s var(--ease) .26s both;
}

.intro__rule {
  width: clamp(56px, 9vw, 92px);
  height: 1px;
  margin: 30px auto 26px;
  background: linear-gradient(90deg,
    rgba(169, 124, 111, 0) 0%,
    rgba(169, 124, 111, .55) 50%,
    rgba(169, 124, 111, 0) 100%);
  transform-origin: center;
  animation: rule-grow 1.3s var(--ease) .58s both;
}

.intro__sub {
  font-size: clamp(13px, 1.5vw, 15px);
  line-height: 2.1;
  letter-spacing: .09em;
  color: var(--ink-soft);
  animation: rise 1.05s var(--ease) .7s both;
}

/* 进入按钮 */
.enter {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(38px, 6vh, 58px);
  padding: 13px 15px 13px 30px;
  border-radius: 999px;
  border: 1px solid rgba(169, 124, 111, .3);
  background: rgba(255, 253, 249, .68);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 13.5px;
  letter-spacing: .2em;
  text-indent: .2em;
  cursor: pointer;
  transition: background .55s var(--ease), color .55s var(--ease),
              border-color .55s var(--ease), transform .45s var(--ease),
              box-shadow .55s var(--ease);
  box-shadow: 0 1px 2px rgba(59, 51, 45, .04), 0 14px 32px -24px rgba(59, 51, 45, .5);
  animation: rise 1.05s var(--ease) .92s both;
}

.enter:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #FBF3EA;
  transform: translateY(-2px);
  box-shadow: 0 22px 42px -24px rgba(59, 51, 45, .6);
}

.enter:active { transform: translateY(0) scale(.985); }

.enter__arrow {
  display: grid;
  place-items: center;
  width: 29px; height: 29px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: .5;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.enter__arrow svg { width: 15px; height: 15px; }

.enter:hover .enter__arrow { opacity: .95; transform: translateX(3px); }

.intro__foot {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(22px, 4vh, 40px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 58px);
  font-size: 10px;
  letter-spacing: .34em;
  color: var(--ink-faint);
  animation: rise 1.1s var(--ease) 1.25s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes rule-grow {
  from { opacity: 0; transform: scaleX(.1); }
  to   { opacity: 1; transform: scaleX(1); }
}

/* ==========================================================================
   3. 照片墙 —— 顶部
   ========================================================================== */
.wall {
  position: relative;
  min-height: 100dvh;
  opacity: 0;
  transition: opacity 1s var(--ease) .15s;
  background:
    radial-gradient(88% 56% at 8% 0%, #FDFAF5 0%, rgba(253, 250, 245, 0) 56%),
    radial-gradient(76% 48% at 94% 10%, rgba(248, 236, 228, .9) 0%, rgba(248, 236, 228, 0) 60%),
    linear-gradient(180deg, #FBF7F1 0%, #F8F1E8 48%, #F5EDE3 100%);
}

.wall.is-on { opacity: 1; }

.wall__head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 15px clamp(18px, 4vw, 52px);
  background: rgba(251, 247, 241, .8);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
  border-bottom: 1px solid rgba(176, 154, 140, .16);
}

.wall__mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
}

.wall__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 3px rgba(200, 154, 141, .14);
  animation: pulse-dot 3.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: .85; }
  50%      { transform: scale(1.28); opacity: 1; }
}

.wall__marktext {
  font-family: var(--font-serif);
  font-size: 13.5px;
  letter-spacing: .2em;
  color: var(--ink);
}

.wall__hint {
  justify-self: end;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ink-faint);
  white-space: nowrap;
  transition: opacity .4s ease;
}

/* 模式切换：胶囊分段控件 */
.modes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 253, 249, .75);
  border: 1px solid rgba(176, 154, 140, .22);
  box-shadow: 0 1px 2px rgba(59, 51, 45, .04),
              inset 0 1px 0 rgba(255, 255, 255, .8);
}

.mode {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 17px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: .16em;
  text-indent: .16em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .4s var(--ease), background .5s var(--ease),
              transform .3s var(--ease), box-shadow .5s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.mode:hover { color: var(--ink); }

.mode.is-active {
  background: var(--ink);
  color: #FBF3EA;
  box-shadow: 0 8px 18px -12px rgba(59, 51, 45, .85),
              inset 0 1px 0 rgba(255, 255, 255, .12);
}

.mode:active { transform: scale(.96); }

/* ==========================================================================
   4. 照片墙 —— 舞台与卡片
   ========================================================================== */
.stage {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  transition: height .95s var(--ease);
}

/* 环形模式下的中心柔光 */
.stage__halo {
  position: absolute;
  left: 50%; top: 50%;
  width: min(64%, 520px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.72);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(243, 219, 210, .72) 0%,
    rgba(243, 219, 210, .26) 46%,
    rgba(243, 219, 210, 0) 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s var(--ease), transform 1.3s var(--ease);
}

body[data-mode="ring"] .stage__halo {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 环形中心文字 */
.ring-core {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.92);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s var(--ease) .18s, transform 1.05s var(--ease) .12s;
}

body[data-mode="ring"] .ring-core {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.ring-core__t {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(14px, 1.7vw, 21px);
  letter-spacing: .24em;
  text-indent: .24em;
  color: var(--ink);
  white-space: nowrap;
}

.ring-core__s {
  display: block;
  margin-top: 9px;
  font-size: 8.5px;
  letter-spacing: .4em;
  text-indent: .4em;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* 单张照片 */
.photo {
  position: absolute;
  top: 0; left: 0;
  width: var(--card-w);
  transform-origin: 50% 50%;
  will-change: transform;
  opacity: 0;
  transition: transform 1.05s var(--ease), opacity .75s var(--ease);
  transition-delay: calc(var(--i, 0) * 24ms);
}

body.is-entered .photo { opacity: 1; }

.photo__hit {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.photo__frame {
  display: block;
  position: relative;
  padding: 11px 11px 0;
  border-radius: 2px;
  background: var(--paper);
  box-shadow:
    0 1px 2px rgba(59, 51, 45, .05),
    0 2px 6px -3px rgba(59, 51, 45, .10),
    0 20px 38px -22px rgba(59, 51, 45, .34);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}

body[data-mode="stack"] .photo { cursor: pointer; }

.photo__hit:hover .photo__frame {
  transform: translateY(-7px);
  box-shadow:
    0 1px 2px rgba(59, 51, 45, .05),
    0 3px 8px -4px rgba(59, 51, 45, .12),
    0 32px 56px -26px rgba(59, 51, 45, .42);
}

.photo__hit:active .photo__frame {
  transform: translateY(-3px) scale(.993);
}

.photo__hit:focus-visible {
  outline: none;
}

.photo__hit:focus-visible .photo__frame {
  box-shadow:
    0 0 0 2px rgba(169, 124, 111, .55),
    0 24px 44px -24px rgba(59, 51, 45, .38);
}

.photo__img {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #F1E8DE;
}

.photo__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.3s var(--ease), filter .7s ease;
}

.photo__hit:hover .photo__img img { transform: scale(1.04); }

/* 相纸表面的一层极淡反光 */
.photo__img::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(128deg,
    rgba(255, 255, 255, .26) 0%,
    rgba(255, 255, 255, .06) 34%,
    rgba(255, 255, 255, 0) 58%);
}

.photo__cap {
  display: block;
  padding: 10px 4px 13px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .1em;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .4s ease;
}

.photo__hit:hover .photo__cap { color: var(--ink); }

/* 环形与堆叠模式下照片朝向不同，标题会互相打架，干脆隐去只留相纸白边 */
body[data-mode="ring"] .photo__cap,
body[data-mode="stack"] .photo__cap {
  opacity: 0;
}

.photo__cap { transition: color .4s ease, opacity .5s var(--ease); }

/* ==========================================================================
   5. 底部惊喜
   ========================================================================== */
.surprise {
  position: relative;
  z-index: 2;
  padding: clamp(58px, 10vw, 112px) clamp(20px, 5vw, 40px) clamp(66px, 10vw, 108px);
  text-align: center;
}

.surprise__orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: clamp(26px, 4vw, 38px);
}

.surprise__orn span {
  width: clamp(26px, 8vw, 66px);
  height: 1px;
  background: linear-gradient(90deg, rgba(169, 124, 111, 0), rgba(169, 124, 111, .42));
}

.surprise__orn span:last-child {
  background: linear-gradient(270deg, rgba(169, 124, 111, 0), rgba(169, 124, 111, .42));
}

.surprise__orn i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--rose);
  opacity: .8;
}

.surprise__line {
  max-width: 21em;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: clamp(16px, 2.3vw, 23px);
  line-height: 2.15;
  letter-spacing: .07em;
  color: var(--ink);
}

.gift {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(30px, 5vw, 48px);
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid rgba(169, 124, 111, .34);
  background: rgba(255, 253, 249, .6);
  font-size: 13px;
  letter-spacing: .18em;
  text-indent: .18em;
  color: var(--ink);
  cursor: pointer;
  transition: background .55s var(--ease), color .55s var(--ease),
              border-color .55s var(--ease), transform .45s var(--ease),
              box-shadow .55s var(--ease);
  box-shadow: 0 1px 2px rgba(59, 51, 45, .04);
  -webkit-tap-highlight-color: transparent;
}

.gift:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #FBF3EA;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -20px rgba(59, 51, 45, .6);
}

.gift:active { transform: translateY(0) scale(.985); }

.gift__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
  animation: pulse-dot 2.9s ease-in-out infinite;
}

.surprise__sign {
  margin-top: clamp(30px, 5vw, 44px);
  font-size: 10px;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--ink-faint);
}

/* ==========================================================================
   6. 大图查看
   ========================================================================== */
.lb {
  --lb-pad: clamp(14px, 2.6vw, 30px);
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 40px);
}

.lb[hidden] { display: none; }

.lb__veil {
  position: absolute;
  inset: 0;
  background: rgba(58, 44, 38, .36);
  -webkit-backdrop-filter: blur(22px) saturate(118%);
  backdrop-filter: blur(22px) saturate(118%);
  opacity: 0;
  transition: opacity .55s var(--ease);
}

.lb.is-open .lb__veil { opacity: 1; }

.lb__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(0, 1fr);
  width: min(1120px, 100%);
  border-radius: 5px;
  overflow: hidden;
  background: var(--paper);
  box-shadow:
    0 46px 90px -46px rgba(48, 41, 36, .55),
    0 6px 20px -10px rgba(48, 41, 36, .28);
  opacity: 0;
  transform: translateY(18px) scale(.986);
  transition: opacity .6s var(--ease), transform .72s var(--ease);
}

.lb.is-open .lb__panel { opacity: 1; transform: none; }

.lb__close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(176, 154, 140, .28);
  background: rgba(255, 253, 249, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  cursor: pointer;
  transition: background .4s var(--ease), transform .35s var(--ease),
              border-color .4s var(--ease);
}

.lb__close svg { width: 16px; height: 16px; }

.lb__close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #FBF3EA;
  transform: rotate(90deg);
}

.lb__media {
  position: relative;
  align-self: start;
  height: clamp(320px, 68vh, 660px);
  background:
    radial-gradient(120% 122% at 50% 0%, #FCF6ED 0%, #F1E7DC 72%, #EDE1D4 100%);
}

/* 图片绝对居中并限制在容器内，始终保持原始比例、不裁切 */
.lb__img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: calc(100% - 2 * var(--lb-pad, 30px));
  max-height: calc(100% - 2 * var(--lb-pad, 30px));
  object-fit: contain;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.985);
  transition: opacity .5s ease, transform .8s var(--ease);
  filter: drop-shadow(0 16px 32px rgba(59, 51, 45, .22));
}

.lb__img.is-ready {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.lb__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 253, 249, .74);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(48, 41, 36, .6);
  transition: background .4s var(--ease), transform .45s var(--ease),
              box-shadow .45s var(--ease);
}

.lb__nav svg { width: 19px; height: 19px; }

.lb__nav:hover {
  background: var(--paper);
  box-shadow: 0 14px 30px -16px rgba(48, 41, 36, .65);
}

.lb__nav--prev { left: 12px; transform: translateY(-50%); }
.lb__nav--next { right: 12px; transform: translateY(-50%); }
.lb__nav--prev:hover { transform: translateY(-50%) translateX(-2px) scale(1.05); }
.lb__nav--next:hover { transform: translateY(-50%) translateX(2px) scale(1.05); }
.lb__nav:active { transform: translateY(-50%) scale(.95); }

.lb__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-height: clamp(320px, 68vh, 660px);
  overflow-y: auto;
  padding: clamp(26px, 3.4vw, 46px);
  background: linear-gradient(178deg, #FFFDF9 0%, #FDF8F2 100%);
}

.lb__tag {
  font-size: 10.5px;
  letter-spacing: .28em;
  color: var(--rose-deep);
  margin-bottom: 15px;
}

.lb__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(21px, 2.4vw, 29px);
  line-height: 1.55;
  letter-spacing: .07em;
  color: var(--ink);
  margin-bottom: 18px;
}

.lb__text {
  font-size: 14px;
  line-height: 2.15;
  letter-spacing: .035em;
  color: var(--ink-soft);
}

.lb__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(176, 154, 140, .2);
}

.lb__count {
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.lb__count b { font-weight: 500; color: var(--ink); }

.lb__swipe {
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-faint);
}

.lb__tip-touch { display: none; }

body.is-touch .lb__tip-touch { display: inline; }
body.is-touch .lb__tip-mouse { display: none; }

/* 切换照片时文字依次浮现 */
.lb__info.is-swap .lb__tag   { animation: swap-in .55s var(--ease) 0s both; }
.lb__info.is-swap .lb__title { animation: swap-in .6s var(--ease) .05s both; }
.lb__info.is-swap .lb__text  { animation: swap-in .65s var(--ease) .1s both; }

@keyframes swap-in {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   7. 生日祝福
   ========================================================================== */
.wish {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 40px);
}

.wish[hidden] { display: none; }

.wish__veil {
  position: absolute;
  inset: 0;
  background: rgba(58, 44, 38, .34);
  -webkit-backdrop-filter: blur(20px) saturate(116%);
  backdrop-filter: blur(20px) saturate(116%);
  opacity: 0;
  transition: opacity .55s var(--ease);
}

.wish.is-open .wish__veil { opacity: 1; }

.wish__card {
  position: relative;
  z-index: 1;
  width: min(548px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  padding: clamp(36px, 5.4vw, 58px) clamp(24px, 4.6vw, 50px);
  border-radius: 4px;
  text-align: center;
  background: linear-gradient(168deg, #FFFDF9 0%, #FCF5EE 56%, #F9EFE7 100%);
  box-shadow:
    0 46px 96px -48px rgba(48, 41, 36, .6),
    0 4px 16px -10px rgba(48, 41, 36, .2),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  opacity: 0;
  transform: translateY(24px) scale(.978);
  transition: opacity .62s var(--ease), transform .78s var(--ease);
}

.wish.is-open .wish__card { opacity: 1; transform: none; }

.wish__card::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(169, 124, 111, .3);
  border-radius: 2px;
  pointer-events: none;
}

.wish__card::after {
  content: "";
  position: absolute;
  inset: -34px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 219, 210, .55) 0%, rgba(243, 219, 210, 0) 62%);
  filter: blur(34px);
  pointer-events: none;
}

.wish__close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(176, 154, 140, .26);
  background: rgba(255, 253, 249, .7);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .4s var(--ease);
}

.wish__close svg { width: 14px; height: 14px; }

.wish__close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #FBF3EA;
  transform: rotate(90deg);
}

.wish__kicker {
  font-size: 9.5px;
  letter-spacing: .46em;
  text-indent: .46em;
  color: var(--rose-deep);
  opacity: .9;
}

.wish__orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 24px;
}

.wish__orn span {
  width: 34px; height: 1px;
  background: linear-gradient(90deg, rgba(169, 124, 111, 0), rgba(169, 124, 111, .45));
}

.wish__orn span:last-child {
  background: linear-gradient(270deg, rgba(169, 124, 111, 0), rgba(169, 124, 111, .45));
}

.wish__orn i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--rose);
}

.wish__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(23px, 3.6vw, 33px);
  line-height: 1.5;
  letter-spacing: .08em;
  color: var(--ink);
}

.wish__body {
  margin-top: 24px;
  font-size: 14px;
  line-height: 2.25;
  letter-spacing: .04em;
  color: var(--ink-soft);
  text-align: left;
}

.wish__sign {
  margin-top: 30px;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--ink-faint);
  text-align: right;
}

/* ==========================================================================
   8. 响应式
   ========================================================================== */

/* 平板 */
@media (max-width: 1024px) {
  .wall__head { gap: 14px; }
  .wall__hint { display: none; }
  .lb__panel { grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); }
}

/* 手机 */
@media (max-width: 720px) {
  .wall__head {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    padding: 12px 14px 11px;
  }

  .wall__mark { justify-self: center; }
  .wall__marktext { font-size: 12.5px; letter-spacing: .18em; }
  .wall__hint { display: none; }

  .modes { padding: 3px; }
  .mode {
    padding: 7px 14px;
    font-size: 12px;
    letter-spacing: .1em;
    text-indent: .1em;
  }

  .stage { padding: 0 4px; }

  .photo__cap { font-size: 11px; letter-spacing: .06em; padding: 8px 3px 10px; }

  .lb { padding: 0; display: block; overflow-y: auto; }

  .lb__panel {
    grid-template-columns: 1fr;
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    transform: translateY(24px);
  }

  .lb.is-open .lb__panel { transform: none; }

  .lb__media {
    height: 54dvh;
    min-height: 0;
    max-height: none;
    padding: 0;
  }

  .lb { --lb-pad: 12px; }

  .lb__info { padding: 24px 22px 34px; }

  .lb__title { margin-bottom: 14px; }

  .lb__meta { margin-top: 24px; }

  .lb__nav { width: 40px; height: 40px; }
  .lb__nav--prev { left: 8px; }
  .lb__nav--next { right: 8px; }

  .lb__close { top: 10px; right: 10px; width: 34px; height: 34px; }

  .intro__foot { font-size: 9px; letter-spacing: .26em; }

  .enter { padding: 12px 13px 12px 24px; font-size: 13px; }

  .wish__body { font-size: 13.5px; line-height: 2.1; text-align: center; }
  .wish__sign { text-align: center; }
}

/* 超小屏 */
@media (max-width: 380px) {
  .mode { padding: 6px 11px; font-size: 11.5px; }
  .intro__title { letter-spacing: .07em; }
}

/* 横屏矮屏 */
@media (max-height: 520px) and (orientation: landscape) {
  .intro__title { font-size: clamp(30px, 5.4vw, 46px); }
  .intro__rule { margin: 18px auto 16px; }
  .enter { margin-top: 24px; }
  .intro__foot { display: none; }
}

/* 尊重用户的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .aura, .spark { display: none; }
}
