:root {
  --bg-color: #FFF9F3;
  --bg-soft: #FBF3EA;
  --apricot: #F6E3D0;
  --rose: #E8B4B8;
  --rose-deep: #D48A8F;
  --gold: #D4AF7A;
  --gold-deep: #B98A5A;
  --ink: #4A3B36;
  --ink-soft: #7A655C;
  --line: #EAD9C2;
  --paper: #FFFDF8;
  --shadow: 0 14px 34px rgba(176, 136, 96, 0.12);
  --serif: "Noto Serif SC", serif;
  --sans: "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 6%, rgba(232, 180, 184, 0.28), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(212, 175, 122, 0.22), transparent 32%),
    linear-gradient(180deg, #FFFDF8 0%, #FFF9F3 60%, #FBF1E5 100%);
}

/* 开场前置页：先隐藏正式页面，点击拆开祝福后再显示 */
body.intro-active {
  overflow: hidden;
}

.page-shell,
.background-glow,
.cake-watermark,
.music-hint,
iframe[title="背景音乐播放器"] {
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

body.intro-active .page-shell,
body.intro-active .background-glow,
body.intro-active .cake-watermark,
body.intro-active .music-hint,
body.intro-active iframe[title="背景音乐播放器"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ============ 访问口令门 ============ */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 253, 248, 0.9), transparent 60%),
    radial-gradient(circle at 15% 20%, rgba(232, 180, 184, 0.35), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(212, 175, 122, 0.3), transparent 42%),
    linear-gradient(160deg, #FFF9F3, #FBF0E2);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.gate-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  width: min(480px, 100%);
  padding: 42px 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  text-align: center;
  animation: gateCardIn 0.5s ease both;
}

.gate-eyebrow {
  margin: 0 0 14px;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
}

.gate-question {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: var(--ink);
  line-height: 1.4;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
}

.gate-form .gate-input {
  margin-bottom: 0;
  text-align: center;
}

.gate-button {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.gate-error {
  margin: 14px 0 0;
  color: var(--rose-deep);
  font-size: 0.92rem;
}

/* 口令未通过前暂停开场动画，通过后从「飞入」重新开始 */
body.gate-active .flying-letter,
body.gate-active .letter-shadow,
body.gate-active .letter-flap-vintage,
body.gate-active .letter-greeting,
body.gate-active .cake-intro,
body.gate-active .receive-action {
  animation-play-state: paused;
}

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

/* ============ 背景装饰 ============ */
.background-glow {
  position: fixed;
  z-index: 0;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}

.glow-left {
  top: -110px;
  left: -120px;
  background: rgba(232, 180, 184, 0.5);
}

.glow-right {
  right: -140px;
  bottom: -120px;
  background: rgba(212, 175, 122, 0.4);
}

.cake-watermark {
  position: fixed;
  right: -60px;
  bottom: -80px;
  z-index: 0;
  width: 440px;
  opacity: 0.05;
  pointer-events: none;
}

.cake-watermark svg {
  width: 100%;
  height: auto;
}

.music-hint {
  position: fixed;
  right: 16px;
  bottom: 108px;
  z-index: 20;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* ============ 页面主体 ============ */
.page-shell {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero-card,
.counter-card,
.stat-card,
.moments-card,
.drops-card,
.timeline-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card,
.counter-card,
.moments-card,
.drops-card,
.timeline-card {
  padding: 36px;
  margin-bottom: 24px;
}

/* 纸卡质感：细边框 + 轻投影 + 顶部柔光 */
.hero-card::before,
.counter-card::before,
.moments-card::before,
.drops-card::before,
.timeline-card::before,
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), transparent 38%);
  pointer-events: none;
}

/* ============ 开场信封 ============ */
.intro-scene {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 253, 248, 0.9), transparent 60%),
    radial-gradient(circle at 18% 20%, rgba(232, 180, 184, 0.35), transparent 40%),
    radial-gradient(circle at 84% 78%, rgba(212, 175, 122, 0.3), transparent 42%),
    linear-gradient(160deg, #FFF9F3 0%, #FBF0E2 100%);
}

