/* =========================================================
   生日表白单页 · 样式
   移动端优先：基础样式面向手机，768px / 1024px 逐级增强
   ========================================================= */

/* ---------- 1. 设计变量 ---------- */
:root {
  --bg-0: #0d0722;
  --bg-1: #1b1040;
  --bg-2: #2b1659;

  --pink: #ff9fd0;
  --rose: #ff74b3;
  --purple: #c39bff;
  --blue: #93b6ff;
  --gold: #ffd8a8;

  --text: #f7effd;
  --text-dim: #cbb7ea;

  --card: rgba(255, 255, 255, .07);
  --card-strong: rgba(255, 255, 255, .12);
  --border: rgba(255, 255, 255, .14);

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;

  --shadow: 0 18px 40px rgba(20, 8, 48, .45);
  --glow-pink: 0 0 28px rgba(255, 122, 179, .45);

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;

  --dur: .8s;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. 基础重置 ---------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-0);
  overflow-x: hidden;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
}

body.is-locked { overflow: hidden; height: 100vh; }

/* 星空背景：多层径向渐变 + 细密星点 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 15% -5%, rgba(255, 122, 179, .30), transparent 60%),
    radial-gradient(900px 620px at 88% 8%, rgba(147, 182, 255, .26), transparent 62%),
    radial-gradient(900px 900px at 50% 105%, rgba(195, 155, 255, .26), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 55%, #140a30 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 78% 14%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 42% 62%, #ffe7f4 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 88% 72%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 24% 84%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 60% 34%, #fff 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 6% 52%, #fff 50%, transparent 51%);
  background-size: 220px 220px, 180px 180px, 260px 260px, 200px 200px, 240px 240px, 300px 300px, 160px 160px;
  animation: twinkle 5.5s ease-in-out infinite alternate;
}

@keyframes twinkle { from { opacity: .32; } to { opacity: .7; } }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
ol { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 3. 粒子画布 ---------- */
#fx {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* ---------- 4. 顶栏 ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(13, 7, 34, .72), rgba(13, 7, 34, 0));
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.topbar.is-show { opacity: 1; transform: none; }

.brand {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--text-dim);
}

.music-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
  transition: color .3s, border-color .3s, background .3s, transform .2s;
}

.music-btn:active { transform: scale(.95); }

.music-btn.is-on {
  color: var(--pink);
  border-color: rgba(255, 159, 208, .5);
  background: rgba(255, 122, 179, .16);
}

.music-btn__bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.music-btn__bars i {
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  animation: eq .9s ease-in-out infinite alternate;
}

.music-btn__bars i:nth-child(2) { animation-delay: .18s; }
.music-btn__bars i:nth-child(3) { animation-delay: .36s; }
.music-btn__bars i:nth-child(4) { animation-delay: .54s; }

.music-btn:not(.is-on) .music-btn__bars i { animation: none; height: 5px; }

@keyframes eq { from { height: 4px; } to { height: 13px; } }

/* ---------- 5. 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 96px 0 72px;
  text-align: center;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 130vw;
  max-width: 720px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 179, .30), transparent 62%);
  filter: blur(18px);
  animation: breathe 7s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes breathe {
  from { transform: translate(-50%, -50%) scale(.86); opacity: .55; }
  to { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

.hero__inner { position: relative; z-index: 2; }

.hero__avatar {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(255, 159, 208, .5), rgba(147, 182, 255, .45));
  display: grid;
  place-items: center;
  font-size: 40px;
  box-shadow: var(--glow-pink);
}

.hero__avatar img { width: 100%; height: 100%; object-fit: cover; }

.hero__avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 216, 168, .45);
  animation: spin 14s linear infinite;
}

.hero__avatar-ring::after {
  content: "";
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero__date {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: .32em;
  color: var(--gold);
  text-transform: uppercase;
}

.hero__title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
}

.hero__hi {
  display: block;
  font-size: clamp(30px, 11vw, 56px);
  background: linear-gradient(100deg, #fff 10%, var(--pink) 45%, var(--purple) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 30px rgba(255, 122, 179, .28);
}

.hero__name {
  display: block;
  margin-top: 4px;
  font-size: clamp(18px, 6vw, 26px);
  color: var(--text-dim);
  letter-spacing: .1em;
}

.hero__sub {
  margin: 0 auto;
  max-width: 30em;
  font-size: 15px;
  color: var(--text-dim);
}

.hero__typing {
  margin: 22px auto 0;
  min-height: 2.4em;
  max-width: 26em;
  font-family: var(--font-serif);
  font-size: clamp(15px, 4.4vw, 19px);
  color: #fff;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -.16em;
  background: var(--pink);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero__hint {
  margin-top: 46px;
  font-size: 12px;
  color: rgba(203, 183, 234, .75);
  letter-spacing: .1em;
}

.hero__hint span { display: block; margin-bottom: 10px; }

.hero__hint i {
  display: block;
  width: 1px;
  height: 34px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--pink), transparent);
  animation: drop 1.9s ease-in-out infinite;
}

@keyframes drop {
  0% { transform: translateY(-8px) scaleY(.4); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(10px) scaleY(1); opacity: 0; }
}

/* ---------- 5.5 生日倒计时 ---------- */
.cd { margin: 28px auto 0; }

