@charset "UTF-8";

/* ============================================================
   孙惠仪 & 李浩文 · 婚礼邀请
   视觉方向：月下雾光 · 朱砂流萤
   —— 冷调雾蓝为底，朱砂是唯一的暖色锚点；
      光晕、雾气、流萤制造空气感与纵深；
      字形变轻、留白加大，保留仪式感但不再做整页纸感。
   ============================================================ */

:root {
  color-scheme: light;

  /* 雾与夜 */
  --mist-hi: #f8fafc;
  --mist: #e9edf4;
  --mist-lo: #d2dbe8;
  --night: #232c3e;
  --night-deep: #131924;

  /* 墨（偏冷，替代旧纸的棕墨） */
  --ink: #252b39;
  --ink-soft: #4c5666;
  --muted: #78849a;

  /* 朱砂与暖光 */
  --cinnabar: #a73a2d;
  --cinnabar-deep: #7d2a1f;
  --ember: #e3a48d;
  --blush: #f3dcd8;
  --champagne: #c0a175;

  /* 细线 */
  --line: rgba(96, 111, 136, .22);
  --line-soft: rgba(96, 111, 136, .12);
  --hair: rgba(255, 255, 255, .68);

  /* 玻璃面：用半透明白替代毛玻璃，兼顾低端机性能 */
  --glass-hi: rgba(255, 255, 255, .82);
  --glass-lo: rgba(255, 255, 255, .42);

  /* 字体：本地字体，不请求外部资源 */
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
  --latin: "Baskerville", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Hoefler Text", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100%;
  /* 页面底色：从月白到暮蓝的整片雾色，作为所有光晕的底 */
  background-color: #e9edf4;
  background-image:
    linear-gradient(180deg, #f5f8fb 0%, #eceff5 26%, #e0e6ef 54%, #d1dae7 80%, #c2cddd 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

p, h1, h2 { margin: 0; }
img { display: block; max-width: 100%; }
button, a { font: inherit; }
::selection { background: rgba(167, 58, 45, .16); }

/* 给微信抓取的分享封面：不可见，但必须参与渲染 */
.share-cover {
  position: absolute;
  top: 0;
  left: -9999px;
  width: 600px;
  height: 600px;
  pointer-events: none;
}

/* ============================================================
   氛围层：三团缓慢漂移的雾光 + 一层漂浮光点
   —— 全部固定定位，只在 transform / opacity 上做动画
   ============================================================ */

.atmosphere {
  position: fixed;
  inset: -60px 0; /* 上下各留出余量，视差位移时不会露边 */
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}

.aura {
  position: absolute;
  display: block;
  border-radius: 50%;
}

/* 右上：薄暮粉，像窗外透进来的晚霞 */
.aura--rose {
  top: -16%;
  right: -34%;
  width: 94vmax;
  height: 94vmax;
  background: radial-gradient(
    closest-side,
    rgba(236, 175, 164, .55) 0%,
    rgba(236, 175, 164, .22) 44%,
    rgba(236, 175, 164, 0) 74%
  );
  animation: auraDrift 48s ease-in-out infinite alternate;
}

/* 左下：月白蓝，像一层没有落地的雾 */
.aura--blue {
  bottom: -22%;
  left: -30%;
  width: 100vmax;
  height: 100vmax;
  background: radial-gradient(
    closest-side,
    rgba(168, 197, 226, .55) 0%,
    rgba(168, 197, 226, .2) 46%,
    rgba(168, 197, 226, 0) 72%
  );
  animation: auraDrift 62s ease-in-out infinite alternate-reverse;
}

/* 中部：一点极淡的烛火，给冷雾垫一点温度 */
.aura--warm {
  top: 46%;
  left: 8%;
  width: 48vmax;
  height: 48vmax;
  opacity: .75;
  background: radial-gradient(
    closest-side,
    rgba(226, 158, 138, .34) 0%,
    rgba(226, 158, 138, .12) 48%,
    rgba(226, 158, 138, 0) 72%
  );
  animation: auraDrift 40s ease-in-out infinite alternate;
}

/* 漂浮光点（流萤），由 HTML 里的 12 个 .spark 承载 */
.dust {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.spark {
  position: absolute;
  display: block;
  width: var(--s, 4px);
  height: var(--s, 4px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .45) 42%, rgba(255, 255, 255, 0) 72%);
  box-shadow: 0 0 12px 3px rgba(255, 244, 238, .45);
  opacity: 0;
  animation: floatUp var(--dur, 20s) linear var(--delay, 0s) infinite;
}

/* 每个光点的起点、速度、飘向都略有差别，避免机械感 */
.spark:nth-child(1)  { left: 7%;  top: 88%; --s: 3px; --dur: 22s; --delay: 0s;    --drift: 26px;  }
.spark:nth-child(2)  { left: 17%; top: 74%; --s: 5px; --dur: 28s; --delay: 3.2s;  --drift: -22px; }
.spark:nth-child(3)  { left: 30%; top: 96%; --s: 4px; --dur: 24s; --delay: 6.4s;  --drift: 18px;  }
.spark:nth-child(4)  { left: 41%; top: 68%; --s: 2px; --dur: 30s; --delay: 1.6s;  --drift: -12px; }
.spark:nth-child(5)  { left: 52%; top: 92%; --s: 6px; --dur: 26s; --delay: 9.4s;  --drift: 30px;  }
.spark:nth-child(6)  { left: 63%; top: 78%; --s: 3px; --dur: 20s; --delay: 4.8s;  --drift: -26px; }
.spark:nth-child(7)  { left: 74%; top: 98%; --s: 4px; --dur: 32s; --delay: 12.2s; --drift: 14px;  }
.spark:nth-child(8)  { left: 86%; top: 70%; --s: 2px; --dur: 18s; --delay: 7.6s;  --drift: -18px; }
.spark:nth-child(9)  { left: 94%; top: 86%; --s: 5px; --dur: 27s; --delay: 14s;   --drift: 22px;  }
.spark:nth-child(10) { left: 23%; top: 60%; --s: 2px; --dur: 34s; --delay: 11s;   --drift: 10px;  }
.spark:nth-child(11) { left: 57%; top: 52%; --s: 3px; --dur: 25s; --delay: 2.4s;  --drift: -20px; }
.spark:nth-child(12) { left: 80%; top: 46%; --s: 4px; --dur: 29s; --delay: 8.8s;  --drift: 16px;  }

/* ============================================================
   内容容器：不再是一张纸，而是一条漂浮在雾里的窄栏
   ============================================================ */

.paper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   封面
   ============================================================ */

.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    calc(20px + env(safe-area-inset-top))
    26px
    calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  overflow: hidden;
  /* 中心再补一层极浅的月光，让姓名浮起来 */
  background: radial-gradient(72% 54% at 50% 42%, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 72%);
}

/* 封面底部的一层雾，像站在晨雾里 */
.cover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 36%;
  background: linear-gradient(180deg, rgba(244, 247, 251, 0) 0%, rgba(244, 247, 251, .5) 58%, rgba(244, 247, 251, .74) 100%);
  pointer-events: none;
}