.intro-scene.dismissed {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.flying-letter {
  position: relative;
  width: min(92vw, 560px);
  aspect-ratio: 1.4 / 1;
  animation: letterFlyIn 2.9s cubic-bezier(0.22, 1, 0.25, 1) forwards;
  filter: drop-shadow(0 14px 30px rgba(120, 84, 56, 0.22));
}

.letter-shadow {
  position: absolute;
  inset: auto 18% -22px;
  height: 26px;
  background: rgba(120, 84, 56, 0.24);
  filter: blur(14px);
  border-radius: 50%;
  animation: shadowLanding 2.9s ease forwards;
}

.envelope-vintage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #FBF0E2;
  border-radius: 20px;
  box-shadow: 0 24px 50px rgba(120, 84, 56, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.envelope-vintage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(145deg, #E6C590, #C49A5C, #F0DCB4);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 7;
}

.envelope-inner-lining {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #F6E7D2, #EEDDC6);
  opacity: 0.5;
  border-radius: 20px;
  pointer-events: none;
  z-index: 1;
}

/* 展开后的内页（上 60%） */
.letter-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  z-index: 2;
  background: #FFFDF8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.letter-greeting {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.1rem, 3.4vw, 1.5rem);
  letter-spacing: 0.16em;
  color: var(--gold-deep);
  animation: contentReveal 0.6s ease 2.05s both;
}

.cake-intro {
  width: 38%;
  max-width: 210px;
  animation: cakeFloatIn 0.7s ease 2.1s both;
}

/* 信封口袋（下 40%） */
.envelope-pocket {
  position: absolute;
  top: 60%;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: linear-gradient(180deg, #FBF0E2, #F5E5D0);
  border-radius: 0 0 20px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 9%;
}

.handwriting-hint {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  color: var(--gold-deep);
  font-size: clamp(0.85rem, 3vw, 1.15rem);
  letter-spacing: 0.12em;
  text-align: center;
  opacity: 0.82;
  white-space: nowrap;
}

.wax-seal-romantic {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #D98A8F, #B96A6E);
  box-shadow: 0 6px 16px rgba(120, 60, 60, 0.3), inset 0 1px 2px rgba(255, 240, 220, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.seal-mark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFF4E6;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(120, 60, 60, 0.35);
}

.letter-flap-vintage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  z-index: 4;
  background: linear-gradient(150deg, #FFF7EA, #F6E7D2);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  backface-visibility: hidden;
  animation: flapOpen 1.1s ease 1.9s forwards;
  box-shadow: 0 2px 8px rgba(120, 84, 56, 0.12);
}

.golden-stardust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.star-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, #F4D9A4, #D4AF7A);
  border-radius: 50%;
  opacity: 0.75;
}

.star-dot:nth-child(1) { top: 16%; left: 10%; }
.star-dot:nth-child(2) { top: 24%; right: 13%; width: 5px; height: 5px; }
.star-dot:nth-child(3) { top: 44%; left: 7%; }
.star-dot:nth-child(4) { top: 52%; right: 9%; width: 3px; height: 3px; }
.star-dot:nth-child(5) { top: 8%; left: 46%; width: 3px; height: 3px; }
.star-dot:nth-child(6) { top: 36%; left: 20%; width: 5px; height: 5px; }

.receive-action {
  position: absolute;
  left: 50%;
  top: 82%;
  transform: translateX(-50%) scale(0.85);
  opacity: 0;
  animation: receiveReveal 0.9s ease 2.55s forwards;
  z-index: 3;
}

.receive-button {
  min-width: 168px;
  padding: 14px 38px;
  border: 0;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 700;
  color: #FFFDF8;
  background: linear-gradient(135deg, #E8B4B8, #D4AF7A);
  box-shadow: 0 12px 26px rgba(200, 140, 110, 0.35);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.receive-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(200, 140, 110, 0.42);
}

/* ============ 蛋糕插画（通用） ============ */
.cake-illustration {
  display: block;
  width: 100%;
  height: auto;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cake-flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flameFlicker 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(240, 162, 92, 0.6));
}

/* 主页面装饰蛋糕：火苗默认更轻微（更慢的摇曳），生日当天由 JS 放大 */
.cake-hero .cake-flame {
  animation-duration: 2.6s;
}

.cake-hero .cake-flame.birthday-flame {
  animation: flameFlickerBig 1.1s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(240, 162, 92, 0.9));
  cursor: pointer;
}

.cake-flame.blown-out {
  animation: none !important;
  opacity: 0;
  transform: scale(0.1);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.cake-smoke {
  opacity: 0;
}

.cake-smoke.show {
  animation: smokeRise 0.9s ease both;
}

.hero-cake-wrap {
  position: relative;
  width: 190px;
  max-width: 60%;
  margin: 0 auto 18px;
}

.blown-greeting {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translate(-50%, 0);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rose-deep);
  letter-spacing: 0.08em;
  white-space: nowrap;
  animation: greetingPop 0.5s ease both;
}

/* ============ 排版 ============ */
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-card h1,
.section-heading h2,
.stat-card h2 {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
}

.hero-card h1 {
  font-size: clamp(2.2rem, 5.6vw, 4rem);
  line-height: 1.14;
  letter-spacing: 0.02em;
}

.hero-card {
  text-align: center;
}

.hero-text {
  max-width: 700px;
  margin: 18px auto 0;
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--ink-soft);
}

