/* ============================================================
   我们的十年 · 我爱你
   暖色手账拍立得风 · 移动端优先
   ============================================================ */

:root {
  --cream: #FFF6EC;
  --peach: #FFD9C7;
  --pink: #FF9FB2;
  --pink-deep: #F26D8D;
  --pink-dark: #E85D75;
  --gold: #E8A33D;
  --brown: #6B4F3F;
  --brown-2: #8A6A55;
  --ink: #4A3728;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "DFKai-SB", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.6;
}

/* 纸面质感 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(180, 140, 110, .06) 1px, transparent 1.2px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

::selection { background: #FFD9C7; color: #7A3A4A; }

/* 入场前锁定滚动 */
body.locked { overflow: hidden; }

/* ============ 阅读进度条 ============ */
.progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0;
  background: linear-gradient(90deg, #F26D8D, #E8A33D);
  z-index: 90; border-radius: 0 3px 3px 0;
}

/* ============ 音乐按钮 ============ */
.music-btn {
  position: fixed; bottom: 20px; left: 16px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  border: none; cursor: pointer;
  background: #fff; font-size: 20px;
  box-shadow: 0 6px 16px rgba(90, 60, 40, .18);
  transition: transform .2s;
}
.music-btn:active { transform: scale(.92); }
.music-btn.playing { animation: musicPulse 1.8s ease-in-out infinite; }
.music-btn.paused { filter: grayscale(.6); opacity: .8; }
@keyframes musicPulse {
  0%   { box-shadow: 0 0 0 0 rgba(242, 109, 141, .45); }
  70%  { box-shadow: 0 0 0 14px rgba(242, 109, 141, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 109, 141, 0); }
}

