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

  :root {
    --bg:        #fceef4;
    --pink-soft: #f7d6e3;
    --pink-mid:  #e8a0bc;
    --pink-deep: #c4547e;
    --rose:      #9b2b56;
    --dark:      #5c1632;
    --cream:     #fdf5f0;
    --gold:      #c9996a;
    --gold-light:#f0d4b0;
    --white:     #fffafb;
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Jost', sans-serif;
    background: var(--bg);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
  }

  /* ═══════════════════════════════════════════
     SPLASH SCREEN
  ═══════════════════════════════════════════ */
  #splash {
    position: fixed; inset: 0; z-index: 100;
    background: radial-gradient(ellipse at 40% 60%, #fce4ef 0%, #f7cde0 40%, #efb3cc 100%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 1.2s ease, transform 1.2s ease;
  }
  #splash.hide { opacity: 0; pointer-events: none; transform: scale(1.04); }

  #balloon-canvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%; z-index: 5;
  }

  #splash-text {
    position: relative; z-index: 2;
    text-align: center; pointer-events: none;
    opacity: 0; transform: translateY(30px);
    transition: all 1.5s cubic-bezier(.16,1,.3,1);
  }
  #splash-text.show { opacity: 1; transform: translateY(0); }
  #splash-text .eyebrow {
    font-family: 'Jost', sans-serif; font-weight: 200;
    letter-spacing: .5em; font-size: clamp(11px,2vw,14px);
    color: var(--rose); text-transform: uppercase;
    margin-bottom: 16px; opacity: .85;
  }
  #splash-text h1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300; font-size: clamp(48px,10vw,90px);
    color: var(--dark); line-height: 1.05;
    text-shadow: 0 2px 40px rgba(180,60,100,.18);
  }
  #splash-text .name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500; font-style: italic;
    font-size: clamp(36px,7vw,68px);
    display: block; margin-top: 4px;
    background: linear-gradient(135deg, var(--rose), var(--gold));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
  #splash-text .hearts {
    margin-top: 22px; font-size: 22px;
    display: flex; gap: 10px; justify-content: center;
    animation: floatHearts 2s ease-in-out infinite alternate;
  }

  @keyframes floatHearts { from{transform:translateY(0)} to{transform:translateY(-8px)} }

  /* ═══════════════════════════════════════════
     SCROLL REVEAL
  ═══════════════════════════════════════════ */
  .scroll-reveal {
    opacity: 0; transform: translateY(50px) scale(0.96);
    transition: all 1.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: blur(10px); will-change: transform, opacity, filter;
  }
  .scroll-reveal.in-view {
    opacity: 1; transform: translateY(0) scale(1); filter: blur(0);
  }

  .btn-rose:active, .nav-dot:active {
    transform: scale(0.9) !important;
    box-shadow: 0 4px 15px rgba(155, 43, 86, 0.25) !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease !important;
  }

  /* ═══════════════════════════════════════════
     PAGES CONTAINER
  ═══════════════════════════════════════════ */
  #pages {
    height: 100vh; width: 100vw;
    overflow-y: scroll; overflow-x: hidden;
    scroll-snap-type: y mandatory; scroll-behavior: smooth;
    opacity: 0; transform: scale(0.95) translateY(30px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  #pages.show { opacity: 1; transform: scale(1) translateY(0); }

  .page {
    height: 100vh; width: 100vw;
    scroll-snap-align: start; position: relative;
    overflow: hidden; display: flex;
    align-items: center; justify-content: center;
  }
  .page::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle, rgba(92,22,50,.05) 0%, rgba(155,43,86,.2) 65%, rgba(92,22,50,.4) 100%);
    pointer-events: none; z-index: 1;
  }

  /* ═══════════════════════════════════════════
     PAGE 1 — CAKE
  ═══════════════════════════════════════════ */
  #page-cake {
    background: radial-gradient(ellipse at 50% 80%, #f5dfe7 0%, #efcad9 50%, #eac0d0 100%);
    flex-direction: column;
  }

  .cake-label {
    position: absolute; top: clamp(20px,5vh,50px); left: 0; width: 100%;
    text-align: center;
    animation: fadeSlideDown .8s cubic-bezier(.16,1,.3,1) .3s both;
  }
  .cake-label .eyebrow {
    font-family: 'Jost', sans-serif; font-weight: 200;
    letter-spacing: .45em; font-size: 11px;
    color: var(--pink-deep); text-transform: uppercase; margin-bottom: 8px;
  }
  .cake-label h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300; font-size: clamp(28px,5vw,52px);
    color: var(--dark); line-height: 1.1;
  }
  .instruction {
    font-family: 'Jost', sans-serif; font-weight: 300;
    font-size: 11px; color: var(--pink-deep);
    opacity: 0.7; margin-top: 10px; font-style: italic;
    letter-spacing: 0.02em;
  }

  @keyframes pulse { 0%,100%{opacity:.5;transform:translateY(0)} 50%{opacity:1;transform:translateY(-6px)} }
  @keyframes fadeSlideDown { from{opacity:0;transform:translateY(-20px)} to{opacity:1;transform:translateY(0)} }

  #cake-wrapper {
    position: relative; cursor: none;
    width: clamp(260px,50vw,440px); margin-top: 30px;
    filter: drop-shadow(0 30px 60px rgba(160,50,90,.22));
    animation: cakeFloat 4s ease-in-out infinite;
    transition: filter .3s; z-index: 10;
  }
  #cake-wrapper.sliced { animation: none; }
  @keyframes cakeFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-14px)} }

  #knife-cursor {
    position: fixed; pointer-events: none; z-index: 999;
    width: 52px; height: 52px;
    transform: translate(-50%,-50%) rotate(-30deg);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
    display: none;
  }
  #knife-cursor.active { display: block; }

  #slice-piece {
    position: absolute; inset: 0;
    pointer-events: none; opacity: 0;
    transition: transform 1s cubic-bezier(.34,1.56,.64,1), opacity .5s ease;
  }

  .sparkle {
    position: absolute; pointer-events: none;
    border-radius: 50%; animation: sparkleAnim .8s ease-out forwards;
  }
  @keyframes sparkleAnim {
    0% { transform: scale(0) translate(0,0); opacity: 1; }
    100% { transform: scale(1) translate(var(--dx),var(--dy)); opacity: 0; }
  }

  .next-btn {
    position: absolute; bottom: clamp(22px,5vh,55px);
    left: 0; width: 100%; display: flex; justify-content: center;
    opacity: 0; transition: all .7s cubic-bezier(.16,1,.3,1);
    pointer-events: none; transform: translateY(30px);
  }
  .next-btn.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

  .btn-rose {
    font-family: 'Jost', sans-serif; font-weight: 300;
    font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
    color: var(--white);
    background: linear-gradient(135deg, var(--pink-deep) 0%, var(--rose) 100%);
    border: none; border-radius: 50px; cursor: pointer;
    padding: 14px 38px; display: inline-flex; align-items: center; gap: 10px;
    box-shadow: 0 8px 30px rgba(155,43,86,.35);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none; white-space: nowrap;
    z-index: 100; pointer-events: all;
    user-select: none; -webkit-tap-highlight-color: transparent;
  }
  .btn-rose:hover { transform: scale(1.04); box-shadow: 0 14px 40px rgba(155,43,86,.45); }
  .btn-rose svg { width: 14px; height: 14px; transition: transform .2s; }
  .btn-rose:hover svg { transform: translateX(4px); }
  
  .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--pink-deep) 0%, var(--rose) 100%);
    color: var(--white);
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: .25em;
    text-transform: uppercase;
    box-shadow: 0 10px 25px rgba(155,43,86,.2);
    transition: all .4s cubic-bezier(.16,1,.3,1);
  }
  .btn-download:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(155,43,86,.3);
    filter: brightness(1.1);
  }
  .btn-download svg {
    width: 15px;
    height: 15px;
    transition: transform .3s ease;
  }
  .btn-download:hover svg {
    transform: translateY(2px);
  }

  /* ═══════════════════════════════════════════
     PAGE 2 — BIRTHDAY MESSAGE
  ═══════════════════════════════════════════ */
  #page-message {
    background: linear-gradient(160deg, #f7d6e3 0%, #f0cfdc 40%, #eac0d0 100%);
    flex-direction: column; padding: 60px 32px;
    text-align: center; overflow: hidden;
  }

  .petal {
    position: absolute; font-size: clamp(16px,2vw,22px);
    animation: petalFall linear infinite;
    pointer-events: none; opacity: .65;
  }
  @keyframes petalFall {
    0%   { transform: translateY(-60px) rotate(0deg); opacity: 0; }
    10%  { opacity: .7; }
    90%  { opacity: .5; }
    100% { transform: translateY(110vh) rotate(360deg) translateX(var(--drift)); opacity: 0; }
  }

  .msg-inner { position: relative; z-index: 2; max-width: 680px; }

  .msg-eyebrow {
    font-family: 'Jost', sans-serif; font-weight: 200;
    letter-spacing: .55em; font-size: 11px;
    color: var(--pink-deep); text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0; animation: revealUp .7s ease .2s forwards;
  }

  .msg-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300; font-size: clamp(36px,7vw,72px);
    color: var(--dark); line-height: 1.08;
    margin-top: 50px;
    margin-bottom: 15px; overflow: hidden;
  }
  .msg-title .word {
    display: inline-block; margin-right: 14px;
    opacity: 0; transform: translateY(60px);
    animation: wordReveal .7s cubic-bezier(.16,1,.3,1) forwards;
  }

  .heart-divider {
    font-size: 24px; margin: 0 auto 28px; display: block;
    opacity: 0;
    animation: heartBeat 1.5s ease-in-out infinite, revealUp .6s ease .9s forwards;
  }
  @keyframes heartBeat { 0%,100%{transform:scale(1)} 50%{transform:scale(1.22)} }

  .msg-para {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400; font-size: clamp(17px,2.5vw,22px);
    color: var(--dark); line-height: 1.9;
    margin-bottom: 18px; font-style: italic;
    opacity: 0; transform: translateY(20px);
    animation: revealUp .8s ease forwards;
  }
  .msg-para.d1 { animation-delay: 1s; }
  .msg-para.d2 { animation-delay: 1.35s; }
  .msg-para.d3 { animation-delay: 1.7s; }

  .msg-sign {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300; font-size: clamp(16px,2.5vw,22px);
    margin-top: 24px;
    background: linear-gradient(135deg, var(--rose), var(--gold));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    opacity: 0; animation: revealUp .7s ease 2s forwards;
    display: inline-block;
  }

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

  .message-next-btn {
    position: absolute; bottom: clamp(22px, 5vh, 55px); left: 0;
    display: flex; justify-content: center;
    z-index: 110; width: 100%;
  }

  /* ═══════════════════════════════════════════
     PAGE 3 — POEM AUDIO PLAYER
  ═══════════════════════════════════════════ */
  #page-poem {
    background: radial-gradient(ellipse at 50% 30%, #fce8f0 0%, #f5dfe7 55%, #eac0d0 100%);
    flex-direction: column; gap: 0;
  }

  .poem-label {
    position: absolute; top: clamp(20px,5vh,48px); left: 0; width: 100%;
    text-align: center;
    opacity: 0; animation: fadeSlideDown .8s cubic-bezier(.16,1,.3,1) .3s both;
  }
  .poem-label .eyebrow {
    font-family: 'Jost', sans-serif; font-weight: 200;
    letter-spacing: .45em; font-size: 11px;
    color: var(--pink-deep); text-transform: uppercase; margin-bottom: 8px;
  }
  .poem-label h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300; font-size: clamp(26px,4.5vw,44px);
    color: var(--dark); line-height: 1.1;
  }

  /* Floating audio card */
  .audio-card {
    position: relative; z-index: 10;
    width: clamp(280px, 85vw, 320px);
    background: linear-gradient(150deg,
      rgba(155, 43, 86, 0.82) 0%,
      rgba(196, 84, 126, 0.78) 40%,
      rgba(232, 160, 188, 0.72) 100%
    );
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
    border: 1px solid rgba(255, 200, 220, 0.28);
    border-top: 1px solid rgba(255, 230, 240, 0.45);
    border-radius: 32px;
    padding: 20px 18px 14px;
    margin-top: 15px;
    animation: audioFloat 6s ease-in-out infinite;
    box-shadow:
      0 24px 60px rgba(92, 22, 50, 0.35),
      0 4px 16px rgba(155, 43, 86, 0.25),
      inset 0 1px 0 rgba(255, 240, 245, 0.3);
  }
  @keyframes audioFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
  }

  .audio-card-top-bar {
    position: absolute; top: 0; left: 50%;
    transform: translateX(-50%);
    width: 52px; height: 4px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    border-radius: 0 0 8px 8px;
    box-shadow: 0 0 12px rgba(201,153,106,.6);
  }

  .audio-flower svg { display: block; margin: 0 auto 10px; }

  .audio-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic; font-size: 17px;
    color: #ffe8f0; text-align: center;
    margin: 0 0 4px; font-weight: 400;
    text-shadow: 0 1px 8px rgba(92,22,50,.4);
  }
  .audio-subtitle {
    font-family: 'Jost', sans-serif;
    font-size: 10px; color: rgba(255,220,235,.75);
    letter-spacing: .28em; text-align: center;
    text-transform: uppercase; margin: 0 0 16px;
  }

  #waveform-canvas {
    display: block; width: 100%; height: 45px;
    border-radius: 12px;
    background: rgba(92, 22, 50, 0.25);
    border: 1px solid rgba(255,200,220,0.15);
    margin-bottom: 10px;
  }

  .progress-bar-wrap {
    height: 3px; background: rgba(255,200,220,0.25);
    border-radius: 2px; margin-bottom: 6px;
    position: relative; cursor: pointer;
  }
  .progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    border-radius: 2px; transition: width .5s linear;
    position: relative;
  }
  .progress-fill::after {
    content: ''; position: absolute;
    right: -5px; top: 50%; transform: translateY(-50%);
    width: 10px; height: 10px;
    background: var(--gold); border-radius: 50%;
    box-shadow: 0 0 6px rgba(201,153,106,.7);
  }

  .time-row {
    display: flex; justify-content: space-between;
    font-size: 10px; color: rgba(255,220,235,.7);
    margin-bottom: 12px; font-family: monospace;
    opacity: 1;
  }

  .audio-controls {
    display: flex; align-items: center;
    justify-content: center; gap: 16px;
  }

  .vol-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid rgba(255,200,220,0.3);
    background: rgba(92, 22, 50, 0.35);
    backdrop-filter: blur(8px);
    color: #ffe0ec; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; outline: none;
    transition: transform .2s cubic-bezier(0.175,0.885,0.32,1.275), background .2s;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
  }
  .vol-btn:hover { transform: scale(1.1); background: rgba(92,22,50,.55); }
  .vol-btn:active { transform: scale(0.92); }
  .vol-label {
    font-size: 15px; color: rgba(255,220,235,.7);
    display: block; margin-top: 5px;
    text-align: center; line-height: 1;
    font-family: 'Cormorant Garamond', serif;
  }

  .play-wrap {
    position: relative;
    display: flex; align-items: center; justify-content: center;
  }
  .play-ring {
    position: absolute; border-radius: 50%;
    pointer-events: none; opacity: 0;
    transition: opacity .4s;
  }
  .play-ring.r1 {
    width: 78px; height: 78px;
    border: 1.5px dashed rgba(240,212,176,.6);
    animation: spinRing 10s linear infinite;
  }
  .play-ring.r2 {
    width: 66px; height: 66px;
    border: 1px solid rgba(255,200,220,.4);
  }
  .play-ring.active { opacity: 1; }

  @keyframes spinRing { to { transform: rotate(360deg); } }

  #play-btn {
    width: 56px; height: 56px; border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    color: var(--dark);
    font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; outline: none;
    transition: background .3s, transform .2s;
    position: relative; overflow: hidden;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 6px 20px rgba(92,22,50,.4), 0 0 0 3px rgba(240,212,176,.25);
  }
  #play-btn:hover { transform: scale(1.06); }

  .vol-dots {
    display: flex; justify-content: center;
    align-items: center; gap: 5px;
    margin-top: 16px; min-height: 10px;
  }

  .now-playing {
    text-align: center; font-size: 11px;
    color: rgba(255,220,235,.75); letter-spacing: .2em;
    font-style: italic; margin: 11px 0 0;
    opacity: 0; transition: opacity .5s;
  }

  /* Poem text below card */
  .poem-text {
    position: relative; z-index: 10;
    width: 100%; max-width: 320px; text-align: center;
    padding: 0 10px; margin-top: 15px;
    opacity: 0; transform: translateY(16px);
    transition: all 1s cubic-bezier(.16,1,.3,1) .3s;
    pointer-events: none;
    height: 100px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
  }
  .poem-text.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .poem-scroll-container {
    transform: translateY(90px);
    will-change: transform;
    display: flex; flex-direction: column; gap: 20px;
  }
  .poem-text p {
    font-family: 'Noto Nastaliq Urdu', 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(15px, 4vw, 18px);
    color: var(--dark); line-height: 2.2;
    opacity: .95;
    margin: 0;
    text-shadow: 0 1px 4px rgba(255,255,255,0.85);
  }

  /* Audio player ambient pulse */
  .audio-ambient {
    position: absolute; width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155,43,86,.22) 0%, rgba(92,22,50,.08) 70%, transparent 100%);
    pointer-events: none; z-index: 2;
    animation: ambPulse 5s ease-in-out infinite;
  }
  @keyframes ambPulse {
    0%,100%{ transform: scale(1); opacity: .55; }
    50%    { transform: scale(1.1); opacity: .8; }
  }

  /* ═══════════════════════════════════════════
     PAGE 4 — GIFT
  ═══════════════════════════════════════════ */
  #page-gift {
    background: radial-gradient(ellipse at 50% 30%, #f5dfe7 0%, #eac0d0 50%, #e0a8bc 100%);
    flex-direction: column;
  }

  .gift-label {
    position: absolute; top: clamp(20px,5vh,50px); left: 0; width: 100%;
    text-align: center;
    opacity: 0; transition: all .8s ease;
  }
  .gift-label.show { opacity: 1; }
  .gift-label .eyebrow {
    font-family: 'Jost', sans-serif; font-weight: 200;
    letter-spacing: .45em; font-size: 11px;
    color: var(--pink-deep); text-transform: uppercase; margin-bottom: 8px;
  }
  .gift-label h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300; font-size: clamp(26px,4.5vw,48px); color: var(--dark);
  }

  #gift-box-wrapper {
    position: relative; cursor: pointer;
    width: clamp(200px,35vw,320px); margin-top: 30px;
    filter: drop-shadow(0 24px 50px rgba(150,40,80,.25));
    animation: giftBounce 2.5s cubic-bezier(.36,.07,.19,.97) infinite;
    z-index: 10;
  }
  #gift-box-wrapper.opened { animation: none; cursor: default; }

  @keyframes giftBounce {
    0%,100%{ transform: rotate(0deg) translateY(0); }
    15%{ transform: rotate(-3deg) translateY(-4px); }
    30%{ transform: rotate(3deg) translateY(-4px); }
    45%{ transform: rotate(-2deg) translateY(-2px); }
    60%{ transform: rotate(2deg) translateY(-2px); }
    75%{ transform: rotate(0deg) translateY(0); }
  }

  #gift-lid {
    position: absolute; top: 0; left: 0; width: 100%;
    transform-origin: center bottom;
    transition: transform 1.1s cubic-bezier(.34,1.56,.64,1), opacity .8s ease;
    z-index: 2;
  }
  #gift-lid.open { transform: translateY(-120%) rotate(-15deg); opacity: 0; }

  #gift-reveal {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0);
    width: min(300px,85vw);
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(150,40,80,.2);
    padding: 20px; text-align: center;
    transition: transform .9s cubic-bezier(.34,1.56,.64,1) .4s, opacity .6s ease .4s;
    opacity: 0; z-index: 100; pointer-events: none;
  }
  #gift-reveal.show { transform: translate(-50%,-50%) scale(1); opacity: 1; pointer-events: auto; }

  .gift-tag {
    position: absolute; bottom: clamp(20px,4vh,40px); left: 50%;
    transform: translateX(-50%);
    opacity: 0; transition: all .8s ease .8s; text-align: center;
  }
  .gift-tag.show { opacity: 1; }
  .gift-tag p {
    font-family: 'Jost', sans-serif; font-weight: 200;
    font-size: 12px; letter-spacing: .25em;
    text-transform: uppercase; color: var(--rose);
  }

  .star-particle {
    position: absolute; pointer-events: none;
    font-size: 16px; animation: starFloat 2s ease-out forwards;
  }
  @keyframes starFloat {
    0%  { transform: translate(0,0) scale(0) rotate(0deg); opacity: 1; }
    60% { opacity: 1; }
    100%{ transform: translate(var(--sx),var(--sy)) scale(1) rotate(var(--sr)); opacity: 0; }
  }

  /* ═══════════════════════════════════════════
     SHARED
  ═══════════════════════════════════════════ */
  .bg-circle {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.45), transparent);
    pointer-events: none; animation: bgCircleFloat ease-in-out infinite;
  }
  @keyframes bgCircleFloat {
    0%,100%{ transform: translate(0,0) scale(1); }
    50%    { transform: translate(var(--cx),var(--cy)) scale(1.08); }
  }

  #nav-dots {
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 10px; z-index: 50;
    opacity: 0; transition: opacity .5s ease;
  }
  #nav-dots.show { opacity: 1; }
  .nav-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--pink-mid); border: none; cursor: pointer;
    transition: all .3s ease; padding: 0;
  }
  .nav-dot.active { background: var(--rose); transform: scale(1.4); }

  .scroll-cue {
    position: absolute; bottom: 22px; right: 24px;
    font-family: 'Jost', sans-serif; font-size: 11px;
    font-weight: 200; letter-spacing: .25em; color: var(--pink-deep);
    text-transform: uppercase; opacity: .6;
    animation: fadeIn 1s ease 4s both;
    display: flex; align-items: center; gap: 6px;
  }
  .scroll-cue::before { content:''; width:1px; height:30px; background:var(--pink-mid); display:block; }
  @keyframes fadeIn { from{opacity:0} to{opacity:.6} }

  /* ═══════════════════════════════════════════
     FAIRY LIGHTS
  ═══════════════════════════════════════════ */
  .fairy-lights {
    position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden;
  }
  .fairy-light {
    position: absolute; width: 8px; height: 12px;
    border-radius: 50% 50% 40% 40%;
    background: rgba(255,255,255,.95);
    animation: fairyGlitter 3s infinite alternate cubic-bezier(0.4,0,0.2,1);
    --rot: 0deg;
    will-change: transform, opacity;
    box-shadow: 0 0 10px 2px #f9c870;
  }
  .fairy-light::after {
    content: ''; position: absolute;
    top: -4px; left: 2px; width: 4px; height: 5px;
    background: linear-gradient(to bottom, #d4af37, #9b724c);
    border-radius: 2px 2px 0 0; z-index: -1;
  }
  @keyframes fairyGlitter {
    0%  { opacity: 0.4; transform: rotate(var(--rot)) scale(0.85); }
    100%{ opacity: 1; transform: rotate(var(--rot)) scale(1.05); }
  }

  /* ═══════════════════════════════════════════
     MAGIC CURSOR TRAIL
  ═══════════════════════════════════════════ */
  .magic-trail {
    position: fixed; pointer-events: none; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    color: var(--pink-deep);
    animation: cursorTrailAnim 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
    transform: translate(-50%,-50%);
  }
  @keyframes cursorTrailAnim {
    0%  { opacity:1; transform:translate(-50%,-50%) scale(.5) rotate(0deg); }
    100%{ opacity:0; transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(1.2) rotate(var(--rot)); }
  }

  /* ═══════════════════════════════════════════
     LOCK SCREEN
  ═══════════════════════════════════════════ */
  #lock-screen {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 1s cubic-bezier(0.4,0,0.2,1), transform 1s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
    background: radial-gradient(ellipse at 50% top, #fdeef1 0%, #fde0ed 50%, #f7d0df 100%);
  }
  #lock-screen.unlock { opacity: 0; pointer-events: none; transform: scale(1.1); }
  #lock-screen::before {
    content:''; position:absolute; width:400px; height:400px; border-radius:50%;
    background:radial-gradient(circle,rgba(255,255,255,.7),transparent 70%);
    top:-100px; left:-100px; animation:bgCircleFloat 8s ease-in-out infinite; z-index:0;
  }
  #lock-screen::after {
    content:''; position:absolute; width:350px; height:350px; border-radius:50%;
    background:radial-gradient(circle,rgba(255,255,255,.6),transparent 70%);
    bottom:-100px; right:-100px; animation:bgCircleFloat 6s ease-in-out infinite reverse; z-index:0;
  }

  .cute-decorations { position:absolute; inset:0; pointer-events:none; z-index:1; overflow:hidden; }
  .cute-icon {
    position:absolute; opacity:.5;
    filter:drop-shadow(0 4px 10px rgba(155,43,86,.15));
    animation:floatIcon 6s ease-in-out infinite alternate; user-select:none;
  }
  @keyframes floatIcon {
    0%  { transform:translateY(0px) rotate(-5deg) scale(1); }
    50% { transform:translateY(-20px) rotate(10deg) scale(1.1); }
    100%{ transform:translateY(10px) rotate(-10deg) scale(.9); }
  }

  .lock-content {
    position:relative; z-index:2;
    display:flex; flex-direction:column;
    height:100%; width:100%; padding:4vh 20px;
    align-items:center; justify-content:space-between;
  }

  .lock-greeting { text-align:center; max-width:85vw; }
  .lock-greeting .hi {
    font-family:'Cormorant Garamond',serif; font-weight:400; font-style:italic;
    font-size:clamp(18px,4vw,24px); color:var(--rose); margin-bottom:8px;
    opacity:0; animation:revealUp 1.2s ease .5s forwards;
  }
  .lock-greeting h2 {
    font-family:'Cormorant Garamond',serif; font-weight:300;
    font-size:clamp(32px,8vw,52px); color:var(--dark); line-height:1.1;
    opacity:0; animation:revealUp 1.2s ease .8s forwards;
  }
  .lock-greeting .sub {
    font-family:'Jost',sans-serif; font-weight:300; font-size:11px;
    letter-spacing:.4em; color:var(--pink-deep); text-transform:uppercase; margin-top:20px;
    opacity:0; animation:revealUp 1.2s ease 1.1s forwards;
  }

  .lock-card {
    background:rgba(255,255,255,.7); backdrop-filter:blur(8px);
    border:1px solid rgba(255,255,255,.7); border-radius:32px;
    padding:30px 24px; width:100%; max-width:290px;
    box-shadow:0 20px 50px rgba(155,43,86,.08), inset 0 0 0 1px rgba(255,255,255,.4);
    animation:lockCardIn 1.2s cubic-bezier(.16,1,.3,1) 1.4s both;
    position:relative; z-index:2;
  }
  @keyframes lockCardIn { from{opacity:0;transform:translateY(30px) scale(.95)} to{opacity:1;transform:none} }

  .card-flower {
    position:absolute; font-size:24px; opacity:.2;
    pointer-events:none; z-index:0;
    animation:floatingHeart 3s ease-in-out infinite alternate;
  }
  @keyframes floatingHeart { from{transform:translate(0,0) rotate(0)} to{transform:translate(5px,10px) rotate(15deg)} }

  .pin-display { display:flex; gap:10px; justify-content:center; margin-bottom:24px; position:relative; z-index:1; }
  .pin-dot {
    width:12px; height:12px; border-radius:50%;
    border:1.5px solid var(--pink-mid);
    transition:all .3s cubic-bezier(.34,1.56,.64,1);
  }
  .pin-dot.filled {
    background:var(--rose); box-shadow:0 0 10px rgba(155,43,86,.3);
    transform:scale(1.3); border-color:var(--rose);
  }
  .pin-dot.error { background:#e55; border-color:#e55; animation: pinShake .4s ease; }
  .pin-dot.checking {
    background: var(--pink-mid);
    border-color: var(--pink-mid);
    animation: pinPulse .8s ease-in-out infinite alternate;
  }
  @keyframes pinPulse {
    from { transform: scale(1.3); opacity: .6; }
    to   { transform: scale(1.5); opacity: 1; }
  }
  @keyframes pinShake {
    0%,100%{ transform:translateX(0) } 25%{ transform:translateX(-4px) } 75%{ transform:translateX(4px) }
  }

  .numpad { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; width:100%; position:relative; z-index:1; }
  .num-btn {
    aspect-ratio:1; border-radius:50%;
    border:1px solid rgba(255,255,255,.4);
    background:radial-gradient(circle at top left,rgba(255,255,255,.8),rgba(255,255,255,.2));
    color:var(--rose); font-family:'Jost',sans-serif;
    font-size:24px; font-weight:400;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    cursor:pointer; transition:all .3s cubic-bezier(.175,.885,.32,1.275);
    user-select:none; -webkit-tap-highlight-color:transparent;
    position:relative;
    box-shadow:0 8px 16px rgba(155,43,86,.08), inset 0 0 12px rgba(255,255,255,.9);
  }
  .num-btn .tiny-f { font-size:8px; position:absolute; bottom:8px; opacity:.6; color:var(--pink-mid); }
  @media (hover: hover) {
    .num-btn:hover { transform:translateY(-3px) scale(1.05); }
  }
  .num-btn:active { transform:scale(.95); }
  .num-btn.action {
    background:radial-gradient(circle at top left,rgba(247,214,227,.8),rgba(247,214,227,.3));
    border-color:rgba(255,255,255,.6); color:var(--pink-deep);
  }
  .num-btn.action svg { width:22px; height:22px; stroke:var(--pink-deep); }

  /* ═══════════════════════════════════════════
     MOBILE
  ═══════════════════════════════════════════ */
  @media (max-width: 600px) {
    .btn-rose { padding:12px 26px; font-size:11px; letter-spacing:.2em; }
    .next-btn { bottom:60px; }
    .scroll-cue { right:15px; bottom:15px; font-size:9px; }
    #nav-dots { right:12px; }
    .audio-card { padding:22px 16px 18px; margin-bottom: 50px; }
    .poem-text { margin-top:12px; }
    
    /* Safely anchor the button on mobile and ensure it is always visible */
    .message-next-btn { bottom: 65px !important; z-index: 999; margin-top: 0; }
    .message-next-btn.scroll-reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
    
    /* Ensure the text transform overrides the scroll-reveal animation properly */
    .msg-inner.scroll-reveal.in-view { transform: translateY(-25px) scale(1); }
    .msg-title { margin-top: 0px; margin-bottom: 10px; font-size: clamp(30px, 8vw, 38px); line-height: 1.05; }
    .msg-para { margin-bottom: 8px; font-size: 15px; line-height: 1.5; }
  }


#knife-cursor{position:fixed;pointer-events:none;z-index:999;width:52px;height:52px;transform:translate(-50%,-50%) rotate(-30deg);filter:drop-shadow(0 4px 10px rgba(0,0,0,.25));display:none;}
#knife-cursor.active{display:block;}