.cd__label {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--gold);
}

.cd__grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
}

.cd__unit {
  min-width: 62px;
  padding: 10px 8px 8px;
  border-radius: var(--r-sm);
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(20, 8, 48, .35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cd__num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(24px, 7.4vw, 34px);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-shadow: 0 4px 18px rgba(255, 122, 179, .45);
}

.cd__num.is-tick { animation: tick .5s var(--ease); }

@keyframes tick {
  0% { transform: translateY(-6px) scale(1.06); opacity: .45; }
  100% { transform: none; opacity: 1; }
}

.cd__cap {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--text-dim);
}

.cd__sep {
  align-self: center;
  font-size: 20px;
  color: rgba(255, 216, 168, .6);
  animation: blink 1.4s steps(1) infinite;
}

.cd__since {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: .06em;
}

.cd__since b {
  color: var(--pink);
  font-size: 17px;
  font-family: var(--font-serif);
  margin: 0 3px;
}

.cd__today {
  display: none;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(20px, 6.4vw, 28px);
  color: #fff;
  animation: breatheText 2.4s ease-in-out infinite alternate;
}

.cd.is-today .cd__label,
.cd.is-today .cd__grid { display: none; }

.cd.is-today .cd__today { display: block; }

@keyframes breatheText {
  from { transform: scale(.97); text-shadow: 0 0 18px rgba(255, 122, 179, .35); }
  to { transform: scale(1.03); text-shadow: 0 0 30px rgba(255, 122, 179, .7); }
}

/* ---------- 6. 通用区块 ---------- */
.section {
  position: relative;
  z-index: 2;
  padding: 72px 0;
}

.sec-title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(22px, 7vw, 30px);
  text-align: center;
  background: linear-gradient(100deg, #fff, var(--pink) 60%, var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sec-sub {
  margin: 0 0 38px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: .08em;
}

/* ---------- 7. 时间轴 ---------- */
.timeline { position: relative; padding-left: 30px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 159, 208, .6) 12%, rgba(195, 155, 255, .6) 88%, transparent);
}

.tl-item { position: relative; margin-bottom: 26px; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -30px; top: 22px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 2px solid rgba(255, 159, 208, .8);
  box-shadow: 0 0 0 4px rgba(255, 122, 179, .12);
}

.tl-item::after {
  content: "💗";
  position: absolute;
  left: -24px; top: 19px;
  font-size: 10px;
  line-height: 1;
  opacity: .9;
}

.tl-card {
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .4s var(--ease), border-color .4s;
}

.tl-card:hover { transform: translateY(-4px); border-color: rgba(255, 159, 208, .4); }

.tl-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(255, 159, 208, .35), rgba(147, 182, 255, .3));
  display: grid;
  place-items: center;
  font-size: 26px;
}

.tl-photo img { width: 100%; height: 100%; object-fit: cover; }

.tl-date {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 216, 168, .16);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .06em;
}

.tl-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 17px;
}

.tl-text { margin: 0; font-size: 14px; color: var(--text-dim); }

/* ---------- 8. 视频回忆 ---------- */
.video-list { display: grid; gap: 22px; max-width: 620px; margin: 0 auto; }

.video-card {
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 159, 208, .3), rgba(147, 182, 255, .3));
  display: grid;
  place-items: center;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #12082c;
}

.video-ph {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.9;
}

.video-ph span { display: block; font-size: 30px; }

.video-meta { padding: 12px 6px 4px; }

.video-title { margin: 0 0 4px; font-family: var(--font-serif); font-size: 16px; }
.video-desc { margin: 0; font-size: 13px; color: var(--text-dim); }

/* ---------- 9. 一起听的歌 ---------- */
.song-list { display: grid; gap: 12px; }