/* ============ 一二布布角落贴纸 ============ */
.bubu-corner {
  position: fixed; z-index: 55;
  width: 76px; border-radius: 12px;
  box-shadow: 0 6px 14px rgba(90, 60, 40, .18);
  cursor: pointer;
  animation: bob 4.5s ease-in-out infinite;
}
.bubu-tl { top: 10px; left: 8px; animation-delay: 0s; }
.bubu-br { bottom: 10px; right: 8px; animation-delay: -2.2s; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* ============ 封面 ============ */
.cover {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #FFEBDD 0%, #FFDCCB 35%, #FFC9C9 70%, #FFD9C7 100%);
  transition: opacity .9s ease, visibility .9s ease;
  text-align: center;
}
.cover.done { opacity: 0; visibility: hidden; pointer-events: none; }
.cover-inner {
  position: relative; z-index: 2;
  padding: 0 24px;
  animation: coverIn 1.3s ease both;
}
@keyframes coverIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.cover-date {
  font-family: var(--kai);
  font-size: 14px; letter-spacing: 4px;
  color: var(--brown-2); margin-bottom: 20px;
}
.cover-title {
  font-size: clamp(40px, 12.5vw, 88px);
  font-weight: 800; letter-spacing: 8px;
  color: #7A4A3A;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .65);
  margin-bottom: 12px;
  white-space: nowrap;
}
.cover-sub {
  font-family: var(--kai);
  font-size: 22px; letter-spacing: 8px;
  color: var(--pink-dark); margin-bottom: 16px;
}
.cover-bday {
  font-family: var(--kai);
  font-size: 17px; letter-spacing: 5px;
  color: #D98A2B; margin-bottom: 40px;
}
.start-btn {
  border: none; cursor: pointer;
  padding: 15px 46px; border-radius: 999px;
  background: linear-gradient(135deg, #FF9FB2, #F26D8D);
  color: #fff; font-size: 18px; letter-spacing: 6px;
  font-family: var(--sans); font-weight: 600;
  box-shadow: 0 10px 26px rgba(242, 109, 141, .42);
  transition: transform .2s, box-shadow .2s;
}
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(242, 109, 141, .5); }
.start-btn:active { transform: scale(.96); }
.cover-hint {
  margin-top: 20px; font-size: 12px;
  color: var(--brown-2); opacity: .8; letter-spacing: 2px;
}
.cover-hearts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cover-hearts .heart {
  position: absolute; bottom: -50px;
  color: rgba(242, 109, 141, .45);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  from { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: .9; }
  to   { transform: translateY(-115vh) rotate(40deg); opacity: 0; }
}

/* ============ 主内容 ============ */
main {
  position: relative; z-index: 1;
  opacity: 0; transition: opacity 1.2s ease;
}
body.started main { opacity: 1; }

section { padding: 84px 20px 30px; }
.wrap { max-width: 1060px; margin: 0 auto; }

.section-title {
  text-align: center;
  font-size: clamp(27px, 6vw, 40px);
  font-weight: 800; letter-spacing: 6px;
  color: #7A4A3A;
}
.section-title::after {
  content: "♥";
  display: block; font-size: 15px;
  color: var(--pink); margin-top: 12px; opacity: .85;
}
.section-sub {
  text-align: center; margin-top: 8px;
  font-family: var(--kai); font-size: 15px;
  color: var(--brown-2); letter-spacing: 2px;
}

/* ============ 序章 ============ */
.prologue {
  min-height: 66vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 18px;
}
.prologue-line {
  font-family: var(--kai);
  font-size: clamp(20px, 5.4vw, 27px);
  color: var(--brown); letter-spacing: 3px;
  line-height: 1.9;
}
.prologue-heart { font-size: 22px; color: var(--pink); }

/* ============ 时间线 ============ */
.timeline { position: relative; max-width: 1060px; margin: 0 auto; padding-top: 60px; }
.timeline::before {
  content: ""; position: absolute;
  left: 22px; top: 96px; bottom: 30px; width: 3px;
  background: linear-gradient(#FFC9C9, #FFD9A0 50%, #FFC9C9);
  border-radius: 2px; opacity: .75;
}
.chapter {
  position: relative;
  padding: 46px 0 16px 56px;
}
.chapter::before {
  content: ""; position: absolute;
  left: 14px; top: 70px;
  width: 19px; height: 19px;
  background: #fff; border: 4px solid var(--pink);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(90, 60, 40, .18);
}
.chapter-head {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 6px 14px;
}
.chapter-badge {
  align-self: center;
  background: #FFE3E9; color: var(--pink-dark);
  font-size: 12px; letter-spacing: 2px;
  padding: 3px 12px; border-radius: 999px;
  white-space: nowrap;
}
.chapter-years {
  font-weight: 800;
  font-size: clamp(26px, 6.5vw, 38px);
  background: linear-gradient(120deg, #F26D8D, #E8A33D);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.chapter-title {
  font-size: 18px; font-weight: 700; color: var(--brown);
  letter-spacing: 2px;
}
.chapter-text {
  font-family: var(--kai);
  font-size: 17px; line-height: 2;
  color: var(--brown); margin: 14px 0 24px;
  max-width: 640px;
}
.chapter-wait {
  font-family: var(--kai);
  font-size: 20px; color: var(--brown-2);
  margin-top: 26px; letter-spacing: 3px;
}
.cursor { color: var(--pink-dark); animation: blink 1.1s step-end infinite; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* 照片墙（错落有致） */
.photos {
  columns: 2 150px; column-gap: 14px;
  margin-top: 4px;
}
.photos.row3 {
  columns: unset;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: start;
}
.polaroid, .media-card {
  display: inline-block; width: 100%;
  break-inside: avoid; margin-bottom: 18px;
  background: #fff; border-radius: 8px;
  padding: 8px 8px 12px;
  box-shadow: 0 10px 24px rgba(90, 60, 40, .14);
}
.polaroid {
  position: relative;
  transform: rotate(var(--r, 0deg));
  transition: transform .35s ease, box-shadow .35s ease;
  cursor: zoom-in;
}
.polaroid::before {
  content: ""; position: absolute;
  top: -10px; left: 50%; z-index: 2;
  width: 72px; height: 22px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 214, 165, .68);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
}
.polaroid:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 0 16px 34px rgba(90, 60, 40, .22);
  z-index: 3;
}
.polaroid img {
  display: block; width: 100%; height: auto;
  border-radius: 4px; background: #F3E7DA;
}
.polaroid figcaption, .media-card figcaption {
  font-family: var(--kai);
  font-size: 13.5px; text-align: center;
  color: var(--brown-2);
  padding-top: 9px; letter-spacing: 1px;
}
.media-card video {
  display: block; width: 100%; max-height: 480px;
  border-radius: 6px; background: #000;
}
.photos.row3 .polaroid { padding: 6px 6px 10px; margin-bottom: 0; }
.photos.row3 .polaroid figcaption { font-size: 11.5px; padding-top: 6px; }

/* ============ 一二布布 · 背景散落 ============ */
.bubu-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bbg {
  position: absolute; border-radius: 14px;
  opacity: .14;
  animation: bob 7s ease-in-out infinite;
}
.bbg-gif { opacity: .24; }
.bbg1 { top: 14%; left: -14px; width: 92px; transform: rotate(-10deg); animation-delay: -1s; }
.bbg2 { top: 5%; right: 10%; width: 80px; transform: rotate(12deg); animation-delay: -3s; }
.bbg3 { top: 26%; right: -16px; width: 94px; transform: rotate(9deg); animation-delay: -2.5s; }
.bbg4 { top: 40%; left: -18px; width: 78px; transform: rotate(7deg); animation-delay: -4s; }
.bbg5 { top: 53%; right: -14px; width: 88px; transform: rotate(-8deg); animation-delay: -5.5s; }
.bbg6 { top: 66%; left: -16px; width: 92px; transform: rotate(6deg); animation-delay: -6s; }
.bbg7 { top: 79%; right: -10px; width: 84px; transform: rotate(-6deg); animation-delay: -2s; }
.bbg8 { top: 92%; left: 16%; width: 72px; transform: rotate(8deg); animation-delay: -6.5s; }
.bbg9 { top: 9%; left: 15%; width: 64px; transform: rotate(-5deg); animation-delay: -4.5s; }
.bbg10 { top: 33%; left: 6%; width: 90px; transform: rotate(4deg); animation-delay: -1.5s; }
.bbg11 { top: 60%; left: 3%; width: 80px; transform: rotate(-4deg); animation-delay: -3.5s; }
.bbg12 { top: 46%; right: 3%; width: 82px; transform: rotate(-7deg); animation-delay: -5s; }
.bbg13 { top: 87%; right: 16%; width: 66px; transform: rotate(6deg); animation-delay: -2s; }
.bbg14 { top: 20%; right: 22%; width: 64px; animation-delay: -1s; }
.bbg15 { top: 56%; right: 26%; width: 58px; animation-delay: -3s; }
.bbg16 { top: 74%; left: 14%; width: 60px; animation-delay: -4s; }

/* ============ 柔和引导语 ============ */
.flow-line {
  text-align: center;
  font-family: var(--kai);
  font-size: 18px; letter-spacing: 3px;
  color: var(--brown); margin: 0 auto 40px;
  max-width: 660px; line-height: 2;
}
.flow-line::before { content: "♥ "; color: var(--pink); opacity: .8; }
.flow-line::after  { content: " ♥"; color: var(--pink); opacity: .8; }

/* ============ 一起经历的时光（记忆卡片） ============ */
.moments { max-width: 1060px; margin: 0 auto; }
.mem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.mem-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 24px rgba(90, 60, 40, .10);
  transition: transform .3s ease, box-shadow .3s ease;
}
.mem-card.anime { border-top: 5px solid var(--accent); cursor: pointer; }
.mem-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(90, 60, 40, .16);
}
.mem-img { aspect-ratio: 4 / 3; overflow: hidden; background: #F3E7DA; }
.mem-card.anime .mem-img img { object-position: center 24%; }
.mem-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mem-body { padding: 14px 16px 18px; }
.mem-tag {
  font-size: 11.5px; letter-spacing: 2px;
  color: var(--accent); display: block; margin-bottom: 6px;
}
.mem-body h3 { font-size: 17px; letter-spacing: 2px; color: var(--ink); margin-bottom: 6px; }
.mem-body p {
  font-family: var(--kai);
  font-size: 13.5px; line-height: 1.75;
  color: var(--brown-2);
}

/* ============ 生日祝福图 ============ */
.bday-cards {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.bday-card {
  background: #fff; border-radius: 14px;
  padding: 10px 10px 14px;
  box-shadow: 0 10px 24px rgba(90, 60, 40, .10);
  text-align: center;
  transition: transform .3s ease;
}
.bday-card:hover { transform: translateY(-4px); }
.bday-card img { width: 100%; height: auto; border-radius: 8px; background: #F3E7DA; }
.bday-card figcaption {
  font-family: var(--kai); font-size: 14px;
  color: var(--brown-2); padding-top: 10px; letter-spacing: 1px;
}

/* ============ 小游戏：接住我们的时光 ============ */
.game { max-width: 1060px; margin: 0 auto; text-align: center; }
.game-stage {
  position: relative; width: min(380px, 100%); margin: 30px auto 0;
  border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, #FFF1DF, #FFE2CC);
  box-shadow: 0 14px 30px rgba(120, 80, 50, .18);
  border: 3px solid #F7C9B4;
}
.game-stage canvas { display: block; width: 100%; height: auto; touch-action: none; }
.game-overlay {
  position: absolute; inset: 0;
  background: rgba(255, 246, 236, .92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  padding: 20px; text-align: center;
  transition: opacity .35s ease, visibility .35s ease;
}
.go-title { font-family: var(--kai); font-size: 23px; color: var(--brown); letter-spacing: 2px; }
.go-sub { font-size: 13px; color: var(--brown-2); }
.go-score { font-family: var(--kai); font-size: 20px; color: var(--pink-dark); letter-spacing: 2px; }
.go-combo { font-family: var(--kai); font-size: 15px; color: var(--brown-2); letter-spacing: 1px; }
.game-hint { margin-top: 14px; font-size: 13px; color: var(--brown-2); letter-spacing: 1px; }
.hidden { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.gacha { max-width: 1060px; margin: 0 auto; text-align: center; }
.gacha-machine {
  width: 212px; margin: 42px auto 8px; position: relative;
}
.gacha-dome {
  height: 122px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.98), rgba(255,226,236,.8) 62%, rgba(255,190,210,.95));
  border: 4px solid #F2A9B8; border-bottom: none;
  border-radius: 116px 116px 0 0;
}
.ball {
  position: absolute; bottom: -8px;
  width: 23px; height: 23px; border-radius: 50%;
  box-shadow: inset -3px -4px 6px rgba(0,0,0,.14), inset 3px 3px 6px rgba(255,255,255,.85);
}
.b1 { left: 14%; background: #F26D8D; }
.b2 { left: 31%; background: #E8A33D; }
.b3 { left: 48%; background: #7FB5E8; }
.b4 { left: 65%; background: #8AC46A; }
.b5 { left: 82%; background: #B48CE0; }
.b6 { left: 22%; bottom: 16px; background: #F6C34E; width: 19px; height: 19px; }
.gacha-body {
  height: 128px; position: relative;
  background: linear-gradient(#FFC9D4, #F79FB4);
  border: 4px solid #E88FA6; border-top: none;
  border-radius: 0 0 26px 26px;
}
.gacha-slot {
  position: absolute; top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 9px;
  background: #7A4A5A; border-radius: 4px;
}
.gacha-knob {
  position: absolute; right: 26px; top: 36px;
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF, #F2C9A0 70%, #E0A878);
  box-shadow: 0 3px 6px rgba(0,0,0,.22);
}
.gacha-chute {
  width: 62px; height: 34px; margin: -4px auto 0;
  background: linear-gradient(#C7788C, #B9677D);
  border-radius: 0 0 14px 14px;
}
.gacha-machine.shaking .gacha-dome { animation: domeShake .55s ease; }
.gacha-machine.shaking .ball { animation: ballJump .55s ease; }
.gacha-machine.shaking .gacha-chute { animation: chutePulse .55s ease; }
@keyframes domeShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-1.5deg); }
  45% { transform: translateX(6px) rotate(1.5deg); }
  70% { transform: translateX(-4px) rotate(-1deg); }
  90% { transform: translateX(3px); }
}
@keyframes ballJump {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-16px); }
}
@keyframes chutePulse {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.18); }
}
.pill-btn {
  border: none; cursor: pointer;
  padding: 14px 42px; border-radius: 999px;
  background: linear-gradient(135deg, #FF9FB2, #F26D8D);
  color: #fff; font-size: 16px; letter-spacing: 5px;
  font-family: var(--sans); font-weight: 600;
  box-shadow: 0 8px 20px rgba(242, 109, 141, .35);
  transition: transform .2s, box-shadow .2s;
  margin-top: 22px;
}
.pill-btn:hover { transform: translateY(-2px); }
.pill-btn:active { transform: scale(.96); }
.pill-btn.small { padding: 10px 28px; font-size: 14px; margin-top: 14px; }
.gacha-count {
  margin-top: 14px; font-size: 13px;
  color: var(--brown-2); letter-spacing: 1px;
}

/* ============ 情书 · 信封 ============ */
.letter-sec { max-width: 1060px; margin: 0 auto; }
.envelope-wrap {
  display: flex; justify-content: center;
  padding: 44px 0 20px; perspective: 900px;
}
.envelope {
  position: relative;
  width: min(320px, 84vw); height: 208px;
  cursor: pointer;
  transform-style: preserve-3d;
  filter: drop-shadow(0 16px 26px rgba(120, 80, 50, .28));
}
.envelope-flap {
  position: absolute; inset: 0; z-index: 4;
  background: linear-gradient(#F9E2C2, #EFC48E);
  -webkit-clip-path: polygon(0 0, 100% 0, 50% 54%);
  clip-path: polygon(0 0, 100% 0, 50% 54%);
  transform-origin: top center;
  transition: transform .65s ease;
  backface-visibility: hidden;
  border-radius: 8px 8px 0 0;
}
.envelope.open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
  transition-delay: .05s;
}
.envelope-seal {
  position: absolute; top: 46%; left: 50%; z-index: 5;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: #E85D75; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
  transition: opacity .3s, transform .3s;
}
.envelope.open .envelope-seal { opacity: 0; }
.envelope-front {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(#F7D8B0, #EFC795);
  -webkit-clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  border-radius: 8px;
}
.letter {
  position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1;
  background: #FFFDF6;
  border-radius: 6px;
  padding: 16px 16px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .5s ease .35s, transform .8s cubic-bezier(.2, .8, .3, 1) .1s;
  font-family: var(--kai);
  font-size: 14.5px; line-height: 1.9;
  color: #5C4632;
  max-height: 62vh;
  overflow-y: auto;
}
.envelope.open .letter { opacity: 1; transform: translateY(-118px); }
.letter p { margin: 0 0 4px; }
.letter-sign { text-align: right; margin-top: 10px; }

/* ============ 结尾 ============ */
.ending {
  padding: 100px 20px 90px; text-align: center;
}
.ending-title {
  font-size: clamp(32px, 9.5vw, 60px);
  font-weight: 800; letter-spacing: 6px;
  color: #7A4A3A;
}
.ending-cake {
  font-size: 46px; margin: 8px 0 2px;
  animation: bob 2.6s ease-in-out infinite;
}
.ending-sub {
  font-family: var(--kai);
  font-size: 24px; letter-spacing: 10px;
  color: var(--pink-dark); margin: 12px 0 30px;
}
.hug-row {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: 12px;
}
.hug-row .pill-btn { margin-top: 0; }
.ending-foot {
  margin-top: 34px; font-size: 13px;
  color: var(--brown-2); letter-spacing: 2px;
}
footer {
  position: relative; z-index: 1;
  text-align: center; padding: 20px 0 76px;
  color: #B49A85; font-size: 13px; letter-spacing: 2px;
}

/* ============ 灯箱 ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(40, 25, 15, .9);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  padding: 24px;
}
.lightbox.show { opacity: 1; visibility: visible; }
.lightbox figure { text-align: center; }
.lightbox img {
  max-width: 100%; max-height: 78vh;
  border-radius: 10px; background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.lightbox figcaption {
  margin-top: 14px; color: #FFE9D6;
  font-family: var(--kai); font-size: 16px; letter-spacing: 2px;
}

/* ============ 弹窗 ============ */
.modal {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(40, 25, 15, .5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  padding: 24px;
}
.modal.show { opacity: 1; visibility: visible; }
.modal-card {
  position: relative;
  background: #FFF9F1; border-radius: 18px;
  padding: 28px 22px 24px; text-align: center;
  width: min(350px, 92vw);
  animation: pop .35s ease;
}
@keyframes pop {
  from { transform: scale(.86); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.modal-close {
  position: absolute; top: 10px; right: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; cursor: pointer;
  background: #F3E2D0; color: var(--brown-2);
  font-size: 14px;
}
.modal-polaroid { transform: none; cursor: default; margin: 6px 0 2px; }
.modal-polaroid img {
  display: block; width: 100%; max-height: 46vh;
  object-fit: contain; border-radius: 4px; background: #F3E7DA;
}
.bubu-modal-img { width: 150px; border-radius: 14px; margin: 6px 0 16px; }
.bubu-secret {
  font-family: var(--kai);
  font-size: 17px; line-height: 1.9; color: #5C4632;
}
.bubu-secret.big {
  font-size: 27px; color: var(--pink-dark);
  letter-spacing: 5px; margin-top: 6px; font-weight: 700;
}

/* ============ 提示气泡 ============ */
.toast {
  position: fixed; left: 50%; bottom: 74px; z-index: 300;
  transform: translateX(-50%) translateY(16px);
  background: rgba(74, 55, 40, .92); color: #FFF6EC;
  padding: 10px 22px; border-radius: 999px;
  font-size: 14px; letter-spacing: 1px;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 彩带画布 ============ */
#confetti {
  position: fixed; inset: 0; z-index: 400;
  pointer-events: none;
}

/* ============ 滚动显现 ============ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============ 桌面端 ============ */
@media (min-width: 860px) {
  section { padding: 110px 32px 40px; }
  .chapter { padding: 60px 0 20px 70px; }
  .timeline::before { left: 30px; }
  .chapter::before { left: 22px; }
  .photos { columns: 3 210px; column-gap: 18px; }
  .chapter-text { font-size: 18px; }
  .cover-title { letter-spacing: 14px; }
  .bubu-corner { width: 96px; }
  .bubu-tl { top: 14px; left: 12px; }
  .bubu-br { bottom: 14px; right: 12px; }
  .prologue-line { font-size: 30px; }
}

/* ============ 减少动效偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