.hero-dynamics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin-top: 22px;
}

.hero-dynamic {
  margin: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--apricot);
  color: var(--ink);
  font-size: 0.95rem;
}

.hero-dynamic strong {
  font-family: var(--serif);
  color: var(--rose-deep);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

/* ============ 按钮 ============ */
.primary-button,
.secondary-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease, border-color 0.28s ease;
  cursor: pointer;
  border: none;
}

.primary-button {
  background: linear-gradient(135deg, #E8B4B8, #D4AF7A);
  box-shadow: 0 10px 24px rgba(200, 140, 110, 0.3);
  color: #FFFDF8;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #FFFDF8;
  color: var(--ink);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-3px);
}

.primary-button:hover {
  box-shadow: 0 14px 30px rgba(200, 140, 110, 0.36);
}

.secondary-button:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 22px rgba(176, 136, 96, 0.16);
}

/* ============ 统计卡片 ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 28px;
}

.card-label {
  margin: 0;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.stat-card h2 {
  margin: 14px 0 12px;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.countdown-subtext {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ============ 计时器 ============ */
.timers-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.counter-card {
  margin-bottom: 0;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.counter-item {
  padding: 20px 10px;
  text-align: center;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.counter-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(176, 136, 96, 0.16);
}

.counter-item span {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.6vw, 2.8rem);
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.counter-item small {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.birthday-today {
  text-align: center;
  padding: 18px 0 4px;
}

.birthday-today-main {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 900;
  color: var(--rose-deep);
}

.birthday-today-sub {
  margin: 8px 0 0;
  color: var(--gold-deep);
  letter-spacing: 0.08em;
}

.together-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.together-total {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
}

.together-total span {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.together-total small {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ink-soft);
}

.together-note {
  margin: 14px 0 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ============ 心动瞬间 ============ */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.moment-item {
  padding: 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.moment-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(176, 136, 96, 0.16);
}

.moment-item h3 {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
}

.moment-item p {
  margin: 10px 0 0;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ============ 便签 ============ */
.drops-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 18px;
}

.drops-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.drops-search {
  margin-bottom: 18px;
}

.drops-status {
  margin: 12px 0 0;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.drops-status.shared {
  border-style: solid;
  border-color: var(--rose);
  background: rgba(232, 180, 184, 0.18);
  color: var(--ink);
}

.filter-chip {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FFFDF8;
  color: var(--ink);
  font-family: var(--sans);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.filter-chip:hover,
.filter-chip.active {
  transform: translateY(-2px);
  background: var(--rose);
  border-color: var(--rose);
  color: #FFFDF8;
}

.drops-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.drop-form {
  padding: 24px;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 0.95rem;
}

.text-field,
.upload-field {
  width: 100%;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFFDF8;
  color: var(--ink);
  font-family: var(--sans);
}

.text-field {
  padding: 13px 15px;
}

.text-field:focus {
  outline: none;
  border-color: var(--gold);
}

.text-field::placeholder {
  color: rgba(122, 101, 92, 0.55);
}

.text-area {
  min-height: 130px;
  resize: vertical;
}

.upload-field {
  padding: 11px;
}

.form-button {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.form-tip {
  margin: 14px 0 0;
  line-height: 1.75;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ghost-button {
  min-width: 124px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: transparent;
}

.drops-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 26px;
  align-items: start;
  position: relative;
}

.drops-list::before {
  content: "";
  position: absolute;
  left: calc(50% - 2px);
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232, 180, 184, 0.9), rgba(212, 175, 122, 0.85));
}

.drop-empty {
  grid-column: 1 / -1;
  padding: 24px;
  border-radius: 18px;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  text-align: center;
}

.drop-empty h3 {
  margin: 0;
  font-family: var(--serif);
}

.drop-empty p {
  margin: 10px 0 0;
  line-height: 1.8;
  color: var(--ink-soft);
}

.drop-item {
  position: relative;
  padding: 22px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.drop-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(176, 136, 96, 0.16);
}

.drop-left {
  margin-right: 26px;
}

.drop-right {
  margin-left: 26px;
  margin-top: 40px;
}

.drop-pin {
  position: absolute;
  top: 26px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #F6E3D0 38%, #D4AF7A 100%);
  box-shadow: 0 0 0 6px rgba(212, 175, 122, 0.16);
}

.drop-left .drop-pin {
  right: -36px;
}

.drop-right .drop-pin {
  left: -36px;
}

.drop-item::after {
  content: "";
  position: absolute;
  top: 34px;
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, rgba(232, 180, 184, 0.9), rgba(212, 175, 122, 0.9));
}

.drop-left::after {
  right: -26px;
}

.drop-right::after {
  left: -26px;
}

.drop-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 16px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.drop-image-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.drop-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.drop-meta h3 {
  margin: 0;
  font-family: var(--serif);
}

.drop-date {
  color: var(--gold-deep);
  font-size: 0.88rem;
  white-space: nowrap;
}

.drop-tag {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--rose);
  color: #FFFDF8;
  font-size: 0.85rem;
  font-weight: 700;
}

.drop-text {
  margin: 0;
  line-height: 1.8;
  color: var(--ink-soft);
}

.drop-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.drop-action {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FFFDF8;
  color: var(--ink);
  font-family: var(--sans);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.drop-action:hover {
  transform: translateY(-2px);
}

.edit-action:hover {
  background: var(--apricot);
  border-color: var(--gold);
}

.delete-action:hover {
  background: var(--rose);
  border-color: var(--rose-deep);
  color: #FFFDF8;
}

/* ============ 时间线 ============ */
.timeline-card {
  margin-top: 24px;
}

.timeline {
  position: relative;
  margin-top: 24px;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232, 180, 184, 0.95), rgba(212, 175, 122, 0.95));
}

.timeline-item {
  position: relative;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(26px);
  animation: revealUp 0.7s ease forwards;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 24px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #F6E3D0 35%, #D4AF7A 100%);
  box-shadow: 0 0 0 6px rgba(212, 175, 122, 0.16);
}

.timeline-content {
  padding: 20px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(176, 136, 96, 0.16);
}

.timeline-content h3,
.timeline-day {
  margin: 0;
}

.timeline-content h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
}