.song-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}

.song-item:active { transform: scale(.985); }

.song-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 159, 208, .45);
  background: rgba(255, 122, 179, .1);
}

.song-cover {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 159, 208, .55), rgba(195, 155, 255, .5));
  display: grid;
  place-items: center;
  font-size: 22px;
}

.song-cover img { width: 100%; height: 100%; object-fit: cover; }

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

.song-name {
  margin: 0 0 2px;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-artist {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-go {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--pink);
  background: rgba(255, 122, 179, .16);
  border: 1px solid rgba(255, 159, 208, .35);
  white-space: nowrap;
}

.songs__note {
  margin: 18px 0 0;
  text-align: center;
  font-size: 11px;
  color: rgba(203, 183, 234, .6);
  line-height: 1.8;
}

/* ---------- 10. 心里话 ---------- */
.letter {
  position: relative;
  padding: 30px 22px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.letter__pin {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  filter: drop-shadow(0 4px 10px rgba(255, 122, 179, .5));
}

.letter__body p {
  position: relative;
  margin: 0 0 16px;
  padding-left: 20px;
  font-family: var(--font-serif);
  font-size: clamp(15px, 4.4vw, 17px);
  color: #f3e9ff;
}

.letter__body p::before {
  content: "";
  position: absolute;
  left: 0; top: .95em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

.letter__body p:last-child { margin-bottom: 0; }

.letter__sign {
  margin: 22px 0 0;
  text-align: right;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- 11. 告白区 ---------- */
.sec-ask { padding-bottom: 92px; }

.ask {
  padding: 34px 20px 30px;
  border-radius: var(--r-lg);
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(255, 122, 179, .22), transparent 70%),
    var(--card-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ask__pre { margin: 0 0 8px; font-size: 13px; color: var(--text-dim); letter-spacing: .1em; }

.ask__title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 8vw, 36px);
  background: linear-gradient(100deg, #fff, var(--pink) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ask__sub { margin: 0 0 30px; font-size: 14px; color: var(--text-dim); }

.ask__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.btn {
  min-height: 50px;
  padding: 12px 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  transition: transform .25s var(--ease), box-shadow .3s, background .3s, opacity .3s;
}

.btn:active { transform: scale(.96); }

.btn--yes {
  min-width: 68%;
  color: #4a1030;
  background: linear-gradient(100deg, var(--pink), var(--rose) 55%, var(--purple));
  box-shadow: 0 12px 30px rgba(255, 122, 179, .38);
  animation: pulse 2.6s ease-in-out infinite;
}

.btn--yes:hover { box-shadow: 0 16px 38px rgba(255, 122, 179, .55); }

@keyframes pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.btn--no {
  min-width: 56%;
  color: var(--text-dim);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  position: relative;
  transition: left .28s var(--ease), top .28s var(--ease), transform .18s, background .3s;
}

/* 桌面端：鼠标靠近时“害羞闪躲” */
@media (hover: hover) and (pointer: fine) {
  .btn--no { position: relative; left: 0; top: 0; }
}

.btn--no.is-dodge { color: var(--pink); border-color: rgba(255, 159, 208, .45); }

.btn--ghost {
  margin-top: 22px;
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--border);
}

.ask__foot { margin: 22px 0 0; font-size: 12px; color: rgba(203, 183, 234, .7); }

/* ---------- 12. 页脚 ---------- */
.footer {
  position: relative;
  z-index: 2;
  padding: 0 0 calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
  color: rgba(203, 183, 234, .6);
}

/* ---------- 13. 开场信封封面 ---------- */
.cover {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background:
    radial-gradient(700px 500px at 50% 45%, rgba(255, 122, 179, .26), transparent 65%),
    linear-gradient(180deg, #1b1040, #0d0722);
  transition: opacity .8s var(--ease), transform .8s var(--ease), visibility .8s;
}

.cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.08);
  pointer-events: none;
}

.cover__inner { text-align: center; padding: 24px; }

.cover__tip {
  margin: 0 0 30px;
  font-family: var(--font-serif);
  font-size: clamp(16px, 5vw, 21px);
  color: var(--text-dim);
  letter-spacing: .08em;
  animation: fadeUp 1s var(--ease) both;
}

.cover__go {
  margin: 34px 0 0;
  font-size: 13px;
  letter-spacing: .28em;
  color: var(--gold);
  animation: softPulse 1.8s ease-in-out infinite;
}

@keyframes softPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

.envelope {
  position: relative;
  display: block;
  width: min(76vw, 260px);
  aspect-ratio: 3 / 2;
  perspective: 900px;
  animation: floatY 3.4s ease-in-out infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.envelope__body,
.envelope__flap {
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

.envelope__body {
  background: linear-gradient(150deg, #fff0f7, #ffd3e8 45%, #e7d6ff);
  box-shadow: 0 20px 40px rgba(255, 122, 179, .3), inset 0 0 40px rgba(255, 255, 255, .6);
  overflow: hidden;
}

.envelope__line {
  position: absolute;
  inset: 0;
  border-left: 1px solid rgba(255, 122, 179, .35);
}

.envelope__line:nth-child(1) { transform: rotate(0deg); clip-path: polygon(0 0, 100% 55%, 0 100%); }
.envelope__line:nth-child(2) { clip-path: polygon(100% 0, 100% 100%, 0 100%); border-left: 0; }

.envelope__flap {
  height: 56%;
  bottom: auto;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(160deg, #ffe6f2, #f4dcff);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform .85s var(--ease), filter .85s;
  z-index: 2;
  box-shadow: 0 6px 14px rgba(120, 40, 90, .12);
}

.envelope__seal {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 3;
  width: 46px; height: 46px;
  margin-left: -23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: linear-gradient(140deg, var(--rose), #b06cff);
  box-shadow: 0 6px 18px rgba(255, 122, 179, .5);
  transition: transform .6s var(--ease), opacity .6s;
}

.envelope__shine {
  position: absolute;
  left: -30%;
  top: -50%;
  width: 40%;
  height: 200%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  z-index: 4;
  opacity: 0;
  pointer-events: none;
}

.envelope.is-open .envelope__flap { transform: rotateX(172deg); filter: brightness(.94); }
.envelope.is-open .envelope__seal { transform: translateY(-6px) scale(0); opacity: 0; }
.envelope.is-open .envelope__shine { animation: sweep 1s ease-out; }
.envelope.is-open { animation: pop .8s var(--ease); }

@keyframes sweep {
  0% { left: -30%; opacity: .9; }
  100% { left: 110%; opacity: 0; }
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ---------- 14. 成功弹层 ---------- */
.success {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 4, 24, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}

.success.is-show { opacity: 1; visibility: visible; }

.success__card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 38px 24px 30px;
  text-align: center;
  border-radius: var(--r-lg);
  background:
    radial-gradient(500px 240px at 50% 0%, rgba(255, 122, 179, .3), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 159, 208, .35);
  box-shadow: 0 24px 60px rgba(20, 8, 48, .6);
  transform: translateY(26px) scale(.96);
  transition: transform .6s var(--ease);
}

.success.is-show .success__card { transform: none; }

.success__ring {
  position: absolute;
  inset: -1px;
  border-radius: var(--r-lg);
  pointer-events: none;
  box-shadow: 0 0 40px rgba(255, 122, 179, .4) inset;
}

.success__icon { margin: 0 0 6px; font-size: 46px; }

.success__title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(21px, 6.4vw, 27px);
  color: #fff;
}

.success__text { margin: 0 0 6px; font-size: 15px; color: #f3e6ff; }
.success__tip { margin: 0; font-size: 12px; color: rgba(203, 183, 234, .75); }

/* ---------- 15. 滚动渐显 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

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

/* ---------- 16. 响应式增强：平板 / 桌面 ---------- */
@media (min-width: 768px) {
  .container { padding: 0 32px; }
  .section { padding: 96px 0; }

  .hero__avatar { width: 128px; height: 128px; font-size: 48px; }

  .timeline::before { left: 50%; transform: translateX(-50%); }

  .tl-item { width: 50%; padding-right: 40px; }
  .tl-item::before { left: auto; right: -40px; top: 26px; }
  .tl-item::after { left: auto; right: -34px; top: 23px; }

  .tl-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 40px;
  }

  .tl-item:nth-child(even)::before { right: auto; left: -40px; }
  .tl-item:nth-child(even)::after { right: auto; left: -34px; }

  .letter { padding: 44px 44px 34px; }
  .ask { padding: 46px 40px 40px; }

  .ask__actions { flex-direction: row; justify-content: center; align-items: center; gap: 20px; }
  .btn--yes, .btn--no { min-width: 180px; }

  .cover__tip { margin-bottom: 40px; }
}

@media (min-width: 1024px) {
  .hero__sub { font-size: 16px; }
  .tl-card { padding: 18px; }
}

/* ---------- 17. 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
