/* ============================================
   Anniversary T1: Premium anniversary template
   5 pages, fade transitions, ring ceremony, polaroids, game, quiz, letter
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Nunito:wght@400;600;700&family=Great+Vibes&display=swap');

body {
  --ann-font: 'Cormorant Garamond', Georgia, serif;
  --ann-font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  /* Anniversary gradient theme: deep plum → romantic rose → soft blush */
  --ann-dark: #160815;
  --ann-mid: #E0669A;
  --ann-accent: #FFB3C6;
  --ann-gold: #F8E3B0;
  --ann-rose: #FF8FB7;
  --ann-text: #FFF5F8;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--ann-font);
  color: var(--ann-text);
  -webkit-tap-highlight-color: transparent;
  background: var(--ann-dark);
}

/* ---- Background ---- */
/* ---- Cursor trail: hearts follow mouse ---- */
.ann-cursor-trail {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.ann-cursor-trail-heart {
  position: fixed;
  left: 0;
  top: 0;
  font-size: 1.25rem;
  line-height: 1;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}

.ann-cursor-trail.ann-cursor-trail-active .ann-cursor-trail-heart {
  opacity: 1;
}

.ann-cursor-trail.ann-cursor-trail-active .ann-cursor-trail-heart:nth-child(1) { opacity: 1; }
.ann-cursor-trail.ann-cursor-trail-active .ann-cursor-trail-heart:nth-child(2) { opacity: 0.9; }
.ann-cursor-trail.ann-cursor-trail-active .ann-cursor-trail-heart:nth-child(3) { opacity: 0.8; }
.ann-cursor-trail.ann-cursor-trail-active .ann-cursor-trail-heart:nth-child(4) { opacity: 0.7; }
.ann-cursor-trail.ann-cursor-trail-active .ann-cursor-trail-heart:nth-child(5) { opacity: 0.6; }
.ann-cursor-trail.ann-cursor-trail-active .ann-cursor-trail-heart:nth-child(6) { opacity: 0.5; }
.ann-cursor-trail.ann-cursor-trail-active .ann-cursor-trail-heart:nth-child(7) { opacity: 0.4; }
.ann-cursor-trail.ann-cursor-trail-active .ann-cursor-trail-heart:nth-child(8) { opacity: 0.35; }

/* Fade out hearts when cursor is idle */
.ann-cursor-trail.ann-cursor-trail-idle .ann-cursor-trail-heart {
  opacity: 0 !important;
}

.ann-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ann-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(180, 100, 140, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 90% 120% at 85% 85%, rgba(224, 102, 154, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse 90% 110% at 10% 70%, rgba(123, 54, 112, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse at center, #160815 0%, #0b050b 55%, #030104 100%);
}

.ann-bg-deco {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Floating anniversary elements in background */
.ann-bg-float {
  position: absolute;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  color: var(--ann-accent);
  opacity: 0.07;
  pointer-events: none;
  animation: annFloat 22s ease-in-out infinite;
}

.ann-bg-float:nth-child(1) { left: 8%; top: 15%; animation-delay: 0s; animation-duration: 20s; }
.ann-bg-float:nth-child(2) { left: 25%; top: 8%; animation-delay: -3s; animation-duration: 24s; animation-direction: reverse; }
.ann-bg-float:nth-child(3) { left: 45%; top: 12%; animation-delay: -6s; animation-duration: 26s; }
.ann-bg-float:nth-child(4) { right: 40%; top: 18%; left: auto; animation-delay: -2s; animation-duration: 21s; animation-direction: reverse; }
.ann-bg-float:nth-child(5) { right: 18%; top: 10%; left: auto; animation-delay: -5s; animation-duration: 23s; }
.ann-bg-float:nth-child(6) { right: 5%; top: 22%; left: auto; animation-delay: -7s; animation-duration: 25s; animation-direction: reverse; }
.ann-bg-float:nth-child(7) { left: 12%; bottom: 20%; top: auto; animation-delay: -4s; animation-duration: 22s; }
.ann-bg-float:nth-child(8) { left: 35%; bottom: 15%; top: auto; animation-delay: -1s; animation-duration: 27s; animation-direction: reverse; }
.ann-bg-float:nth-child(9) { right: 30%; bottom: 25%; left: auto; top: auto; animation-delay: -8s; animation-duration: 20s; }
.ann-bg-float:nth-child(10) { right: 8%; bottom: 12%; left: auto; top: auto; animation-delay: -2s; animation-duration: 24s; animation-direction: reverse; }
.ann-bg-float:nth-child(11) { left: 18%; top: 35%; animation-delay: -9s; animation-duration: 23s; animation-direction: reverse; }
.ann-bg-float:nth-child(12) { left: 52%; top: 28%; animation-delay: -4s; animation-duration: 21s; }
.ann-bg-float:nth-child(13) { right: 22%; top: 38%; left: auto; animation-delay: -6s; animation-duration: 25s; animation-direction: reverse; }
.ann-bg-float:nth-child(14) { left: 5%; top: 55%; animation-delay: -1s; animation-duration: 26s; }
.ann-bg-float:nth-child(15) { left: 42%; top: 48%; animation-delay: -5s; animation-duration: 22s; animation-direction: reverse; }
.ann-bg-float:nth-child(16) { right: 12%; top: 52%; left: auto; animation-delay: -3s; animation-duration: 24s; }
.ann-bg-float:nth-child(17) { left: 28%; bottom: 35%; top: auto; animation-delay: -7s; animation-duration: 20s; animation-direction: reverse; }
.ann-bg-float:nth-child(18) { left: 55%; bottom: 42%; top: auto; animation-delay: -2s; animation-duration: 27s; }
.ann-bg-float:nth-child(19) { right: 38%; bottom: 38%; left: auto; top: auto; animation-delay: -8s; animation-duration: 23s; animation-direction: reverse; }
.ann-bg-float:nth-child(20) { right: 15%; bottom: 28%; left: auto; top: auto; animation-delay: -4s; animation-duration: 21s; }

@keyframes annFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.06; }
  25% { transform: translate(18px, -12px) rotate(8deg); opacity: 0.1; }
  50% { transform: translate(-12px, 18px) rotate(-6deg); opacity: 0.05; }
  75% { transform: translate(14px, 10px) rotate(4deg); opacity: 0.09; }
}

/* Global wedding-card style corner frame */
.ann-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.ann-frame-corner {
  position: absolute;
  width: 230px;
  height: 180px;
  background-image: url("https://firebasestorage.googleapis.com/v0/b/my-bel0ved.firebasestorage.app/o/templates%2Fshared%2Fimages%2Fbg_corner_2.png?alt=media&token=adc18565-84fb-43be-a1fb-18941587c4c5");
  background-repeat: no-repeat;
  background-size: contain;
}

.ann-frame-corner-tl {
  top: 0;
  left: 0;
}

.ann-frame-corner-br {
  bottom: 0;
  right: 0;
  transform: scale(-1, -1);
  transform-origin: center;
}

/* ---- Mute button (visible on pages 2 & 3 while music plays) ---- */
.ann-mute-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--ann-text);
  font-size: 1.25rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ann-mute-btn.ann-mute-visible {
  display: flex;
}

.ann-mute-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.ann-mute-btn .ann-mute-btn-icon--muted {
  display: none;
}

.ann-mute-btn .ann-mute-btn-icon--unmuted {
  display: inline;
}

.ann-mute-btn.ann-mute-btn-muted .ann-mute-btn-icon--unmuted {
  display: none;
}

.ann-mute-btn.ann-mute-btn-muted .ann-mute-btn-icon--muted {
  display: inline;
}

/* ---- Page container: fade transitions ---- */
.ann-pages {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.ann-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ann-page-3 {
  padding-left: 0;
  padding-right: 0;
}

.ann-page-3::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 55%),
              radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8) 40%, rgba(0, 0, 0, 0.94) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 2.2s ease;
}

.ann-page-3.ann-page-active::before {
  opacity: 1;
}

.ann-page-3.ann-page-active .ann-p5-memories {
  position: relative;
}

.ann-page-3.ann-page-active .ann-p5-memories::before {
  content: none;
}

@keyframes annMemoryBorderGlow {
  0% {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35),
                0 0 0 0 rgba(255, 215, 128, 0.0);
  }
  50% {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55),
                0 0 16px 2px rgba(255, 215, 128, 0.9);
  }
  100% {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35),
                0 0 0 0 rgba(255, 215, 128, 0.0);
  }
}

.ann-page-3.ann-page-active .ann-p5-memory {
  animation: annMemoryBorderGlow 4s ease-in-out infinite;
}

.ann-page-3.ann-page-active .ann-p5-memories-thread,
.ann-page-3.ann-page-active .ann-p5-memories-track {
  position: relative;
  z-index: 1;
}

.ann-page.ann-page-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---- Buttons ---- */
.ann-btn {
  padding: 0.85rem 2rem;
  font-family: var(--ann-font);
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.ann-btn:hover {
  transform: scale(1.06) translateY(-3px);
}

.ann-btn:active {
  transform: scale(0.98) translateY(0);
}

.ann-btn-primary {
  background: linear-gradient(135deg, #d85a8f, #b53c74);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.ann-btn-primary:hover {
  background: linear-gradient(135deg, #b83d6d, #8f2d5a);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.ann-btn:active:hover {
  transform: scale(1.02) translateY(-1px);
}

/* Button corner ornaments: flowers rotate on hover */
.ann-btn::before,
.ann-btn::after {
  content: '✿';
  position: absolute;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
  transition: transform 0.25s ease;
}

.ann-btn::before {
  top: -0.3rem;
  left: 0.4rem;
  transform: rotate(-18deg);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.ann-btn:hover::before {
  animation: annBtnFlowerSpinLeft 2.4s linear infinite;
}

.ann-btn::after {
  bottom: -0.3rem;
  right: 0.4rem;
  transform: rotate(18deg);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.ann-btn:hover::after {
  animation: annBtnFlowerSpinRight 2.4s linear infinite;
}

@keyframes annBtnFlowerSpinLeft {
  from { transform: rotate(-18deg); }
  to { transform: rotate(342deg); }
}

@keyframes annBtnFlowerSpinRight {
  from { transform: rotate(18deg); }
  to { transform: rotate(378deg); }
}

.ann-btn-label {
  position: relative;
  display: inline-block;
}

.ann-btn-label::before,
.ann-btn-label::after {
  content: '✿';
  position: absolute;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
  transition: transform 0.25s ease;
}

/* Slightly far from bottom center towards left */
.ann-btn-label::before {
  bottom: -1.3rem;
  left: 23%;
  transform: rotate(12deg);
}

.ann-btn:hover .ann-btn-label::before {
  animation: annBtnLabelFlowerSpin 2.4s linear infinite;
}

/* Slightly far from top center towards right */
.ann-btn-label::after {
  top: -1.3rem;
  right: 23%;
  transform: rotate(-12deg);
}

.ann-btn:hover .ann-btn-label::after {
  animation: annBtnLabelFlowerSpinTop 2.4s linear infinite;
}

@keyframes annBtnLabelFlowerSpin {
  from { transform: rotate(12deg); }
  to { transform: rotate(372deg); }
}

@keyframes annBtnLabelFlowerSpinTop {
  from { transform: rotate(-12deg); }
  to { transform: rotate(348deg); }
}

.ann-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--ann-text);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.ann-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

/* ---- Page 1: Ring Ceremony ---- */
.ann-p1-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 90vw;
}

.ann-p1-hand-wrap {
  position: relative;
  width: 220px;
  height: 140px;
  margin-bottom: 1.5rem;
}

.ann-p1-finger-zone {
  position: absolute;
  left: 70%;
  top: 50%;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.ann-p1-hand {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.ann-p1-ring-slot {
  transform-origin: 60px 50px;
}

.ann-p1-ring {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 10;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}

.ann-p1-ring:active {
  cursor: grabbing;
}

.ann-p1-ring.ann-p1-ring-placed {
  cursor: default;
  pointer-events: none;
}

.ann-p1-ring-emoji {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 8px rgba(212, 165, 116, 0.5));
  transition: transform 0.2s ease;
}

.ann-p1-ring:hover .ann-p1-ring-emoji {
  transform: scale(1.1);
}

.ann-p1-ring.ann-p1-ring-placed .ann-p1-ring-emoji {
  transform: scale(1);
}

.ann-p1-quote {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ann-text);
  opacity: 0.95;
  max-width: 320px;
  line-height: 1.5;
}

/* Page 1 hero state (always visible) */
.ann-p1-success {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.ann-p1-center-frame {
  position: relative;
  padding: 1.75rem 2.25rem;
  max-width: 720px;
  width: 130%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  z-index: 1;
}

@media (max-width: 1020px) {
  .ann-p1-center-frame {
    width: 100%;
  }
}

.ann-p1-center-frame::before,
.ann-p1-center-frame::after {
  content: '';
  position: absolute;
  border-color: rgba(255, 245, 248, 0.7);
  border-style: solid;
  pointer-events: none;
}

/* Top-left corner frame */
.ann-p1-center-frame::before {
  top: -0.75rem;
  left: -0.75rem;
  width: 45%;
  height: 45%;
  border-width: 2px 0 0 2px;
  border-radius: 20px 0 0 0;
}

/* Bottom-right corner frame */
.ann-p1-center-frame::after {
  bottom: -0.75rem;
  right: -0.75rem;
  width: 45%;
  height: 45%;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 20px 0;
}

.ann-p1-corner-ornament {
  position: absolute;
  font-size: 1.6rem;
  color: rgba(243, 199, 124, 0.85);
  text-shadow: 0 0 16px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.ann-p1-corner-ornament-tl {
  top: -1.4rem;
  left: -1.1rem;
  transform: rotate(-18deg);
}

.ann-p1-corner-ornament-br {
  bottom: -1.4rem;
  right: -1.1rem;
  transform: rotate(18deg);
}

.ann-p1-corner-ornament::before {
  content: '✿';
}

.ann-p1-couple-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.ann-p1-couple-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) scale(1);
  filter: blur(0);
  transition: filter 2.5s ease, transform 2.5s ease;
}

.ann-page-1.ann-p1-bg-expanded .ann-p1-couple-img {
  filter: blur(10px);
  transform: translate(-50%, -50%) scale(1.3);
}

.ann-p1-anniversary-text {
  text-align: center;
  margin-bottom: 2rem;
  animation: annFadeUp 0.8s ease 0.2s both;
}

.ann-p1-title {
  font-family: var(--ann-font-display);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.ann-p1-year-number {
  font-size: clamp(3rem, 12vw, 5rem);
  font-weight: 600;
  line-height: 1;
  display: inline-block;
  opacity: 0;
  color: var(--ann-gold);
}

.ann-p1-year-suffix {
  position: absolute;
  top: .5em;
  right: -.4em;
  font-size: 0.4em;
  font-weight: 400;
  opacity: 0;
  color: var(--ann-gold);
}

.ann-p1-year {
  position: relative;
  display: inline-block;
}

.ann-p1-year::before {
  content: '\2009';
  visibility: hidden;
}

.ann-p1-year.ann-p1-year-has-value::before {
  content: '';
}

.ann-p1-year-animate .ann-p1-year-number {
  animation: annYearZoomOut 0.9s ease 0.9s both;
}

.ann-p1-year-animate .ann-p1-year-suffix {
  animation: annYearSuffixFade 0.9s ease 0.9s both;
}

/* Monthiversary / custom hero label (no ordinal suffix) */
.ann-p1-year-custom .ann-p1-year-custom-inner {
  font-size: clamp(2.25rem, 10vw, 4.25rem);
  line-height: 1.05;
  max-width: min(92vw, 22rem);
}

/* Static “Months” next to animated month number (e.g. 7th) */
.ann-p1-hero-month-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.12em;
  vertical-align: baseline;
}

.ann-p1-months-static {
  font-family: var(--ann-font-display);
  font-size: 1em;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
  white-space: nowrap;
}

@keyframes annYearZoomOut {
  from {
    opacity: 0;
    transform: scale(1.4) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes annYearSuffixFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ann-p1-emoji {
  font-size: 2rem;
}

.ann-p1-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.ann-p1-name {
  font-family: var(--ann-font-display);
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 600;
  color: var(--ann-gold);
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
}

.ann-p1-name-left {
  animation: annNameFromLeft 0.8s ease 2s both;
}

.ann-p1-name-heart {
  font-size: 1.2rem;
  animation: annFadeUp 0.6s ease 2.2s both;
}

.ann-p1-name-right {
  animation: annNameFromRight 0.8s ease 2s both;
}

@keyframes annNameFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes annNameFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.ann-p1-success .ann-btn {
  animation: annFadeUp 0.8s ease 1s both;
}

/* ---- Page 2: Where It All Started ---- */
.ann-p2-title {
  font-family: var(--ann-font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 600;
  color: var(--ann-gold);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
  margin-bottom: 3rem;
  text-align: center;
}

.ann-p2-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 3.5rem;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1rem;
}

.ann-p2-calendar-wrap {
  flex: 1 1 280px;
  max-width: 460px;
  display: flex;
  justify-content: center;
}

.ann-p2-calendar-board {
  position: relative;
  width: 100%;
  background: linear-gradient(145deg, rgba(24, 10, 24, 0.98), rgba(42, 14, 40, 0.98));
  border-radius: 18px;
  padding: 1.35rem 1.5rem 1.65rem;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: rotate(-4deg);
  transform-origin: center top;
}

.ann-p2-calendar-board::before {
  content: '';
  position: absolute;
  inset: 0.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.ann-p2-calendar-header {
  text-align: center;
  margin-bottom: 0.75rem;
}

.ann-p2-calendar-month {
  font-family: var(--ann-font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ann-gold);
}

.ann-p2-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
}

.ann-p2-calendar-weekdays span {
  text-align: center;
}

.ann-p2-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem 0.4rem;
}

.ann-p2-calendar-day {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
}

.ann-p2-calendar-day--empty {
  background: transparent;
}

.ann-p2-calendar-day--target {
  position: relative;
  color: var(--ann-gold);
  font-weight: 600;
}

.ann-p2-calendar-day--target::before {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 2px solid var(--ann-gold);
  box-shadow: 0 0 0 0 rgba(248, 227, 176, 0.7);
  animation: annP2DatePulse 1.4s ease-out infinite;
}

@keyframes annP2DatePulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(248, 227, 176, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(248, 227, 176, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(248, 227, 176, 0);
  }
}

.ann-p2-info {
  flex: 0 1 280px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.9rem;
  padding-left: 1.5rem;
}

.ann-p2-counter-wrap {
  text-align: left;
  margin-bottom: 0.25rem;
}

.ann-p2-counter {
  display: block;
  font-family: var(--ann-font-display);
  font-size: clamp(3.5rem, 8vw, 5.25rem);
  font-weight: 600;
  color: var(--ann-gold);
  text-shadow: 0 0 30px rgba(212, 165, 116, 0.3);
  line-height: 1.1;
}

.ann-p2-counter-label {
  font-size: 1.12rem;
  color: var(--ann-accent);
  opacity: 0.9;
}

.ann-p2-quote {
  position: relative;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ann-text);
  opacity: 0.95;
  margin: 0;
  max-width: 380px;
  line-height: 1.5;
  text-align: left;
  letter-spacing: 0.01em;
}

/* Reserve space: full quote is here but invisible */
.ann-p2-quote-space {
  display: block;
  visibility: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Typewriter text overlaid so layout doesn’t shift */
.ann-p2-quote-visible {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  display: block;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ann-p2-info .ann-btn {
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .ann-p2-title {
    font-size: clamp(1.25rem, 4.5vw, 1.5rem);
    margin-bottom: 1rem;
  }

  .ann-p2-layout {
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    padding-top: 0.25rem;
  }

  /* Reorder: counter (top), calendar (middle), quote (last), button */
  .ann-p2-info {
    display: contents;
  }

  .ann-p2-counter-wrap {
    order: 1;
    text-align: center;
    margin-bottom: 0;
  }

  .ann-p2-calendar-wrap {
    order: 2;
    width: 100%;
    max-width: 320px;
    display: flex;
    justify-content: center;
    margin: 0 auto;
  }

  .ann-p2-quote {
    order: 3;
    text-align: center;
    max-width: 100%;
    font-size: 1.05rem;
    margin-top: 1.5rem;
  }

  .ann-p2-info .ann-btn {
    order: 4;
    margin-top: 1.5rem;
  }

  /* Reduced sizes for mobile */
  .ann-p2-counter {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .ann-p2-counter-label {
    font-size: 0.85rem;
  }

  .ann-p2-calendar-board {
    transform: rotate(-2deg);
    padding: 0.9rem 1rem 1.1rem;
    border-radius: 14px;
    width: 100%;
    max-width: 320px;
  }

  .ann-p2-calendar-board::before {
    inset: 0.3rem;
    border-radius: 8px;
  }

  .ann-p2-calendar-month {
    font-size: 1.05rem;
  }

  .ann-p2-calendar-weekdays {
    font-size: 0.7rem;
    gap: 0.25rem;
    margin-bottom: 0.3rem;
  }

  .ann-p2-calendar-grid {
    gap: 0.3rem;
  }

  .ann-p2-calendar-day {
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .ann-p2-quote {
    font-size: 1.1rem;
  }
}

.ann-p2-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

.ann-p2-confetti-piece {
  position: absolute;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
  opacity: 0.95;
  animation: annP2ConfettiFall 2.4s linear forwards;
}

.ann-p2-confetti-piece:nth-child(3n) {
  font-size: 1.2rem;
}

.ann-p2-confetti-piece:nth-child(4n) {
  font-size: 1.6rem;
}

@keyframes annP2ConfettiFall {
  0% {
    transform: translate3d(0, -10%, 0) rotateZ(0deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 120vh, 0) rotateZ(360deg);
    opacity: 0;
  }
}

/* ---- Page 3: Memory Match Game ---- */
.ann-p3-title {
  font-family: var(--ann-font-display);
  font-size: clamp(1.65rem, 4.5vw, 2.1rem);
  font-weight: 600;
  color: var(--ann-gold);
  margin-bottom: 0.5rem;
  text-align: center;
}

.ann-p3-sub {
  font-size: 1.15rem;
  color: #ffffff;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  text-align: center;
}

.ann-p3-game {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 320px;
  max-width: 460px;
}

.ann-p3-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.95rem;
  width: 100%;
  min-width: 300px;
  max-width: 400px;
  margin: 0 auto;
}

.ann-p3-card {
  aspect-ratio: 1;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.ann-p3-card-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ann-p3-card-back {
  background: linear-gradient(135deg, rgba(120, 40, 90, 1), rgba(216, 104, 154, 1));
  color: #fff;
  font-size: 2.4rem;
}

.ann-p3-card-front {
  background: rgba(255, 255, 255, 0.95);
  transform: rotateY(180deg);
}

.ann-p3-card-front span {
  font-size: 2.5rem !important;
}

.ann-p3-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ann-p3-card.flipped {
  transform: rotateY(180deg);
}

.ann-p3-card.matched .ann-p3-card-front {
  opacity: 0.6;
}

.ann-p3-card.matched {
  pointer-events: none;
}

.ann-p3-kiss {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(26, 10, 24, 0.95);
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  z-index: 10;
  cursor: pointer;
}

.ann-p3-kiss.ann-p3-kiss-visible {
  opacity: 1;
  visibility: visible;
}

.ann-p3-kiss-gif {
  max-width: 420px;
  max-height: 420px;
  width: min(90vw, 420px);
  height: auto;
  margin-bottom: 1.25rem;
  border-radius: 18px;
  transition: transform 0.7s ease-out, opacity 0.7s ease-out;
}

.ann-p3-kiss-text {
  font-size: 1.35rem;
  color: var(--ann-text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.ann-p3-kiss-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ann-p3-kiss-gif.ann-p3-kiss-zoom {
  transform: scale(2.3);
  opacity: 0.95;
}

/* ---- Page 4: Quiz ---- */
.ann-p4-title {
  font-family: var(--ann-font-display);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 600;
  color: var(--ann-gold);
  margin-bottom: 0.5rem;
  text-align: center;
}

.ann-p4-progress {
  font-size: 0.9rem;
  color: var(--ann-accent);
  opacity: 0.9;
  margin-bottom: 1.5rem;
  text-align: center;
}

.ann-p4-quiz-wrap {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.ann-p4-gif-wrap {
  margin: 0 auto 1.25rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.ann-p4-gif {
  max-width: 200px;
  max-height: 200px;
  width: min(55vw, 200px);
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  object-fit: cover;
}

.ann-p4-next-question {
  margin-top: 1.25rem;
}

.ann-p4-feedback {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ann-p4-feedback.ann-p4-feedback-visible {
  opacity: 1;
  visibility: visible;
  animation: annBounce 0.6s ease;
}

@keyframes annBounce {
  0% { transform: translate(-50%, -50%) scale(0.5); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.ann-p4-sad-emoji {
  font-size: 4rem;
  display: block;
  animation: annShake 0.5s ease;
}

@keyframes annShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.ann-p4-love-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  animation: annLoveFloat 1s ease-in-out infinite;
}

@keyframes annLoveFloat {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-10px); opacity: 0.9; }
}

.ann-p4-success-gif {
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
}

.ann-p4-question {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ann-text);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.ann-p4-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.ann-p4-answer-btn {
  padding: 0.6rem 1.2rem;
  font-family: var(--ann-font);
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: var(--ann-text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.ann-p4-answer-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--ann-accent);
}

.ann-p4-answer-btn--correct {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.16);
  color: #eafff5;
}

.ann-p4-answer-btn--wrong {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.16);
  color: #ffecec;
}

.ann-p4-answer-btn[disabled] {
  cursor: default;
  opacity: 0.85;
}

.ann-p4-input-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.ann-p4-input {
  padding: 0.75rem 1.25rem;
  font-family: var(--ann-font);
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ann-text);
  min-width: 200px;
}

.ann-p4-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.ann-p4-done {
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ann-p4-done-inner {
  position: relative;
  background: linear-gradient(160deg, rgba(22, 8, 21, 0.98) 0%, rgba(48, 20, 44, 0.96) 40%, rgba(36, 14, 34, 0.98) 100%);
  border-radius: 20px;
  padding: 2.25rem 2.25rem;
  max-width: 420px;
  width: 100%;
  box-shadow:
    inset 0 0 0 1px rgba(248, 227, 176, 0.12),
    0 0 0 1px rgba(248, 227, 176, 0.35),
    0 0 0 2px rgba(224, 102, 154, 0.1),
    0 0 60px rgba(248, 227, 176, 0.1),
    0 0 100px rgba(224, 102, 154, 0.08),
    0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(174, 142, 92, 0.55);
  overflow: visible;
}


.ann-p4-done.ann-p4-done-visible {
  opacity: 1;
  visibility: visible;
  display: flex;
}

.ann-p4-done-score {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ann-gold);
  margin-bottom: 0.75rem;
}

.ann-p4-done-text {
  font-size: 1.3rem;
  color: var(--ann-text);
  margin-bottom: 0;
}

.ann-page-4.ann-p4-quiz-hidden .ann-p4-quiz-wrap {
  display: none;
}

/* Flying hearts when quiz score > 3 */
.ann-p4-hearts-fly {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.ann-p4-heart-fly {
  position: absolute;
  bottom: -5%;
  font-size: clamp(1.25rem, 3vw, 2rem);
  opacity: 0.9;
  animation: annHeartFlyUp 4s ease-in forwards;
  will-change: transform;
}

@keyframes annHeartFlyUp {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0.9;
  }
  100% {
    transform: translateY(-120vh) scale(1);
    opacity: 0;
  }
}

/* ---- Page 5: Photo Memories + Letter ---- */
.ann-p3-memories-title,
.ann-p5-title {
  font-family: var(--ann-font-display);
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

.ann-p3-memories-title {
  color: var(--ann-gold);
}

.ann-p5-title {
  color: var(--ann-text);
}

.ann-p5-title-letter {
  margin-top: 3rem;
  color: var(--ann-gold);
}

.ann-p5-memories-quote {
  font-size: 1.15rem;
  color: var(--ann-text);
  opacity: 0.9;
  text-align: center;
  margin: -1.25rem auto 2rem;
  max-width: 420px;
}

.ann-p5-memories {
  position: relative;
  max-width: 100%;
  margin: 0 auto 3rem;
  padding: 2rem 0;
  overflow: hidden;
}

.ann-p5-memories-thread {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.15));
  transform: translateY(-50%);
  z-index: 0;
}

.ann-p5-memories-track {
  position: relative;
  display: inline-flex;
  gap: 1.5rem;
  animation: annMemoriesMarquee 30s linear infinite;
  will-change: transform;
}

.ann-p5-memory {
  position: relative;
  width: 190px;
  height: 230px;
  background: #fdf8f4;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform-origin: center top;
  transform: rotateZ(-4deg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ann-p5-memory:nth-child(2n) {
  transform: rotateZ(3deg);
}

.ann-p5-memory:nth-child(3n) {
  transform: rotateZ(-6deg);
}

.ann-p5-memory img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ann-p5-memory::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ann-gold);
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35);
}

.ann-p5-memories:hover .ann-p5-memories-track {
  animation-play-state: paused;
}

.ann-p5-memory:hover {
  transform: translateY(-10px) scale(1.05) rotateZ(0deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

@keyframes annMemoriesMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ann-p5-envelope-wrap {
  position: relative;
  margin-top: -6.5rem;
}

.ann-p5-envelope {
  position: relative;
  width: 320px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.ann-p5-envelope:hover {
  transform: scale(1.02);
}

.ann-p5-envelope-flap {
  position: relative;
  height: 140px;
  background: linear-gradient(180deg, #d4a574 0%, #c4956a 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ann-p5-seal {
  font-size: 3rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.ann-p5-envelope-body {
  height: 100px;
  background: linear-gradient(180deg, #e8c9a8 0%, #d4a574 100%);
  border-radius: 0 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ann-p5-label {
  font-size: 1.1rem;
  color: rgba(0, 0, 0, 0.5);
  font-style: italic;
}

.ann-p5-letter {
  position: fixed;
  inset: 2rem;
  z-index: 100;
  background: linear-gradient(180deg, #fdf8f0 0%, #f5e6d3 100%);
  border-radius: 12px;
  padding: 2rem 1rem;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ann-p5-letter-lottie {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
}

.ann-p5-tap-hint {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes annLetterIdleShake {
  0%   { transform: translateY(0) rotate(0deg); }
  25%  { transform: translateY(-2px) rotate(-1deg); }
  50%  { transform: translateY(0) rotate(0.6deg); }
  75%  { transform: translateY(2px) rotate(-0.6deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.ann-page-6 .ann-p5-envelope {
  animation: annLetterIdleShake 3s ease-in-out infinite;
}

.ann-page-6 .ann-p5-envelope.ann-p5-envelope-opened {
  animation: none;
}

.ann-p5-letter.ann-p5-letter-open {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.ann-p5-letter-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  font-size: 1.5rem;
  color: #333;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}

.ann-p5-letter-close:hover {
  background: rgba(0, 0, 0, 0.15);
}

.ann-p5-letter-content {
    overflow-x: hidden;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ann-p5-letter-content p {
  margin-bottom: 1rem;
}

.ann-p5-letter-inner {
  position: relative;
  width: 580px;
  max-width: 580px;
  text-align: left;
  padding: 2.75rem 2.5rem;
  border-radius: 18px;
  border: 1px solid rgba(174, 142, 92, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  background: radial-gradient(circle at top, rgba(255, 250, 240, 0.96) 0%, #fdf6ea 55%, #f3e1c8 100%);
  max-height: 70vh;
  overflow-y: auto;
}

.ann-p5-letter-inner::before,
.ann-p5-letter-inner::after {
  content: '❧ ❧ ❧';
  font-size: 1.1rem;
  color: rgba(174, 142, 92, 0.9);
  letter-spacing: 0.35em;
}

/* Top floral: fixed at top of letter content */
.ann-p5-letter-inner::before {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0.7rem;
  display: block;
}

/* Bottom floral: in content flow so it appears at the very end after all text (no overlap when scrolling) */
.ann-p5-letter-inner::after {
  position: relative;
  display: block;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.ann-p5-letter-greeting {
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.ann-p5-signature {
  margin-top: 2rem;
  font-style: italic;
  color: #e53950;
  font-weight: 600;
}

.ann-p5-signature-name {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 700;
  color: #e53950;
}

.ann-p5-envelope.ann-p5-envelope-opened {
  pointer-events: none;
  opacity: 0.3;
}

/* Letter: mobile view - prevent content cutoff on sides */
@media (max-width: 768px) {
  .ann-p5-letter {
    inset: 0.5rem;
    padding: 1rem 0.5rem;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .ann-p5-letter-content {
    max-width: 100%;
    width: 100%;
    min-width: 0;
    padding: 1rem 0.5rem;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .ann-p5-letter-inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}