/* 姓名背后的月晕，缓慢呼吸 */
.moon-halo {
  position: absolute;
  top: 45%;
  left: 50%;
  z-index: 0;
  width: min(96vw, 460px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, .92) 0%,
    rgba(255, 255, 255, .5) 24%,
    rgba(244, 216, 210, .32) 44%,
    rgba(196, 215, 234, .16) 62%,
    rgba(196, 215, 234, 0) 78%
  );
  animation: moonBreathe 9s ease-in-out infinite;
  pointer-events: none;
}

/* 页眉式小字 */
.cover-meta {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .62);
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #8c97aa;
  animation: riseVeil 1s cubic-bezier(.16, .84, .3, 1) .08s both;
}
.cover-meta span:first-child {
  font-family: var(--serif);
  letter-spacing: .32em;
  color: var(--cinnabar);
}
.cover-meta span:last-child { text-shadow: 0 0 14px rgba(255, 255, 255, .9); }

/* 超大的「囍」作为远景水印，压得很淡 */
.cover-watermark {
  position: absolute;
  right: -24%;
  top: 22%;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(190px, 52vw, 300px);
  line-height: 1;
  color: rgba(167, 58, 45, .042);
  transform: rotate(-10deg);
  pointer-events: none;
  user-select: none;
  animation: fadeIn 2.6s ease .3s both;
}

.cover-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0 30px;
}

/* 通用小标题 */
.eyebrow {
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--muted);
}
.cover .eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cover .eyebrow::before,
.cover .eyebrow::after {
  content: "";
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(120, 132, 154, .38), rgba(255, 255, 255, 0));
}

