  :root {
    --rose: #9E2B5E;
    --rose-light: #C94C7C;
    --blush: #F2B5C8;
    --cream: #FFF7F0;
    --gold: #C9944A;
    --gold-glow: #E8BD6E;
    --wine: #4A0E2B;
    --midnight: #0D0610;
    --paper: #FEF6EE;
    --ink: #2A0F1B;
    --env1: #C75B6A;
    --env2: #7B4A8A;
    --env3: #4A7A8A;
    --env4: #8A6B4A;
    --env5: #6A4A8A;
    --env6: #8A4A5A;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--rose) var(--midnight);
  }

  body {
    font-family: 'Marck Script', cursive;
    background: var(--midnight);
    color: var(--cream);
    overflow-x: hidden;
    cursor: none;
  }

  /* ═══ Custom Cursor ═══ */
  .cursor-dot {
    position: fixed;
    width: 8px; height: 8px;
    background: var(--gold-glow);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s ease, opacity 0.3s ease;
    mix-blend-mode: screen;
    box-shadow: 0 0 15px var(--gold-glow), 0 0 30px rgba(201,148,74,0.3);
  }

  .cursor-ring {
    position: fixed;
    width: 36px; height: 36px;
    border: 1.5px solid rgba(201,148,74,0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
  }

  .cursor-ring.hovering {
    width: 60px; height: 60px;
    border-color: var(--rose-light);
  }

  /* ═══ Particle Canvas ═══ */
  #particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
  }

  /* ═══ Grain Overlay ═══ */
  .grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px;
  }

  /* ═══ Ambient Glow Orbs ═══ */
  .ambient-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }

  .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 20s ease-in-out infinite;
  }

  .orb:nth-child(1) {
    width: 400px; height: 400px;
    background: rgba(158,43,94,0.12);
    top: 10%; left: -5%;
    animation-delay: 0s;
  }
  .orb:nth-child(2) {
    width: 300px; height: 300px;
    background: rgba(201,148,74,0.08);
    top: 60%; right: -5%;
    animation-delay: -7s;
    animation-duration: 25s;
  }
  .orb:nth-child(3) {
    width: 350px; height: 350px;
    background: rgba(123,74,138,0.1);
    bottom: 10%; left: 30%;
    animation-delay: -14s;
    animation-duration: 22s;
  }

  @keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(30px, 40px) scale(1.05); }
  }

  /* ═══ HERO ═══ */
  .hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    z-index: 2;
  }

  .hero-date {
    font-family: 'Unbounded', sans-serif;
    font-weight: 200;
    font-size: 0.75rem;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0;
    animation: revealUp 1s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    margin-bottom: 2rem;
  }

  .hero-photo {
    opacity: 0;
    animation: revealScale 1s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    margin-bottom: 1.5rem;
  }

  .hero-photo img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(201,148,74,0.3);
    box-shadow: 0 0 40px rgba(201,76,124,0.3);
  }

  .hero-title {
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 12vw, 9rem);
    line-height: 0.95;
    opacity: 0;
    animation: revealScale 1.2s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    background: linear-gradient(
      135deg,
      var(--cream) 0%,
      var(--gold-glow) 30%,
      var(--blush) 60%,
      var(--cream) 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: revealScale 1.2s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               shimmer 8s 1.7s ease infinite;
  }

  @keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }

  .hero-heart-container {
    margin: 2.5rem 0;
    opacity: 0;
    animation: revealUp 1s 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
  }

  .hero-heart {
    font-size: 3.5rem;
    display: inline-block;
    animation: heartbeat 1.5s ease infinite;
    cursor: none;
    filter: drop-shadow(0 0 25px rgba(201,76,124,0.6));
    transition: filter 0.3s ease;
    position: relative;
    z-index: 2;
  }

  .hero-heart:hover {
    filter: drop-shadow(0 0 40px rgba(201,76,124,0.9));
  }

  /* Heart ring pulse on click */
  .heart-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 60px; height: 60px;
    border: 2px solid var(--rose-light);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
  }

  .heart-ring.pulse {
    animation: ringPulse 0.8s ease forwards;
  }

  @keyframes ringPulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
  }

  .hero-subtitle {
    font-family: 'Bad Script', cursive;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--blush);
    opacity: 0;
    animation: revealUp 1s 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-width: 500px;
    line-height: 1.6;
  }

  .scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    opacity: 0;
    animation: revealUp 1s 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .scroll-hint span {
    font-family: 'Unbounded', sans-serif;
    font-weight: 200;
    font-size: 0.6rem;
    letter-spacing: 4px;
    color: var(--gold);
    opacity: 0.5;
  }

  .scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollPulse 2.5s ease infinite;
  }

  @keyframes scrollPulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.6); }
    50% { opacity: 0.7; transform: scaleY(1); }
  }

  /* ═══ Section Header ═══ */
  .letters-section {
    position: relative;
    z-index: 2;
    padding: 2rem 2rem 10rem;
    max-width: 1300px;
    margin: 0 auto;
  }

  .section-intro {
    text-align: center;
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .section-intro.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .section-intro h2 {
    font-family: 'Marck Script', cursive;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    color: var(--blush);
    margin-bottom: 1rem;
  }

  .ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    color: var(--gold);
  }

  .ornament::before, .ornament::after {
    content: '';
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
  }

  .ornament svg {
    width: 20px;
    height: 20px;
    fill: var(--gold);
    opacity: 0.7;
  }

  /* ═══ Letters Grid ═══ */
  .letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
  }

  /* ═══ Envelope Card ═══ */
  .envelope-card {
    position: relative;
    cursor: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .envelope-card.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* transition-delay set dynamically via JS */

  .envelope-inner {
    position: relative;
    width: 100%;
    padding-top: 62%;
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .envelope-card:not(.opened) .envelope-inner:hover {
    transform: translateY(-5px) scale(1.015);
  }

  /* Envelope body */
  .envelope-body {
    position: absolute;
    inset: 0;
    border-radius: 3px 3px 6px 6px;
    overflow: hidden;
    box-shadow:
      0 2px 6px rgba(0,0,0,0.12),
      0 8px 24px rgba(0,0,0,0.1);
    transition: box-shadow 0.4s ease;
  }

  .envelope-card:not(.opened):hover .envelope-body {
    box-shadow:
      0 4px 12px rgba(0,0,0,0.15),
      0 12px 36px rgba(0,0,0,0.12);
  }

  .envelope-bg {
    position: absolute;
    inset: 0;
  }

  /* Paper texture — craft fiber + speckle */
  .envelope-texture {
    position: absolute;
    inset: 0;
    background:
      repeating-linear-gradient(
        105deg,
        transparent, transparent 18px,
        rgba(255,255,255,0.03) 18px, rgba(255,255,255,0.03) 19px
      ),
      repeating-linear-gradient(
        75deg,
        transparent, transparent 24px,
        rgba(0,0,0,0.02) 24px, rgba(0,0,0,0.02) 25px
      ),
      url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: auto, auto, 120px;
    pointer-events: none;
  }

  /* Inner V-fold lines (like the back of a real envelope) */
  .envelope-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to top right, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.02) 30%, transparent 50%),
      linear-gradient(to top left, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.02) 30%, transparent 50%);
    pointer-events: none;
    z-index: 1;
  }

  /* Shadow zone under flap */
  .envelope-body::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 30%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.06), transparent);
    pointer-events: none;
    z-index: 1;
  }

  /* Inner liner (visible when flap opens) */
  .envelope-border {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 35%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.06), transparent);
    border-radius: 3px 3px 0 0;
    pointer-events: none;
  }

  /* Flap — proper envelope triangle */
  .envelope-flap {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 55%;
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    transform-origin: top center;
    transition: transform 0.5s ease;
    z-index: 3;
  }

  /* Flap texture — same craft fiber as envelope body */
  .envelope-flap::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      repeating-linear-gradient(
        105deg,
        transparent, transparent 18px,
        rgba(255,255,255,0.03) 18px, rgba(255,255,255,0.03) 19px
      ),
      repeating-linear-gradient(
        75deg,
        transparent, transparent 24px,
        rgba(0,0,0,0.02) 24px, rgba(0,0,0,0.02) 25px
      ),
      url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: auto, auto, 120px;
    clip-path: inherit;
    pointer-events: none;
  }

  /* Flap shading — darker toward the tip (natural shadow from fold) */
  .envelope-flap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.0) 0%,
      rgba(0,0,0,0.08) 70%,
      rgba(0,0,0,0.14) 100%
    );
    clip-path: inherit;
    pointer-events: none;
  }

  .envelope-card.opened .envelope-flap {
    transform: rotateX(180deg);
  }

  /* Wax Seal — sits at flap tip */
  .seal {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    z-index: 4;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .seal-circle {
    width: 100%; height: 100%;
    background: #B52222;
    border-radius: 42% 58% 45% 55% / 52% 44% 56% 48%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: rgba(60,10,10,0.4);
    text-shadow: 0 1px 0 rgba(255,170,170,0.2);
    box-shadow:
      0 2px 4px rgba(60,8,8,0.4),
      0 4px 10px rgba(60,8,8,0.2);
    position: relative;
  }

  .seal-circle::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    pointer-events: none;
  }

  .envelope-card.opened .seal {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(180deg);
  }

  /* Label — handwritten address feel */
  .envelope-label {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translate(-50%, 50%) rotate(-0.5deg);
    font-family: 'Bad Script', cursive;
    font-size: 1rem;
    color: rgba(0,0,0,0.3);
    text-align: center;
    width: 75%;
    z-index: 2;
    transition: opacity 0.4s ease;
    letter-spacing: 0.3px;
  }

  .envelope-card.opened .envelope-label { opacity: 1; }

  .envelope-num {
    position: absolute;
    bottom: 8px; right: 14px;
    font-family: 'Unbounded', sans-serif;
    font-weight: 200;
    font-size: 1.4rem;
    color: rgba(0,0,0,0.06);
    z-index: 2;
  }

  /* ═══ LETTER OVERLAY ═══ */
  .overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    pointer-events: none;
    cursor: none;
  }

  .overlay-bg {
    position: absolute;
    inset: 0;
    background: rgba(8,3,10,0);
    backdrop-filter: blur(0px);
    transition: all 0.6s ease;
  }

  .overlay.visible { pointer-events: all; }
  .overlay.visible .overlay-bg {
    background: rgba(8,3,10,0.88);
    backdrop-filter: blur(16px);
  }

  .letter-paper {
    position: relative;
    background:
      /* Paper fiber texture */
      repeating-linear-gradient(
        115deg,
        transparent,
        transparent 30px,
        rgba(160, 130, 100, 0.02) 30px,
        rgba(160, 130, 100, 0.02) 31px
      ),
      repeating-linear-gradient(
        65deg,
        transparent,
        transparent 22px,
        rgba(140, 120, 100, 0.015) 22px,
        rgba(140, 120, 100, 0.015) 23px
      ),
      /* Warm aging spots */
      radial-gradient(ellipse at 15% 20%, rgba(180, 150, 120, 0.08), transparent 50%),
      radial-gradient(ellipse at 85% 80%, rgba(170, 140, 110, 0.06), transparent 45%),
      radial-gradient(ellipse at 50% 50%, rgba(190, 160, 130, 0.03), transparent 70%),
      var(--paper);
    max-width: 640px;
    width: 100%;
    border-radius: 6px;
    padding: 3.5rem 2.8rem 2.5rem;
    box-shadow:
      0 30px 100px rgba(0,0,0,0.6),
      0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(50px) scale(0.85);
    opacity: 0;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--ink);
    overflow: hidden;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--blush) transparent;
  }

  .overlay.visible .letter-paper {
    transform: translateY(0) scale(1);
    opacity: 1;
    transition-delay: 0.15s;
  }

  /* Dynamic stamps (generated via JS) */
  .letter-stamp {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    user-select: none;
  }

  /* Decorative corner flourish */
  .letter-corner {
    position: absolute;
    width: 40px; height: 40px;
    opacity: 0.15;
    pointer-events: none;
  }
  .letter-corner.tl { top: 12px; left: 12px; border-top: 1px solid var(--rose); border-left: 1px solid var(--rose); }
  .letter-corner.br { bottom: 12px; right: 12px; border-bottom: 1px solid var(--rose); border-right: 1px solid var(--rose); }

  .letter-num {
    font-family: 'Bad Script', cursive;
    font-size: 0.95rem;
    color: var(--rose-light);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }

  .letter-num::after {
    content: '';
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: var(--blush);
  }

  .letter-heading {
    font-family: 'Marck Script', cursive;
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--rose);
    margin-bottom: 1.8rem;
    line-height: 1.3;
    position: relative;
    z-index: 1;
  }

  .letter-text {
    font-family: 'Marck Script', cursive;
    font-size: 1.6rem;
    line-height: 2.1;
    color: var(--ink);
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
    background-image: linear-gradient(
      to bottom,
      transparent calc(65%),
      rgba(158,43,94,0.1) calc(65%),
      rgba(158,43,94,0.1) calc(65% + 1px),
      transparent calc(65% + 1px)
    );
    background-size: 100% 3.36rem;
  }

  .letter-text .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .letter-text .word.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .letter-sig {
    font-family: 'Bad Script', cursive;
    font-size: 1.5rem;
    color: var(--rose);
    text-align: right;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateX(15px);
    transition: all 0.6s ease;
  }

  .letter-sig.revealed {
    opacity: 1;
    transform: translateX(0);
  }

  .letter-close {
    position: sticky;
    top: 0;
    float: right;
    width: 38px; height: 38px;
    border: none;
    background: rgba(158,43,94,0.06);
    border-radius: 50%;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--rose);
    transition: all 0.3s ease;
    z-index: 10;
    margin: -1rem -0.5rem 0 0;
  }

  .letter-close:hover {
    background: rgba(158,43,94,0.14);
    transform: rotate(90deg) scale(1.1);
  }

  /* ═══ Confetti System ═══ */
  .confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10001;
  }

  /* ═══ Progress ═══ */
  .progress-section {
    text-align: center;
    margin-top: 5rem;
  }

  .progress-label {
    font-family: 'Marck Script', cursive;
    font-size: 1.1rem;
    color: var(--blush);
    opacity: 0.6;
    margin-bottom: 1rem;
  }

  .progress-counter {
    font-family: 'Unbounded', sans-serif;
    font-weight: 200;
    font-size: 1.6rem;
    color: var(--gold-glow);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
  }

  .progress-counter .num {
    font-weight: 700;
    font-size: 2rem;
    color: var(--blush);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
  }

  .progress-counter .num.bump {
    animation: heartPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .progress-hearts {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .progress-heart {
    font-size: 0.85rem;
    opacity: 0.15;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: grayscale(1);
  }

  .progress-heart.filled {
    opacity: 1;
    filter: grayscale(0) drop-shadow(0 0 6px rgba(201,76,124,0.5));
    animation: heartPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @keyframes heartPop {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
  }

  /* Reset button */
  .reset-btn {
    font-family: 'Marck Script', cursive;
    font-size: 0.95rem;
    color: var(--gold);
    background: none;
    border: 1px solid rgba(201,148,74,0.2);
    padding: 0.6rem 1.8rem;
    border-radius: 100px;
    cursor: none;
    letter-spacing: 2px;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
  }

  .reset-btn.show {
    opacity: 0.5;
    transform: translateY(0);
    pointer-events: all;
  }

  .reset-btn:hover {
    opacity: 1;
    border-color: var(--gold);
    background: rgba(201,148,74,0.06);
  }

  /* ═══ Footer ═══ */
  .footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 6rem 2rem 4rem;
  }

  .footer-heart {
    font-size: 2.5rem;
    display: inline-block;
    animation: heartbeat 1.5s ease infinite;
    filter: drop-shadow(0 0 20px rgba(201,76,124,0.5));
  }

  .footer p {
    font-family: 'Bad Script', cursive;
    font-size: 1.4rem;
    color: var(--gold-glow);
    margin-top: 1.2rem;
    opacity: 0.6;
  }

  /* ═══ Shared Keyframes ═══ */
  @keyframes revealUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes revealScale {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
  }

  @keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.18); }
    28% { transform: scale(1); }
    42% { transform: scale(1.12); }
    56% { transform: scale(1); }
  }

  /* ═══ All-opened celebration ═══ */
  .celebration-text {
    font-family: 'Bad Script', cursive;
    font-size: 1.3rem;
    color: var(--gold-glow);
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .celebration-text.show {
    opacity: 0.8;
    transform: translateY(0);
  }

  /* ═══ Mobile ═══ */
  @media (max-width: 700px) {
    .letters-grid { grid-template-columns: 1fr; gap: 2rem; max-width: 400px; margin: 0 auto; }
    .letter-paper { padding: 2.5rem 1.5rem 2rem; max-height: 85vh; }
    .cursor-dot, .cursor-ring { display: none; }
    body { cursor: auto; }
    .envelope-card, .letter-close, .reset-btn, .hero-heart { cursor: pointer; }
    .hero { min-height: 100svh; padding: 1.5rem; }
    .hero-title { font-size: clamp(2.8rem, 11vw, 5rem); }
    .hero-subtitle { font-size: 1.1rem; padding: 0 0.5rem; }
    .hero-date { font-size: 0.65rem; letter-spacing: 5px; }
    .letters-section { padding: 2rem 1.2rem 6rem; }
    .section-intro { margin-bottom: 3rem; }
    .section-intro h2 { font-size: 1.6rem; }
    .envelope-inner { padding-top: 60%; }
    .seal { width: 44px; height: 44px; }
    .seal-circle { font-size: 1rem; }
    .envelope-label { font-size: 0.95rem; }
    .letter-heading { font-size: 1.4rem; }
    .letter-text { font-size: 1.4rem; line-height: 1.9; }
    .letter-text {
      background-size: 100% 2.66rem;
    }
    .letter-sig { font-size: 1.3rem; }
    .overlay { padding: 1rem; }
    .footer { padding: 4rem 1.5rem 3rem; }
    .progress-hearts { gap: 0.5rem; }
  }

  @media (max-width: 380px) {
    .hero-title { font-size: 2.5rem; }
    .letters-grid { max-width: 100%; }
    .letter-paper { padding: 2rem 1.2rem 1.5rem; }
  }

  /* Safe area for notched phones */
  @supports (padding: env(safe-area-inset-bottom)) {
    .footer { padding-bottom: calc(3rem + env(safe-area-inset-bottom)); }
  }

  /* ═══ Reduced Motion ═══ */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }
