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

  :root {
    --rose: #BF40BF;
    --rose-light: #e6b3e6;
    --rose-pale: #f9edf9;
    --blush: #d279d2;
    --cream: #fdf8f5;
    --parchment: #f7efe8;
    --ink: #3a2a2e;
    --ink-soft: #6b4f55;
    --gold: #c9a96e;
    --gold-light: #f0e4cc;
  }

  html { scroll-behavior: smooth; }

  body {
    background: var(--cream);
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    color: var(--ink);
    overflow-x: hidden;
  }

  /* ── FLOATING HEARTS ── */
  #hearts-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
  }

  /* ── HERO ── */
  .hero {
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    background: radial-gradient(ellipse at 50% 30%, #fde8ec 0%, var(--cream) 70%);
  }

  .hero-eyebrow {
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    color: var(--rose);
    margin-bottom: 1.2rem;
    opacity: 0;
    animation: fadeUp 1s ease 0.3s forwards;
  }

  .hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--ink);
    opacity: 0;
    animation: fadeUp 1s ease 0.6s forwards;
  }

  .hero-title em {
    font-style: italic;
    color: var(--rose);
  }

  .hero-sub {
    margin-top: 1.4rem;
    font-size: 1.05rem;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    max-width: 480px;
    opacity: 0;
    animation: fadeUp 1s ease 0.9s forwards;
  }

  .hero-scroll {
    margin-top: 3.5rem;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    opacity: 0;
    animation: fadeUp 1s ease 1.4s forwards;
  }

  .hero-scroll span {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--rose);
  }

  .scroll-line {
    width: 1px; height: 48px;
    background: linear-gradient(to bottom, var(--rose), transparent);
    animation: pulse-line 2s ease-in-out infinite;
  }

  /* ── MUSIC SECTION ── */
  .music-section {
    position: relative; z-index: 1;
    padding: 5rem 1.5rem 3rem;
    text-align: center;
  }

  .section-eyebrow {
    font-family: 'Dancing Script', cursive;
    font-size: 1.2rem;
    color: var(--rose);
    margin-bottom: 0.6rem;
  }

  .section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 2.5rem;
  }

  .music-player {
    max-width: 500px;
    margin: 0 auto;
    background: var(--parchment);
    border: 1px solid var(--blush);
    border-radius: 20px;
    padding: 2rem 2rem 1.5rem;
  }

  .track-cover {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    object-fit: cover;
    margin: 0 auto 1.5rem auto;
    display: block;
    box-shadow: 0 8px 24px rgba(191, 64, 191, 0.25);
  }

  .now-playing-label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 0.8rem;
  }

  .track-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 0.2rem;
    min-height: 1.8rem;
  }

  .track-artist {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 1.6rem;
  }

  .progress-wrap {
    width: 100%;
    height: 3px;
    background: var(--blush);
    border-radius: 2px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    position: relative;
  }

  .progress-fill {
    height: 100%;
    background: var(--rose);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s linear;
  }

  .time-row {
    display: flex; justify-content: space-between;
    font-size: 0.72rem; color: var(--ink-soft);
    margin-bottom: 1.5rem;
  }

  .player-controls {
    display: flex; align-items: center; justify-content: center; gap: 1.6rem;
  }

  .ctrl-btn {
    background: none; border: none; cursor: pointer;
    color: var(--ink-soft); font-size: 1.2rem;
    transition: color 0.2s, transform 0.15s;
    padding: 8px;
  }

  .ctrl-btn:hover { color: var(--rose); transform: scale(1.1); }

  .play-btn {
    width: 52px; height: 52px;
    background: var(--rose);
    border: none; border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s, background 0.2s;
  }

  .play-btn:hover { transform: scale(1.06); background: #993399; }

  .play-btn svg { color: white; }

  .track-dots {
    display: flex; gap: 7px; justify-content: center; margin-top: 1.4rem;
  }

  .track-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--blush);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
  }

  .track-dot.active { background: var(--rose); transform: scale(1.3); }

  audio { display: none; }

  /* ── LETTERS SECTION ── */
  .letters-section {
    position: relative; z-index: 1;
    padding: 4rem 1.5rem 6rem;
    max-width: 800px;
    margin: 0 auto;
  }

  .letters-header {
    text-align: center;
    margin-bottom: 4rem;
  }

  /* ── ENVELOPE ── */
  .envelope-wrap {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

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

  .letter-label {
    text-align: center;
    margin-bottom: 1.2rem;
  }

  .letter-num {
    display: inline-block;
    font-family: 'Dancing Script', cursive;
    font-size: 1rem;
    color: var(--rose);
    background: var(--rose-light);
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 0.4rem;
  }

  .letter-tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--ink);
  }

  /* Envelope */
  .envelope {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    cursor: pointer;
  }

  .envelope-body {
    background: var(--gold-light);
    border: 1.5px solid var(--gold);
    border-radius: 4px 4px 8px 8px;
    padding-top: 60px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.3s;
  }

  .envelope:hover .envelope-body { box-shadow: 0 12px 40px rgba(201,112,122,0.18); }

  /* envelope flap */
  .flap {
    position: absolute; top: 0; left: 0; right: 0;
    height: 60px; z-index: 5;
    overflow: hidden;
  }

  .flap-svg {
    width: 100%; display: block;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
    transform-origin: top center;
  }

  .envelope.open .flap-svg {
    transform: rotateX(180deg);
  }

  .envelope-seal {
    position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
    width: 36px; height: 36px;
    background: var(--rose);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.1rem;
    z-index: 6;
    transition: opacity 0.3s;
    box-shadow: 0 2px 8px rgba(201,112,122,0.4);
  }

  .envelope.open .envelope-seal { opacity: 0; pointer-events: none; }

  .envelope-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    background: var(--parchment);
    border-top: 1px solid var(--blush);
  }

  .env-to { font-family: 'Dancing Script', cursive; font-size: 1.05rem; color: var(--ink-soft); }
  .env-from { font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.05em; }

  .open-hint {
    text-align: center;
    margin-top: 0.8rem;
    font-size: 0.78rem;
    color: var(--rose);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: pulse-hint 2s ease-in-out infinite;
  }

  .envelope.open .open-hint { display: none; }

  /* Letter paper sliding up */
  .letter-paper {
    background: white;
    margin: 0 16px;
    border-radius: 2px;
    padding: 2.5rem 2.5rem 2rem;
    border: 1px solid #e8ddd5;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.9s cubic-bezier(0.4,0,0.2,1), margin-bottom 0.5s ease;
    position: relative;
  }

  .letter-paper::before {
    content: '';
    position: absolute; top: 0; left: 2.5rem; right: 2.5rem; bottom: 0;
    background: repeating-linear-gradient(transparent, transparent 31px, #f0e8e8 31px, #f0e8e8 32px);
    opacity: 0.4;
    pointer-events: none;
  }

  .envelope.open .letter-paper {
    max-height: 2000px;
    margin-bottom: 20px;
  }

  .letter-to {
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    color: var(--rose);
    margin-bottom: 1.4rem;
  }

  .letter-body {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.9;
    color: var(--ink);
    position: relative;
    z-index: 1;
    white-space: pre-wrap;
  }

  .letter-body p { margin-bottom: 1rem; }

  .letter-sign {
    margin-top: 2rem;
    font-family: 'Dancing Script', cursive;
    font-size: 1.2rem;
    color: var(--ink-soft);
  }

  /* ── DIVIDER ── */
  .heart-divider {
    text-align: center;
    margin: 2rem 0;
    color: var(--blush);
    font-size: 1.2rem;
    letter-spacing: 0.6rem;
  }

  /* ── FOOTER ── */
  footer {
    position: relative; z-index: 1;
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--rose-pale);
    border-top: 1px solid var(--rose-light);
  }

  .footer-script {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: var(--rose);
    margin-bottom: 0.6rem;
  }

  .footer-sub {
    font-size: 0.85rem;
    color: var(--ink-soft);
    letter-spacing: 0.05em;
  }

  /* ── ANIMATIONS ── */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes pulse-line {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
  }

  @keyframes pulse-hint {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
  }

  @keyframes float-heart {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    100% { transform: translateY(-100vh) rotate(20deg); opacity: 0; }
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 500px) {
    .letter-paper { padding: 1.8rem 1.4rem 1.5rem; }
    .play-btn { width: 44px; height: 44px; }
  }

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

  /* ── TYPING EFFECT ── */
  .typing-effect {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--rose);
    font-weight: 500;
    margin-bottom: 0.5rem;
    min-height: 2.8rem;
    border-right: 3px solid var(--rose);
    white-space: nowrap;
    overflow: hidden;
    animation: blink-cursor 0.8s step-end infinite;
  }

  @keyframes blink-cursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--rose); }
  }