.timeline-content p {
  margin: 10px 0 0;
  line-height: 1.8;
  color: var(--ink-soft);
}

.timeline-day {
  color: var(--gold-deep);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.timeline-state {
  display: inline-flex;
  margin-top: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--apricot);
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.timeline-state.passed {
  background: var(--rose);
  color: #FFFDF8;
}

/* ============ 生日当天彩蛋 ============ */
.birthday-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding: 14px 20px;
  text-align: center;
  background: linear-gradient(135deg, #E8B4B8, #D4AF7A);
  color: #FFFDF8;
  font-family: var(--serif);
  font-size: clamp(1rem, 3.4vw, 1.4rem);
  letter-spacing: 0.08em;
  box-shadow: 0 8px 24px rgba(176, 110, 96, 0.3);
}

.birthday-stars {
  position: fixed;
  inset: 0;
  z-index: 31;
  pointer-events: none;
  overflow: hidden;
}

.birthday-star {
  position: absolute;
  top: -5vh;
  width: 12px;
  height: 12px;
  background: #D4AF7A;
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  opacity: 0;
  animation: starFall linear forwards;
}

/* ============ 灯箱 ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(74, 59, 54, 0.6);
  backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 28px));
  margin: 4vh auto 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #FFFDF8;
  box-shadow: 0 24px 60px rgba(74, 59, 54, 0.3);
  animation: fadeIn 0.35s ease both;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--apricot);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-image {
  display: block;
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 16px;
}

.lightbox-caption {
  padding: 18px 8px 6px;
}

.lightbox-caption h3,
.lightbox-caption p {
  margin: 0;
}

.lightbox-caption p {
  margin-top: 8px;
  color: var(--gold-deep);
}

/* ============ 动画 ============ */
.reveal {
  animation: fadeIn 0.9s ease 1.15s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gateCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes letterFlyIn {
  0% {
    opacity: 0;
    transform: translate3d(-60vw, -30vh, 0) rotate(-18deg) scale(0.7);
  }
  60% {
    opacity: 1;
    transform: translate3d(6vw, 14vh, 0) rotate(6deg) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, -4vh, 0) rotate(0deg) scale(1);
  }
}

@keyframes shadowLanding {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  70% {
    opacity: 0.3;
    transform: scale(1.08);
  }
  100% {
    opacity: 0.26;
    transform: scale(1);
  }
}

@keyframes flapOpen {
  0% {
    transform: rotateX(0deg);
  }
  100% {
    transform: rotateX(180deg);
  }
}

@keyframes contentReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cakeFloatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes receiveReveal {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes flameFlicker {
  0%, 100% {
    transform: scale(1, 1) rotate(0deg);
  }
  30% {
    transform: scale(0.92, 1.1) rotate(-2deg);
  }
  60% {
    transform: scale(1.06, 0.9) rotate(2deg);
  }
  80% {
    transform: scale(0.96, 1.05) rotate(-1deg);
  }
}

@keyframes flameFlickerBig {
  0%, 100% {
    transform: scale(1.75, 1.75) rotate(0deg);
  }
  30% {
    transform: scale(1.6, 1.92) rotate(-2deg);
  }
  60% {
    transform: scale(1.86, 1.6) rotate(2deg);
  }
  80% {
    transform: scale(1.68, 1.82) rotate(-1deg);
  }
}

@keyframes smokeRise {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  30% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translateY(-16px);
  }
}

@keyframes greetingPop {
  from {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes starFall {
  0% {
    transform: translate3d(0, -5vh, 0) rotate(0deg) scale(1);
    opacity: 0;
  }
  12% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(24px, 112vh, 0) rotate(360deg) scale(1);
    opacity: 0;
  }
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .stats-grid,
  .moments-grid,
  .timers-section,
  .counter-grid,
  .drops-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .drops-layout {
    grid-template-columns: 1fr;
  }
  .drops-list::before {
    left: 8px;
  }
  .drop-left,
  .drop-right {
    margin: 0 0 0 28px;
  }
  .drop-pin {
    left: -28px;
    right: auto;
  }
  .drop-item::after {
    left: -18px;
    width: 18px;
  }
  .form-actions {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding: 22px 0 40px;
  }
  .hero-card,
  .counter-card,
  .moments-card,
  .timeline-card,
  .stat-card {
    padding: 24px;
    border-radius: 20px;
  }
  .stats-grid,
  .moments-grid,
  .timers-section,
  .counter-grid,
  .drops-list {
    grid-template-columns: 1fr;
  }
  .timers-section {
    gap: 20px;
  }
  .counter-card {
    margin-bottom: 0;
  }
  .hero-actions {
    flex-direction: column;
  }
  .primary-button,
  .secondary-button {
    width: 100%;
  }
  .hero-dynamics {
    flex-direction: column;
    align-items: center;
  }
  .hero-cake-wrap {
    width: 150px;
  }
  .flying-letter {
    width: min(88vw, 400px);
  }
  .receive-action {
    top: 78%;
  }
  .receive-button {
    min-width: 150px;
    padding: 13px 28px;
  }
  .wax-seal-romantic {
    width: 46px;
    height: 46px;
  }
  .seal-mark {
    font-size: 1.2rem;
  }
  .ghost-button {
    width: 100%;
  }
  .drop-actions {
    flex-wrap: wrap;
  }
  .filter-chip {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
  .lightbox-dialog {
    margin-top: 2vh;
    padding: 12px;
    border-radius: 20px;
  }
  .music-hint {
    bottom: 104px;
  }
}

.lightbox-open {
  overflow: hidden;
}