/* 姓名：细字重 + 大间距，像雾气里慢慢显影的字 */
.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 30px;
  font-family: var(--serif);
  font-size: 33px;
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: .44em;
  color: var(--ink);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, .9),
    0 0 30px rgba(255, 255, 255, .7);
}
.names .name { padding-left: .44em; }
.names .join {
  /* 两人之间的一粒朱砂菱光 */
  flex: none;
  width: 6px;
  height: 6px;
  margin: 8px 0 9px;
  overflow: hidden;
  border: 1px solid rgba(167, 58, 45, .55);
  font-size: 0;
  line-height: 0;
  color: transparent;
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(167, 58, 45, .3);
}

.script {
  margin-top: 15px;
  font-family: var(--latin);
  font-style: italic;
  font-size: 13px;
  letter-spacing: .03em;
  color: #8f99ac;
}

/* 大日期：细亮的大数字，两侧是渐隐的光线 */
.big-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  font-family: var(--latin);
  font-size: clamp(58px, 18vw, 88px);
  line-height: .9;
  letter-spacing: .03em;
  color: #2f3749;
  font-variant-numeric: lining-nums;
  text-shadow: 0 2px 22px rgba(255, 255, 255, .8);
}
.big-date::before,
.big-date::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(120, 132, 154, .4), rgba(255, 255, 255, 0));
}
.big-date b { font-weight: 400; }
.big-date i {
  font-style: normal;
  font-size: .34em;
  margin: 0 .06em;
  color: var(--cinnabar);
  transform: translateY(-.1em);
  text-shadow: 0 0 18px rgba(167, 58, 45, .35);
}

.date-meta {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: .28em;
  color: #6f7b8f;
}
.city {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: .32em;
  color: #a38a63;
}

/* 印章入口：保留朱砂的仪式感，外加一圈呼吸光晕 */
.cover-foot {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  animation: riseVeil 1.1s cubic-bezier(.16, .84, .3, 1) 1s both;
}

.seal-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 4px 10px;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.seal-face {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, #c85443 0%, var(--cinnabar) 46%, var(--cinnabar-deep) 100%);
  color: #fcefe4;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  box-shadow:
    0 0 34px rgba(167, 58, 45, .42),
    0 18px 34px -16px rgba(125, 42, 31, .75),
    inset 0 0 0 2px rgba(252, 239, 228, .45),
    inset 0 0 0 6px rgba(125, 42, 31, .3);
  transform: rotate(-6deg);
  transition: transform .35s ease, box-shadow .35s ease;
}

/* 内圈印边 */
.seal-face::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(252, 239, 228, .34);
  border-radius: 50%;
}

/* 外圈光晕：一下一下地散开 */
.seal-face::before {
  content: "";
  position: absolute;
  inset: -16px;
  border: 1px solid rgba(167, 58, 45, .26);
  border-radius: 50%;
  animation: sealHalo 6s ease-in-out infinite;
}

.seal-label {
  font-size: 11px;
  letter-spacing: .32em;
  text-indent: .32em;
  color: var(--cinnabar);
}

.seal-button:active .seal-face { transform: rotate(-6deg) scale(.94); }

@media (hover: hover) {
  .seal-button:hover .seal-face {
    transform: rotate(-2deg) scale(1.05);
    box-shadow:
      0 0 46px rgba(167, 58, 45, .5),
      0 22px 40px -18px rgba(125, 42, 31, .8),
      inset 0 0 0 2px rgba(252, 239, 228, .55),
      inset 0 0 0 6px rgba(125, 42, 31, .32);
  }
}

/* ============================================================
   正文通用
   ============================================================ */

.block {
  position: relative;
  padding: 72px 28px;
  text-align: center;
}

/* 区块之间：一条中间亮、两端隐形的光线，代替硬分割 */
.block + .block:not(.ending)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, .9) 22%,
    rgba(120, 132, 154, .3) 50%,
    rgba(255, 255, 255, .9) 78%,
    rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* ============================================================
   邀请语 —— 一张浮在雾里的薄玻璃信笺
   ============================================================ */

.letter { padding-top: 76px; }

.letter-card {
  position: relative;
  padding: 34px 26px 38px;
  text-align: left;
  border-radius: 22px;
  background: linear-gradient(158deg, rgba(255, 255, 255, .84) 0%, rgba(255, 255, 255, .5) 54%, rgba(247, 236, 238, .42) 100%);
  border: 1px solid rgba(255, 255, 255, .74);
  box-shadow:
    0 30px 70px -42px rgba(48, 66, 94, .58),
    0 1px 0 rgba(255, 255, 255, .9) inset;
  transform: rotate(-.4deg);
}

.letter-salute {
  margin-top: 18px;
  font-family: var(--kai);
  font-size: 17px;
  letter-spacing: .18em;
  color: var(--cinnabar);
}

.letter-body {
  margin-top: 16px;
  padding-right: 34px;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 2.15;
  letter-spacing: .05em;
  color: var(--ink-soft);
}
.letter-body p + p { margin-top: 5px; }

.signature {
  margin-top: 26px;
  font-size: 11.5px;
  letter-spacing: .24em;
  color: var(--muted);
}

/* 信笺右下角的方形朱印 */
.letter-seal {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: linear-gradient(150deg, #b84535, var(--cinnabar-deep));
  color: #fcefe4;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  box-shadow:
    0 0 24px rgba(167, 58, 45, .3),
    inset 0 0 0 2px rgba(252, 239, 228, .42);
  transform: rotate(-8deg);
}

/* ============================================================
   时间
   ============================================================ */

.when {
  padding-top: 86px;
  padding-bottom: 78px;
}

/* 背景里的巨大日期，只作雾里的印记 */
.ghost-date {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--latin);
  font-size: clamp(88px, 27vw, 136px);
  line-height: 1;
  letter-spacing: .02em;
  white-space: nowrap;
  color: rgba(167, 58, 45, .045);
  pointer-events: none;
  user-select: none;
}
/* 小标题压在巨大数字上，加一层白色微光保证可读 */
.when .eyebrow {
  position: relative;
  z-index: 1;
  color: #66738a;
  text-shadow: 0 0 12px rgba(255, 255, 255, .95);
}

.date-cn {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: .16em;
  color: var(--ink);
  text-shadow: 0 0 24px rgba(255, 255, 255, .75);
}
.date-sub {
  margin-top: 13px;
  font-size: 12px;
  letter-spacing: .26em;
  color: var(--muted);
}
.date-sub .dot { color: var(--champagne); }

.countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 28px;
  padding: 10px 24px;
  border-radius: 999px;
  background: linear-gradient(150deg, var(--glass-hi), var(--glass-lo));
  border: 1px solid rgba(255, 255, 255, .74);
  box-shadow:
    0 18px 40px -30px rgba(50, 70, 100, .6),
    inset 0 1px 0 rgba(255, 255, 255, .92);
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--cinnabar);
}
.countdown b {
  padding: 0 4px;
  font-family: var(--latin);
  font-size: 20px;
  font-weight: 400;
  color: var(--cinnabar-deep);
}

/* ============================================================
   地点
   ============================================================ */

.venue-card {
  position: relative;
  margin-top: 26px;
  padding: 34px 22px 32px;
  border-radius: 22px;
  background: linear-gradient(170deg, rgba(255, 255, 255, .8) 0%, rgba(255, 255, 255, .44) 100%);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow:
    0 26px 60px -40px rgba(48, 66, 94, .55),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

/* 卡片中心一团极淡的光，代替旧的地图格纹 */
.venue-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(62% 58% at 50% 42%, rgba(243, 220, 216, .5) 0%, rgba(243, 220, 216, 0) 72%);
}

.venue-pin {
  position: relative;
  width: 22px;
  height: 22px;
  margin: 0 auto;
  color: var(--cinnabar);
  filter: drop-shadow(0 0 8px rgba(167, 58, 45, .22));
}

.venue-line {
  position: relative;
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .1em;
  color: var(--ink);
}
.venue-note {
  position: relative;
  margin-top: 8px;
  font-size: 12.5px;
  letter-spacing: .1em;
  color: var(--muted);
}

.where-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

/* 胶囊按钮：比旧的正方小按钮更轻、更飘 */
.ghost-button,
.solid-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: .22em;
  text-indent: .22em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.ghost-button {
  border: 1px solid rgba(120, 132, 154, .28);
  background: rgba(255, 255, 255, .5);
  color: var(--cinnabar);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
.solid-button {
  border: 1px solid rgba(167, 58, 45, .9);
  background: linear-gradient(145deg, #b84736, var(--cinnabar) 42%, var(--cinnabar-deep) 100%);
  color: #fff6ef;
  box-shadow:
    0 16px 30px -16px rgba(140, 45, 34, .8),
    inset 0 1px 0 rgba(255, 255, 255, .24);
}
.ghost-button:active,
.solid-button:active { transform: scale(.97); }
@media (hover: hover) {
  .ghost-button:hover { background: rgba(255, 255, 255, .78); }
  .solid-button:hover { box-shadow: 0 18px 36px -16px rgba(140, 45, 34, .88), inset 0 1px 0 rgba(255, 255, 255, .28); }
}

.hint {
  margin-top: 18px;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: #8a95a8;
}

/* ============================================================
   照片 —— 漂浮的玻璃相片墙
   ============================================================ */

.photos { padding-top: 84px; }

.section-head { text-align: left; }
.section-title {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--ink);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 16px;
  margin-top: 30px;
  padding: 10px 2px 6px;
}

/* 每张照片 = 一片薄玻璃托着的相纸，轻微倾斜 */
.photo {
  position: relative;
  margin: 0;
  padding: 8px 8px 10px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .62));
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow:
    0 20px 44px -26px rgba(52, 72, 104, .62),
    0 0 0 1px rgba(120, 132, 154, .06),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  transform: rotate(var(--tilt, -1.2deg));
  transition:
    transform .5s cubic-bezier(.2, .8, .25, 1),
    box-shadow .5s ease;
}

/* 四张一轮的倾斜角度，避免整齐得发假 */
.photo:nth-child(4n + 1) { --tilt: -1.6deg; }
.photo:nth-child(4n + 2) { --tilt: 1.1deg; }
.photo:nth-child(4n + 3) { --tilt: -1deg; }
.photo:nth-child(4n + 4) { --tilt: 1.8deg; }

/* 宽图（config.js 里 wide: true）占满一行 */
.photo.photo--wide {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 3;
  --tilt: -.4deg;
}
.photo.photo--wide:nth-child(even) { --tilt: .4deg; }

/* 图片未到位时的占位：雾色渐变 + config 里的 label */
.photo::after {
  content: attr(data-label);
  position: absolute;
  inset: 8px 8px 10px;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(150deg, #eef2f8 0%, #e2e8f1 55%, #f4e7e5 100%);
  font-size: 10px;
  letter-spacing: .22em;
  text-indent: .22em;
  color: #93a0b4;
}

.photo img {
  position: absolute;
  inset: 8px 8px 10px;
  z-index: 1;
  width: auto;
  height: auto;
  border-radius: 9px;
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s ease;
}
/* 图片加载完成后再淡入，避免闪白 */
.photo[data-loaded="true"] img { opacity: 1; }

@media (hover: hover) {
  .photo:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.015);
    box-shadow:
      0 30px 56px -26px rgba(52, 72, 104, .68),
      0 0 30px rgba(255, 255, 255, .6),
      inset 0 1px 0 rgba(255, 255, 255, .95);
  }
}

/* ============================================================
   结尾 —— 入夜，深蓝收束
   ============================================================ */

.block.ending {
  margin-top: 46px;
  padding-top: 88px;
  padding-bottom: calc(58px + env(safe-area-inset-bottom));
  /* 提高选择器权重，压掉上一个区块的顶部分隔线 */
  border-top: 0;
  border-radius: 44px 44px 0 0;
  background:
    radial-gradient(120% 86% at 50% 0%, rgba(176, 74, 58, .3) 0%, rgba(130, 58, 56, .12) 42%, rgba(19, 25, 36, 0) 72%),
    linear-gradient(180deg, #242c3d 0%, #1a2130 54%, #131924 100%);
  color: #eef1f7;
  overflow: hidden;
  isolation: isolate;
}

/* 夜幕里几点极淡的星 */
.block.ending::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  background-image:
    radial-gradient(1.4px 1.4px at 18% 26%, rgba(255, 255, 255, .85), transparent 60%),
    radial-gradient(1px 1px at 34% 14%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1.2px 1.2px at 62% 22%, rgba(255, 235, 225, .8), transparent 60%),
    radial-gradient(1px 1px at 78% 38%, rgba(255, 255, 255, .65), transparent 60%),
    radial-gradient(1.6px 1.6px at 88% 12%, rgba(255, 214, 198, .8), transparent 60%),
    radial-gradient(1px 1px at 10% 48%, rgba(255, 255, 255, .6), transparent 60%),
    radial-gradient(1.2px 1.2px at 46% 34%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1px 1px at 70% 52%, rgba(255, 235, 225, .6), transparent 60%);
  background-repeat: no-repeat;
}

.block.ending > * { position: relative; z-index: 1; }

.ending-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border: 1px solid rgba(233, 183, 164, .5);
  border-radius: 6px;
  color: #e9c4ae;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
  transform: rotate(-6deg);
  box-shadow: 0 0 26px rgba(233, 183, 164, .16);
}

.ending-line {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .18em;
  color: #f5f2ee;
}

.ending-names {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(238, 241, 247, .16);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .3em;
  color: #e5c9ae;
}
.ending-names span { opacity: .6; }

.ending-date {
  margin-top: 10px;
  font-family: var(--latin);
  font-size: 10.5px;
  letter-spacing: .36em;
  color: rgba(238, 241, 247, .55);
}

/* ============================================================
   浮动控件
   ============================================================ */

.bgm-toggle {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  /* 桌面端贴在内容栏内部右上角 */
  right: max(16px, calc((100vw - 560px) / 2 + 16px));
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  color: var(--ink-soft);
  box-shadow: 0 10px 24px -14px rgba(48, 66, 94, .5);
  cursor: pointer;
}
.bgm-toggle svg { width: 17px; height: 17px; }
.bgm-toggle .icon-mute { display: none; }
.bgm-toggle[data-playing="false"] .icon-note { display: none; }
.bgm-toggle[data-playing="false"] .icon-mute { display: block; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px);
  padding: 9px 22px;
  border-radius: 999px;
  background: rgba(30, 37, 52, .92);
  color: #f5f2ee;
  font-size: 12px;
  letter-spacing: .12em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   动效
   ============================================================ */

/* 封面文字：从雾里浮出，由虚变实 */
@keyframes riseVeil {
  from { opacity: 0; transform: translateY(18px); filter: blur(9px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes moonBreathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .82; }
  50% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}
@keyframes auraDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3%, 4%, 0) scale(1.06); }
  100% { transform: translate3d(2%, -2%, 0) scale(1.02); }
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate3d(0, 24px, 0) scale(.6); }
  12% { opacity: .85; }
  72% { opacity: .5; }
  100% { opacity: 0; transform: translate3d(var(--drift, 20px), -78vh, 0) scale(1); }
}
@keyframes sealHalo {
  0%, 100% { transform: scale(.92); opacity: .35; }
  50% { transform: scale(1.12); opacity: .12; }
}

/* 封面内容依次浮起，形成一次完整的开场 */
.cover-main > * { animation: riseVeil 1.1s cubic-bezier(.16, .84, .3, 1) both; }
.cover-main > *:nth-child(1) { animation-delay: .3s; }
.cover-main > *:nth-child(2) { animation-delay: .44s; }
.cover-main > *:nth-child(3) { animation-delay: .58s; }
.cover-main > *:nth-child(4) { animation-delay: .72s; }
.cover-main > *:nth-child(5) { animation-delay: .84s; }
.cover-main > *:nth-child(6) { animation-delay: .94s; }

/* 正文滚动入场，由 app.js 的 IntersectionObserver 加 .in */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1.05s ease,
    transform 1.05s cubic-bezier(.16, .84, .3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* 系统开启「减少动态效果」时全部静止 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cover-meta,
  .cover-watermark,
  .cover-main > *,
  .cover-foot { animation: none; }
  .photo,
  .letter-card,
  .seal-face { transition: none; }
  /* 光晕保留静态形态，流萤直接隐藏 */
  .aura,
  .moon-halo,
  .seal-face::before { animation: none; }
  .spark { display: none; }
}

/* ============================================================
   桌面端
   ============================================================ */

@media (min-width: 720px) {
  .cover { padding-left: 36px; padding-right: 36px; }
  .names { font-size: 36px; }
  .block { padding-left: 46px; padding-right: 46px; }
  .letter-card { padding: 40px 36px 44px; }
  .venue-card { padding: 38px 30px 34px; }
}

/* 宽屏时在内容栏两侧加竖排小字，别让留白太空 */
@media (min-width: 1040px) {
  body::before,
  body::after {
    position: fixed;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    font-family: var(--serif);
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: .55em;
    color: rgba(96, 110, 135, .38);
    writing-mode: vertical-rl;
    pointer-events: none;
    user-select: none;
  }
  body::before {
    content: "良辰吉日";
    left: max(24px, calc(50% - 372px));
  }
  body::after {
    content: "喜结良缘";
    right: max(24px, calc(50% - 372px));
  }
}

/* 小屏收一点字号与留白 */
@media (max-width: 360px) {
  .names { font-size: 29px; letter-spacing: .34em; }
  .names .name { padding-left: .34em; }
  .block { padding: 58px 22px; }
  .where-actions { gap: 10px; }
  .ghost-button, .solid-button { padding: 0 18px; }
}
