/* ============================================================
   APP SHELL — page framework, shared nav buttons, and the
   Countdown / Cake / Cinema / Envelope / Letter / Wish Jar / Ending.
   Palette: wine red + cream/off-white, elegant & cinematic.
   ============================================================ */

:root{
  --wine-950: #2c0714;
  --wine-900: #4c0c22;
  --wine-800: #63102c;
  --wine-700: #7a1638;
  --wine-600: #93203f;
  --gold-1:   #f0c274;
  --gold-2:   #d79a3f;
  --cream-0:  #fffaf4;
  --cream-1:  #f7ece0;
  --cream-2:  #eddac6;
  --ink-1:    #5c1a2c;
  --ink-2:    #8a5566;
  --serif:    "Fraunces", Georgia, serif;
  --script:   "Great Vibes", cursive;
  --sans:     "Cormorant Garamond", Georgia, serif;
  --easeOut:  cubic-bezier(.2,.7,.2,1);
}

.app{ position:relative; width:100%; height:100%; }

/* ============================================================
   PAGE FRAMEWORK
   ============================================================ */
.page{
  position:fixed; inset:0;
  opacity:0; visibility:hidden; pointer-events:none;
  transform:translateY(14px) scale(.975);
  transform-origin:center top;
  transition:
    opacity .65s var(--easeOut),
    transform .8s var(--easeOut),
    visibility 0s linear .65s;
  will-change:opacity, transform;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  display:flex;
  flex-direction:column;
}
.page.is-active{
  opacity:1; visibility:visible; pointer-events:auto;
  transform:translateY(0) scale(1);
  transition:
    opacity .65s var(--easeOut),
    transform .8s var(--easeOut),
    visibility 0s linear 0s;
}

#page-flowers{
  transition:opacity .6s ease, visibility 0s linear .6s;
  transform:none;
  overflow:hidden;
}
#page-flowers.is-active{ transition:opacity .6s ease, visibility 0s linear 0s; }
#page-flowers:not(.is-active){ opacity:0; visibility:hidden; pointer-events:none; }

.pageBg{ position:absolute; inset:0; z-index:0; }
.pageBg--cream{
  background:
    linear-gradient(rgba(217, 101, 139, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 101, 139, 0.08) 1px, transparent 1px),
    radial-gradient(120% 90% at 50% 12%, var(--cream-0) 0%, var(--cream-1) 46%, var(--cream-2) 100%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
}
.pageBg--wine{
  background:
    radial-gradient(120% 90% at 50% 10%, var(--wine-700) 0%, var(--wine-800) 46%, var(--wine-950) 100%);
}
.pageBg::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(130% 85% at 50% 42%, transparent 55%, rgba(10,1,5,.16) 100%);
}
.pageBg--wine::after{
  background:radial-gradient(130% 85% at 50% 38%, transparent 50%, rgba(5,0,2,.34) 100%);
}
.pageBg__glow{
  position:absolute; left:50%; top:38%; z-index:0; pointer-events:none;
  width:min(90vw,780px); aspect-ratio:1; transform:translate(-50%,-50%);
  background:radial-gradient(circle, rgba(200,60,90,.16), rgba(200,60,90,0) 68%);
  filter:blur(10px);
}
.pageBg__glow--gold{
  background:radial-gradient(circle, rgba(240,194,116,.20), rgba(240,194,116,0) 68%);
}

.pageInner{
  position:relative; z-index:2;
  flex:1 0 auto;
  width:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:clamp(10px,2vh,20px);
  padding:clamp(24px,6vh,64px) max(clamp(18px,6vw,48px), env(safe-area-inset-right)) clamp(16px,3vh,24px) max(clamp(18px,6vw,48px), env(safe-area-inset-left));
  text-align:center;
  box-sizing:border-box;
}

.pageEyebrow{
  font-family:var(--sans); font-style:italic; font-weight:600;
  font-size:clamp(13px,2.6vw,19px); letter-spacing:.14em; text-transform:uppercase;
  color:var(--wine-600);
  opacity:0; transform:translateY(10px);
  animation:pageFadeUp .8s var(--easeOut) .1s forwards;
}
.pageEyebrow--light{ color:var(--gold-1); }

.pageTitle{
  font-family:var(--serif); font-weight:700;
  font-size:clamp(28px,6vw,54px); line-height:1.08; letter-spacing:-.01em;
  color:var(--ink-1); max-width:18ch;
  text-shadow:0 2px 0 rgba(255,255,255,.4), 0 18px 30px rgba(90,10,40,.16);
  opacity:0; transform:translateY(14px);
  animation:pageFadeUp .9s var(--easeOut) .25s forwards;
}
.pageTitle--light{ color:var(--cream-0); text-shadow:0 2px 18px rgba(0,0,0,.45), 0 1px 0 rgba(0,0,0,.3); }
.pageTitle--script{ font-family:var(--script); font-weight:400; font-size:clamp(38px,8vw,74px); line-height:1; }

.pageSub{
  font-family:var(--sans); font-style:italic; font-weight:500;
  font-size:clamp(14px,2.6vw,20px); color:var(--ink-2); max-width:38ch;
  opacity:0; transform:translateY(10px);
  animation:pageFadeUp .8s var(--easeOut) .6s forwards;
}
.pageSub--light{ color:rgba(255,246,238,.86); }

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

/* ============================================================
   BACK / CONTINUE NAV
   ============================================================ */
.pagenav{
  position:relative;
  flex:0 0 auto;
  width:100%;
  z-index:5;
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center;
  gap:clamp(10px,3vw,22px);
  padding:clamp(14px,3vh,22px) max(clamp(14px,4vw,32px), env(safe-area-inset-right)) max(clamp(16px,4vh,32px), env(safe-area-inset-bottom)) max(clamp(14px,4vw,32px), env(safe-area-inset-left));
  row-gap:10px;
  box-sizing:border-box;
}
.btn{
  font-family:var(--sans); font-weight:600; letter-spacing:.14em; text-transform:uppercase;
  font-size:clamp(11.5px,2.1vw,13.5px);
  padding:12px clamp(18px,3.6vw,28px);
  border-radius:999px; border:1px solid transparent;
  cursor:pointer; white-space:nowrap;
  transition:transform .25s var(--easeOut), box-shadow .25s ease, background .25s ease, opacity .25s ease;
  min-height:44px;
}
.btn--back{
  background:rgba(255,255,255,.65); color:var(--wine-700);
  border-color:rgba(122,22,56,.22);
  box-shadow:0 8px 18px -12px rgba(60,4,20,.45);
}
.btn--back:hover{ background:rgba(255,255,255,.9); transform:translateY(-2px); box-shadow:0 12px 22px -12px rgba(60,4,20,.55); }
.btn--back:active{ transform:translateY(0) scale(.97); }
.btn--back.btn--onDark{ background:rgba(255,246,238,.14); color:var(--cream-0); border-color:rgba(255,246,238,.3); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); box-shadow:0 8px 20px -12px rgba(0,0,0,.5); }
.btn--back.btn--onDark:hover{ background:rgba(255,246,238,.24); }

.btn--continue{
  background:linear-gradient(135deg, var(--wine-700), var(--wine-900));
  color:var(--cream-0);
  box-shadow:0 10px 24px -10px rgba(60,4,20,.6);
  border:1px solid rgba(255,223,180,.25);
}
.btn--continue:hover{ transform:translateY(-2px); box-shadow:0 16px 32px -10px rgba(60,4,20,.7); }
.btn--continue:active{ transform:translateY(0) scale(.97); }

/* ============================================================
   PAGE 2 — COUNTDOWN (Lifetime Light)
   ============================================================ */
.countdown{
  display:flex; flex-wrap:wrap; align-items:stretch; justify-content:center;
  gap:clamp(8px,2vw,16px);
  margin-top:clamp(6px,1.4vh,14px);
  max-width:920px;
}
.cd__unit{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px;
  width:clamp(64px,14vw,104px);
  padding:clamp(12px,2.4vw,20px) 4px;
  border-radius:16px;
  background:linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.62));
  border:1px solid rgba(122,22,56,.14);
  box-shadow:
    0 10px 26px -14px rgba(90,10,40,.4),
    inset 0 1px 0 rgba(255,255,255,.7);
  opacity:0; transform:translateY(14px) scale(.96);
  animation:pageFadeUp .7s var(--easeOut) forwards;
  transition:transform .3s var(--easeOut), box-shadow .3s var(--easeOut);
}
.cd__unit:hover{
  transform:translateY(-3px);
  box-shadow:
    0 16px 32px -14px rgba(90,10,40,.5),
    inset 0 1px 0 rgba(255,255,255,.7);
}
.cd__unit:nth-child(1){ animation-delay:.32s; }
.cd__unit:nth-child(2){ animation-delay:.38s; }
.cd__unit:nth-child(3){ animation-delay:.44s; }
.cd__unit:nth-child(4){ animation-delay:.50s; }
.cd__unit:nth-child(5){ animation-delay:.56s; }
.cd__unit:nth-child(6){ animation-delay:.62s; }
.cd__num{
  font-family:var(--serif); font-weight:700; font-variant-numeric:tabular-nums;
  font-size:clamp(22px,5vw,42px); line-height:1; color:var(--wine-800);
}
.cd__label{
  font-family:var(--sans); font-weight:600; letter-spacing:.1em; text-transform:uppercase;
  font-size:clamp(9.5px,1.6vw,12px); color:var(--ink-2);
}

/* ============================================================
   PAGE 3 — 3D CAKE & INTERACTIVE CANDLES
   ============================================================ */
.pageInner--cake{ padding-top:clamp(20px,5vh,48px); gap:clamp(4px,1vh,10px); }
.cake-stage{
  position:relative;
  width:240px;
  height:clamp(300px,46vh,470px);
  max-width:100%;
  display:flex; align-items:center; justify-content:center;
  transform-style:preserve-3d;
  perspective:900px;
  overflow:hidden;
}
.cake-3d{
  position:relative;
  width:200px;
  display:flex; flex-direction:column; align-items:center;
  transform:rotateX(16deg) rotateY(-10deg) scale(var(--cake-scale,1));
  transform-style:preserve-3d;
  filter:drop-shadow(0 26px 26px rgba(60,4,20,.35));
  animation:cake-turn 14s ease-in-out infinite alternate;
  cursor:pointer;
}
@keyframes cake-turn{
  from{ transform:rotateX(16deg) rotateY(-12deg) scale(var(--cake-scale,1)); }
  to{ transform:rotateX(14deg) rotateY(12deg) scale(var(--cake-scale,1)); }
}
.cake-tier{
  position:relative; width:200px; height:340px;
  transform-origin:bottom center;
}
.cake-tier-top{ transform:scaleX(.6) scaleY(.86); margin-bottom:-288px; z-index:3; }
.cake-tier-mid{ transform:scaleX(.8) scaleY(.92); margin-bottom:-280px; z-index:2; }
.cake-tier-base{ z-index:1; }
.cake-3d::after{
  content:""; position:absolute; left:50%; bottom:6px;
  width:190px; height:34px;
  transform:translateX(-50%) rotateX(74deg);
  background:radial-gradient(ellipse at center, rgba(60,4,20,.45), transparent 70%);
  filter:blur(4px);
}
.cake-3d #cake{
  display:block; position:relative;
  margin:-10em auto 0 auto;
  width:200px; height:500px;
}
/* ============================================================
   18 SHAPED BIRTHDAY CANDLES & PROPER RADIANT FLAMES
   ============================================================ */
.cake-3d .cake-candles{
  position: absolute;
  top: 228px;
  left: 50%;
  transform: translate(-50%, -100%) scaleX(1.667) scaleY(1.163);
  transform-origin: bottom center;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  animation: candleDrop 650ms 5.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

@keyframes candleDrop{
  0%{
    transform: translate(-50%, -340px) scaleX(1.667) scaleY(1.163);
    opacity: 0;
  }
  60%{
    opacity: 1;
  }
  85%{
    transform: translate(-50%, -96%) scaleX(1.667) scaleY(1.163);
  }
  100%{
    transform: translate(-50%, -100%) scaleX(1.667) scaleY(1.163);
    opacity: 1;
  }
}

/* Individual candle unit (1 and 8) */
.candle-unit{
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Flame container */
.flame-wrap{
  position: relative;
  width: 22px;
  height: 34px;
  margin-bottom: 2px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Wide warm radiant aura surrounding flame for instant visibility */
.flame-aura{
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, rgba(255, 120, 0, 0.55) 0%, rgba(255, 190, 0, 0.3) 45%, transparent 72%);
  filter: blur(5px);
  pointer-events: none;
  animation: flameAuraPulse 1.6s ease-in-out infinite alternate;
}

@keyframes flameAuraPulse{
  0%{ transform: translateX(-50%) scale(0.92); opacity: 0.8; }
  100%{ transform: translateX(-50%) scale(1.18); opacity: 1; }
}

/* Rich vivid physical flame body */
.flame-body{
  position: relative;
  width: 16px;
  height: 30px;
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  transform-origin: bottom center;
  animation: flameFlickerA 1.1s ease-in-out infinite alternate;
  filter:
    drop-shadow(0 0 6px #ff4500)
    drop-shadow(0 0 14px #ff9e00)
    drop-shadow(0 0 24px #ffd000);
}

.flame-wrap--alt .flame-body{
  animation: flameFlickerB 1.25s -0.5s ease-in-out infinite alternate;
}

@keyframes flameFlickerA{
  0%, 100%{
    transform: scale(1) rotate(-1.5deg);
  }
  25%{
    transform: scale(1.08, 0.93) rotate(1.5deg) translate(0.5px, -1px);
    filter: drop-shadow(0 0 8px #ff2600) drop-shadow(0 0 18px #ff9e00) drop-shadow(0 0 28px #ffe600);
  }
  50%{
    transform: scale(0.96, 1.06) rotate(-2deg) translate(-0.5px, 0.5px);
  }
  75%{
    transform: scale(1.04, 0.97) rotate(2deg) translate(0.3px, -0.5px);
    filter: drop-shadow(0 0 7px #ff3700) drop-shadow(0 0 16px #ffa200) drop-shadow(0 0 26px #ffd900);
  }
}

@keyframes flameFlickerB{
  0%, 100%{
    transform: scale(1) rotate(1.5deg);
  }
  30%{
    transform: scale(0.94, 1.07) rotate(-2deg) translate(-0.5px, -0.8px);
    filter: drop-shadow(0 0 8px #ff3700) drop-shadow(0 0 18px #ff9e00) drop-shadow(0 0 28px #ffe600);
  }
  60%{
    transform: scale(1.07, 0.94) rotate(1.8deg) translate(0.4px, 0.3px);
  }
  85%{
    transform: scale(0.97, 1.02) rotate(-1deg);
    filter: drop-shadow(0 0 10px #ff2600) drop-shadow(0 0 20px #ffaa00) drop-shadow(0 0 30px #ffff00);
  }
}

/* Layered flame colors for rich vibrancy and depth */
.flame-outer{
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #ff1a00 0%, #ff5500 28%, #ff9e00 62%, #ffd000 100%);
}

.flame-inner{
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 20px;
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, #ff8000 0%, #ffea00 55%, #fffab3 100%);
}

.flame-core{
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 12px;
  border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
}

.flame-blue{
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 150, 255, 0.92);
  filter: blur(0.5px);
}

/* Wick */
.candle-wick{
  width: 2.8px;
  height: 8px;
  background: #23120c;
  border-radius: 1px;
  margin: 0 auto -2px;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
  position: relative;
  z-index: 2;
}

/* 1 and 8 Number Digits */
.candle-digit{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  line-height: 1;
}

.candle-digit__front{
  font-family: var(--serif), "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 38px;
  line-height: 1;
  display: block;
  background: linear-gradient(145deg, #fffdf7 0%, #fae69e 22%, #f59e0b 55%, #d97706 78%, #78350f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(1px 1px 0px #ffffff)
    drop-shadow(-1px -1px 0px #fde68a)
    drop-shadow(0 2px 0px #b45309)
    drop-shadow(0 4px 1px #78350f)
    drop-shadow(0 8px 14px rgba(60, 4, 20, 0.45));
  position: relative;
  z-index: 2;
  transition: transform 0.2s ease;
}

.candle-digit__glow{
  position: absolute;
  inset: 0;
  font-family: var(--serif), "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 38px;
  line-height: 1;
  color: #fbbf24;
  opacity: 0.45;
  filter: blur(3px);
  pointer-events: none;
  z-index: 1;
}

/* Golden Anchor Pin embedded in frosting */
.candle-pin{
  width: 3.5px;
  height: 11px;
  background: linear-gradient(180deg, #d97706, #78350f);
  border-radius: 1px;
  margin: -1px auto 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Smoke effect on blowout */
.flame-smoke{
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(180, 180, 180, 0.55);
  filter: blur(2px);
  opacity: 0;
  pointer-events: none;
}

/* Blown-out state */
.cake-3d.is-blown .flame-body,
.cake-3d.is-blown .flame-aura{
  opacity: 0 !important;
  transform: scale(0) !important;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.cake-3d.is-blown .flame-smoke{
  animation: smokeRise 1.8s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes smokeRise{
  0%{
    opacity: 0.85;
    transform: translate(-50%, 0) scale(1);
  }
  50%{
    opacity: 0.6;
    transform: translate(-70%, -24px) scale(2.2);
  }
  100%{
    opacity: 0;
    transform: translate(-30%, -46px) scale(3.5);
  }
}
.cakeWishBadge{
  font-family:var(--sans);
  font-style:italic;
  font-size:14px;
  letter-spacing:.05em;
  color:var(--wine-700);
  background:rgba(255,255,255,.8);
  border:1px solid rgba(215,154,63,.4);
  padding:6px 16px;
  border-radius:999px;
  margin-top:6px;
  opacity:0;
  transform:translateY(6px);
  transition:all .5s var(--easeOut);
  pointer-events:none;
}
.cakeWishBadge.is-visible{
  opacity:1;
  transform:translateY(0);
}

/* ============================================================
   PAGE 4 — OUR STORY, ON FILM (a little three-shot camera)
   ============================================================ */
.pageInner--camera{ padding-top:clamp(14px,3.6vh,36px); gap:clamp(6px,1.2vh,14px); }

.cameraRig{
  position:relative;
  margin:clamp(8px,1.6vh,18px) 0 clamp(2px,.6vh,8px);
  perspective:1000px;
}
.photoCam{
  position:relative;
  width:clamp(272px,84vw,392px);
  padding:14px 14px 16px;
  border-radius:22px;
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,.07) 0 2px, transparent 2px 5px),
    radial-gradient(140% 100% at 30% 0%, rgba(255,255,255,.06), transparent 55%),
    linear-gradient(160deg, var(--wine-600), var(--wine-900) 58%, var(--wine-950));
  box-shadow:
    inset 0 0 0 1px rgba(240,194,116,.32),
    inset 0 1px 0 rgba(255,255,255,.12),
    0 30px 54px -22px rgba(10,1,5,.75);
  animation:cameraSway 9s ease-in-out infinite;
}
@keyframes cameraSway{
  0%,100%{ transform:rotate(-.6deg); }
  50%{ transform:rotate(.6deg); }
}
.cameraRig__shadow{
  width:min(72vw,300px); height:26px; margin:6px auto 0;
  background:radial-gradient(closest-side, rgba(0,0,0,.55), transparent 72%);
  filter:blur(2px);
}
.camera__lug{
  position:absolute; top:-6px; width:15px; height:15px; border-radius:50%;
  background:radial-gradient(circle at 34% 30%, var(--gold-1), var(--gold-2) 75%);
  box-shadow:0 2px 5px rgba(0,0,0,.45), inset 0 0 0 2px rgba(0,0,0,.18);
}
.camera__lug--l{ left:16px; }
.camera__lug--r{ right:16px; }

/* top deck */
.camera__top{
  position:relative;
  display:flex; align-items:center; gap:10px;
  height:34px; padding:0 10px;
  margin-bottom:12px;
  border-radius:10px 10px 4px 4px;
  background:linear-gradient(180deg, #d9b06e, #a9803f 55%, #7c5a26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -3px 4px rgba(0,0,0,.35),
    0 3px 8px rgba(0,0,0,.3);
}
.camera__viewfinderBump{
  position:absolute; left:14%; top:-9px; width:34px; height:13px;
  border-radius:6px 6px 3px 3px;
  background:linear-gradient(180deg, #d9b06e, #7c5a26);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 3px 6px rgba(0,0,0,.35);
}
.camera__hotshoe{
  width:16px; height:9px; border-radius:2px; margin-left:30%;
  background:#221f1c;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}
.camera__dial{
  width:24px; height:24px; border-radius:50%; margin-left:auto;
  background:conic-gradient(from 0deg, #d9b06e, #7c5a26, #d9b06e, #7c5a26, #d9b06e);
  box-shadow:0 2px 4px rgba(0,0,0,.4), inset 0 0 0 2px rgba(0,0,0,.28);
  position:relative;
}
.camera__dialNotch{
  position:absolute; top:2px; left:50%; width:2px; height:6px;
  background:rgba(255,250,244,.85); transform:translateX(-50%); border-radius:1px;
}
.camera__shutter{
  position:relative; width:32px; height:32px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #fff8ef, var(--gold-1) 55%, var(--gold-2) 100%);
  border:2px solid rgba(255,255,255,.55);
  box-shadow:0 3px 8px rgba(0,0,0,.4), inset 0 -2px 3px rgba(120,60,10,.32);
  cursor:pointer; transition:transform .2s var(--easeOut);
}
.camera__shutter:hover{ transform:translateY(-1px); }
.camera__shutter:active{ transform:scale(.9); }
.camera__shutterRing{
  position:absolute; top:50%; left:50%; width:8px; height:8px; border-radius:50%;
  background:var(--wine-800); transform:translate(-50%,-50%);
  box-shadow:0 0 0 2px rgba(255,255,255,.55);
}

/* front: lens + screen */
.camera__front{
  display:flex; align-items:stretch; gap:clamp(10px,2.4vw,16px);
}
.camera__lensCluster{
  flex:0 0 clamp(78px,24vw,102px);
  display:flex; flex-direction:column; align-items:center; gap:9px;
  padding-top:4px;
}
.camera__lens{
  position:relative; width:100%; aspect-ratio:1; border-radius:50%;
  background:radial-gradient(circle at 38% 34%, #3c3c3c, #0d0d0d 72%);
  box-shadow:0 10px 20px -9px rgba(0,0,0,.65), inset 0 0 0 3px rgba(0,0,0,.5);
}
.camera__lensRing{ position:absolute; border-radius:50%; }
.camera__lensRing--3{ inset:3%; box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.08); }
.camera__lensRing--2{ inset:14%; box-shadow:inset 0 0 0 2px rgba(240,194,116,.55); }
.camera__lensRing--1{ inset:24%; box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.1); }
.camera__lensGlass{
  position:absolute; inset:32%; border-radius:50%; overflow:hidden;
  background:radial-gradient(circle at 34% 28%, rgba(255,255,255,.4), rgba(20,22,32,.92) 55%, #05070c 100%);
  box-shadow:inset 0 0 12px rgba(0,0,0,.85);
}
.camera__lensGlint{
  position:absolute; left:-30%; top:-40%; width:70%; height:70%;
  background:radial-gradient(circle, rgba(255,255,255,.55), transparent 65%);
  transform:rotate(-20deg); filter:blur(1px);
}
.camera__flashBulb{
  width:34%; aspect-ratio:1; border-radius:4px;
  background:linear-gradient(160deg, #fff, #cfcfcf);
  box-shadow:inset 0 0 0 2px rgba(0,0,0,.14), 0 2px 4px rgba(0,0,0,.3);
}
.camera__plate{
  font-family:var(--sans); font-style:italic; letter-spacing:.06em; text-align:center;
  font-size:clamp(9.5px,1.6vw,11.5px); color:var(--gold-1); opacity:.9;
}
.camera__plate em{
  display:block; font-style:normal; letter-spacing:.1em; text-transform:uppercase;
  font-size:.78em; color:rgba(255,246,238,.5); margin-top:1px;
}

.camera__screenWell{
  position:relative; flex:1;
  display:flex; flex-direction:column; align-items:center; gap:8px;
}
.cameraScreenBezel{
  position:relative; width:100%; padding:8px; border-radius:9px;
  background:linear-gradient(160deg, #232323, #060606);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.05),
    inset 0 2px 6px rgba(0,0,0,.6),
    0 6px 16px -9px rgba(0,0,0,.65);
}
.cameraScrew{
  position:absolute; width:6px; height:6px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #eee, #888);
  box-shadow:0 1px 2px rgba(0,0,0,.5);
}
.cameraScrew--tl{ top:4px; left:4px; }
.cameraScrew--tr{ top:4px; right:4px; }

.cameraLCD{
  position:relative; aspect-ratio:4/3; border-radius:4px; overflow:hidden;
  background:#050506; cursor:grab; touch-action:pan-y;
}
.cameraLCD:active{ cursor:grabbing; }
.cameraLCD__glass{
  position:absolute; inset:0; z-index:5; pointer-events:none;
  background:linear-gradient(125deg,
    rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 28%,
    rgba(255,255,255,0) 72%, rgba(255,255,255,.06) 100%);
}
.cameraStandby{
  position:absolute; inset:0; z-index:2;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  transition:opacity .4s ease;
}
.cameraStandby.is-hidden{ opacity:0; pointer-events:none; }
.cameraStandby__dot{
  width:7px; height:7px; border-radius:50%; background:var(--gold-1);
  box-shadow:0 0 10px 2px rgba(240,194,116,.55);
  animation:standbyPulse 2.4s ease-in-out infinite;
}
@keyframes standbyPulse{
  0%,100%{ opacity:.4; transform:scale(.85); }
  50%{ opacity:1; transform:scale(1.1); }
}
.cameraStandby p{
  font-family:var(--sans); font-style:italic; font-size:clamp(11px,2vw,13px);
  color:rgba(255,246,238,.65); letter-spacing:.04em;
}
.cameraViewer{
  position:absolute; inset:0; z-index:3;
  opacity:0; transition:opacity .5s ease;
  display:flex; flex-direction:column;
}
.cameraViewer.is-live{ opacity:1; }
.cameraFrame{
  position:relative; flex:1; overflow:hidden;
  background:linear-gradient(150deg, var(--wine-700), var(--wine-950));
  display:flex; align-items:center; justify-content:center;
}
.cameraFrame img{ width:100%; height:100%; object-fit:cover; display:block; }
.cameraFrame__mono{ font-family:var(--script); font-size:clamp(26px,5vw,38px); color:rgba(255,246,238,.85); }
.cameraFrame.is-swap{ animation:cameraFrameSwap .45s var(--easeOut); }
@keyframes cameraFrameSwap{
  0%{ opacity:0; transform:translateX(calc(var(--dir,1) * 22px)) scale(.97); }
  100%{ opacity:1; transform:translateX(0) scale(1); }
}
.cameraLCD__hud{
  position:absolute; left:0; right:0; top:0; z-index:4;
  display:flex; align-items:center; gap:6px;
  padding:5px 7px;
  background:linear-gradient(180deg, rgba(0,0,0,.55), transparent);
}
.cameraLCD__rec{
  width:6px; height:6px; border-radius:50%; background:#e34b4b;
  box-shadow:0 0 5px 1px rgba(227,75,75,.7);
  animation:recBlink 1.6s steps(1) infinite;
}
@keyframes recBlink{ 0%,49%{ opacity:1; } 50%,100%{ opacity:.25; } }
.cameraCounter{
  font-family:var(--sans); font-weight:600; letter-spacing:.06em;
  font-size:10.5px; color:rgba(255,246,238,.9); font-variant-numeric:tabular-nums;
}
.cameraLCD__battery{
  margin-left:auto; width:14px; height:7px; border-radius:1.5px;
  border:1px solid rgba(255,246,238,.7); position:relative;
}
.cameraLCD__battery::before{
  content:''; position:absolute; inset:1px; width:70%;
  background:rgba(255,246,238,.75); border-radius:.5px;
}
.cameraLCD__battery::after{
  content:''; position:absolute; right:-3px; top:2px; width:2px; height:3px;
  background:rgba(255,246,238,.7); border-radius:0 1px 1px 0;
}
.cameraCaption{
  position:relative; z-index:4;
  margin:0; padding:5px 8px 6px;
  font-family:var(--sans); font-style:italic; font-size:clamp(10.5px,1.9vw,12.5px);
  color:rgba(255,246,238,.9); text-align:center;
  background:linear-gradient(0deg, rgba(0,0,0,.65), transparent);
}
.cameraFlash{
  position:absolute; inset:0; z-index:6; background:#fff; opacity:0; pointer-events:none;
}
.cameraFlash.is-firing{ animation:cameraFlashPop .5s ease-out; }
@keyframes cameraFlashPop{ 0%{ opacity:.92; } 100%{ opacity:0; } }

.cameraDots{ display:flex; align-items:center; gap:6px; }
.cameraDot{
  width:5px; height:5px; border-radius:50%;
  background:rgba(255,246,238,.28);
  transition:background .25s ease, transform .25s ease;
}
.cameraDot.is-active{ background:var(--gold-1); transform:scale(1.3); }

.cameraPad{
  position:relative; width:70px; height:70px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #2c2c2c, #0a0a0a 72%);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.06),
    inset 0 2px 6px rgba(0,0,0,.5),
    0 8px 18px -8px rgba(0,0,0,.65);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 4px;
}
.cameraPad__btn{
  position:relative; z-index:2; width:28px; height:28px; border-radius:50%;
  background:rgba(255,246,238,.18); color:var(--cream-0);
  border:1.5px solid rgba(255,246,238,.5); cursor:pointer; font-size:13px;
  box-shadow:0 2px 6px rgba(0,0,0,.4);
  display:flex; align-items:center; justify-content:center; line-height:1;
  transition:background .2s ease, transform .2s var(--easeOut), opacity .2s ease;
}
.cameraPad__btn:hover:not(:disabled){ background:rgba(255,246,238,.32); }
.cameraPad__btn:active:not(:disabled){ transform:scale(.88); }
.cameraPad__btn:disabled{ opacity:.25; cursor:default; }

.camera__grip{
  flex:0 0 11px; align-self:stretch; border-radius:7px;
  background:repeating-linear-gradient(115deg, rgba(0,0,0,.4) 0 3px, rgba(0,0,0,.16) 3px 6px);
  box-shadow:inset 0 0 6px rgba(0,0,0,.55);
}

.photoCam.is-on .camera__lensGlass{
  box-shadow:inset 0 0 12px rgba(0,0,0,.85), 0 0 14px rgba(240,194,116,.3);
}

.cameraHint{
  font-family:var(--sans); font-style:italic; font-size:clamp(12px,2vw,14.5px);
  color:rgba(255,246,238,.7); letter-spacing:.03em; text-align:center;
  max-width:34ch;
}

/* ============================================================
   PAGE 5 — THE WAX-SEALED BIRTHDAY ENVELOPE
   ============================================================ */
.pageInner--envelope{ gap:clamp(16px,3.4vh,32px); }
.envelope{
  position:relative;
  width:min(78vw,340px);
  aspect-ratio:1.5 / 1;
  background:none; border:0; padding:0; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:14px;
  perspective:1000px;
  opacity:0; transform:translateY(16px);
  animation:pageFadeUp .9s var(--easeOut) .45s forwards;
}
.envelope__body{
  position:relative; display:block; width:100%; height:100%;
  transform-style:preserve-3d;
  transition:transform .6s var(--easeOut);
  filter:drop-shadow(0 26px 34px rgba(10,1,5,.55));
}
.envelope:hover .envelope__body{ transform:translateY(-6px); }
.envelope__pocket{
  position:absolute; inset:0; border-radius:8px;
  background:linear-gradient(160deg, var(--cream-0), var(--cream-2));
  border:1px solid rgba(122,22,56,.2);
  z-index:3;
  clip-path:polygon(0 0, 50% 42%, 100% 0, 100% 100%, 0 100%);
}
.envelope__paper{
  position:absolute; left:6%; top:8%; width:88%; height:84%;
  border-radius:4px; z-index:2;
  background:linear-gradient(180deg,#fffdf8,#f6e9d8);
  box-shadow:0 8px 20px -10px rgba(40,4,16,.5);
  transform:translateY(0) rotate(0deg);
  transition:transform .75s var(--easeOut), opacity .5s ease;
}
.envelope.is-open .envelope__paper{ transform:translateY(-46%) rotate(-1.5deg); }
.envelope.is-sending .envelope__paper{ transform:translateY(-120%) scale(1.14); opacity:0; }
.envelope__flap{
  position:absolute; left:0; top:0; width:100%; height:52%;
  z-index:4; transform-origin:top center;
  background:linear-gradient(175deg,#f3e2cd,#e6d0b6);
  border:1px solid rgba(122,22,56,.18);
  clip-path:polygon(0 0, 100% 0, 50% 100%);
  transition:transform .8s var(--easeOut), z-index 0s .4s;
}
.envelope.is-open .envelope__flap{ transform:rotateX(-172deg); z-index:1; }
.envelope__seal{
  position:absolute; left:50%; top:46%; z-index:6;
  width:46px; height:46px; margin:-23px 0 0 -23px;
  border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(circle at 35% 28%, #c9375c, #7a1638 70%);
  color:rgba(255,246,238,.92);
  box-shadow:0 8px 18px -8px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.18);
  transition:opacity .35s ease, transform .5s var(--easeOut);
}
.envelope.is-open .envelope__seal{ opacity:0; transform:scale(.6) translateY(6px); }
.envelope__hint{
  position:absolute; left:50%; bottom:-30px; transform:translateX(-50%);
  font-family:var(--sans); font-style:italic; letter-spacing:.14em; text-transform:uppercase;
  font-size:clamp(10.5px,2vw,12.5px); color:var(--gold-1); opacity:.8;
  animation:hintPulse 2.6s ease-in-out infinite;
  white-space:nowrap;
}
.envelope.is-open .envelope__hint{ opacity:0; }
@keyframes hintPulse{ 0%,100%{ opacity:.45; } 50%{ opacity:.95; } }

/* ============================================================
   PAGE 6 — THE LETTER
   ============================================================ */
.letterScroll{
  position:relative; z-index:2;
  flex:1 1 auto; min-height:0; width:100%;
  overflow-y:auto; -webkit-overflow-scrolling:touch;
  padding:clamp(64px,10vh,96px) max(clamp(16px,5vw,40px), env(safe-area-inset-right)) clamp(24px,4vh,36px) max(clamp(16px,5vw,40px), env(safe-area-inset-left));
  display:flex; justify-content:center;
  box-sizing:border-box;
}
.letter{
  position:relative;
  width:min(100%,660px);
  align-self:flex-start;
  padding:clamp(30px,5vw,54px) clamp(22px,5vw,52px) clamp(34px,5vw,56px);
  border-radius:6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,250,242,.9)),
    repeating-linear-gradient(180deg, rgba(122,22,56,.05) 0 1px, transparent 1px 34px);
  border:1px solid rgba(122,22,56,.16);
  box-shadow:0 30px 60px -30px rgba(60,4,20,.5);
  text-align:left;
  opacity:0;
  transform:translateY(26px) rotateX(-12deg) scale(.97);
  transform-origin:top center;
  transition:opacity .8s var(--easeOut), transform 1s var(--easeOut);
}
.letter.is-open{ opacity:1; transform:translateY(0) rotateX(0) scale(1); }
.letter__wax{
  position:absolute; right:clamp(18px,4vw,30px); top:calc(-1 * clamp(14px,3vw,20px));
  width:clamp(34px,7vw,46px); aspect-ratio:1; border-radius:999px;
  background:radial-gradient(circle at 34% 28%, #c9375c, #7a1638 72%);
  box-shadow:0 8px 16px -8px rgba(0,0,0,.5);
}
.letter__date{
  font-family:var(--sans); font-style:italic; letter-spacing:.1em;
  font-size:clamp(12px,2.2vw,15px); color:var(--ink-2); margin-bottom:clamp(10px,2vh,18px);
}
.letter__salutation{
  font-family:var(--script); font-weight:400;
  font-size:clamp(32px,7vw,54px); line-height:1; color:var(--wine-700);
  margin-bottom:clamp(12px,2.4vh,20px);
}
.letter__line{
  font-family:var(--sans); font-size:clamp(15px,2.7vw,19.5px); line-height:1.85;
  color:var(--ink-1); margin-bottom:clamp(12px,2.2vh,18px);
  opacity:0; transform:translateY(10px);
}
.letter.is-open .letter__line{ animation:pageFadeUp .8s var(--easeOut) forwards; }
.letter.is-open .letter__line:nth-child(4){ animation-delay:.5s; }
.letter.is-open .letter__line:nth-child(5){ animation-delay:.7s; }
.letter.is-open .letter__line:nth-child(6){ animation-delay:.9s; }
.letter.is-open .letter__line:nth-child(7){ animation-delay:1.1s; }
.letter__closing{
  font-family:var(--serif); font-weight:600;
  font-size:clamp(17px,3.2vw,23px); line-height:1.5; color:var(--wine-800);
  margin-top:clamp(14px,2.6vh,22px);
  opacity:0; transform:translateY(10px);
}
.letter__sign{
  font-family:var(--script); font-size:clamp(28px,6vw,44px);
  color:var(--wine-600); margin-top:clamp(6px,1.4vh,12px);
  opacity:0; transform:translateY(10px);
}
.letter.is-open .letter__closing{ animation:pageFadeUp .9s var(--easeOut) 1.35s forwards; }
.letter.is-open .letter__sign{ animation:pageFadeUp .9s var(--easeOut) 1.6s forwards; }

#letter [data-type]{ min-height: 1.2em; }
#letter [data-type].is-typing::after{
  content: '';
  display: inline-block;
  width: 1px; height: 1em;
  margin-left: 2px;
  vertical-align: -0.14em;
  background: currentColor;
  animation: letterCaret 0.85s steps(1) infinite;
}
@keyframes letterCaret{ 0%,49%{opacity:1} 50%,100%{opacity:0} }

/* ============================================================
   PAGE 7 — THE WISH JAR
   ============================================================ */
.jarWrap{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  margin-top: 1.2rem;
}

.jar{
  position: relative;
  width: 210px; height: 280px;
  border: 0; background: none; padding: 0;
  cursor: pointer;
}
.jar__shadow{
  position: absolute; left: 50%; bottom: -6px;
  transform: translateX(-50%);
  width: 190px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(120,70,60,0.30), rgba(120,70,60,0) 70%);
  filter: blur(2px);
  z-index: 0;
}

/* lid */
.jar__lid{
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  width: 122px; height: 34px;
  transform-origin: 100% 100%;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 5;
}
.jar__lidTop{
  position: absolute; inset: 0 0 12px 0;
  border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, #f0d7ae, #d3ab77 45%, #b98d5c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), inset 0 -3px 6px rgba(120,80,40,0.28);
}
.jar__lidBand{
  position: absolute; left: 3px; right: 3px; bottom: 0; height: 15px;
  border-radius: 3px 3px 6px 6px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.28) 0 2px, rgba(0,0,0,0.06) 2px 5px),
    linear-gradient(180deg, #d9b381, #a97f52);
  box-shadow: inset 0 -2px 4px rgba(90,60,30,0.35);
}
.jar.is-open .jar__lid{ transform: translateX(-50%) translate(-92px, -46px) rotate(-34deg); }

/* neck + rim */
.jar__neck{
  position: absolute; left: 50%; top: 26px;
  transform: translateX(-50%);
  width: 128px; height: 22px;
  border-radius: 8px 8px 10px 10px / 6px 6px 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(228,236,236,0.42));
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: inset 0 -6px 10px rgba(150,170,170,0.25), 0 2px 4px rgba(120,70,60,0.10);
  z-index: 4;
}

/* body */
.jar__glass{
  position: absolute; left: 50%; top: 44px;
  transform: translateX(-50%);
  width: 186px; height: 226px;
  border-radius: 26px 26px 54px 54px / 18px 18px 46px 46px;
  background:
    linear-gradient(100deg,
      rgba(255,255,255,0.55) 0%,
      rgba(214,232,231,0.30) 22%,
      rgba(255,255,255,0.12) 48%,
      rgba(210,228,228,0.28) 76%,
      rgba(255,255,255,0.60) 100%);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow:
    inset 0 0 26px rgba(255,255,255,0.55),
    inset -14px 0 26px rgba(150,175,175,0.28),
    inset 14px 0 26px rgba(255,255,255,0.50),
    inset 0 -18px 26px rgba(140,165,165,0.22),
    0 24px 34px rgba(120,70,60,0.16);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  overflow: hidden;
  z-index: 2;
}
.jar__inner{
  position: absolute; inset: 0;
  background: radial-gradient(120% 70% at 50% 105%, rgba(150,175,175,0.30), rgba(255,255,255,0) 62%);
}
.jar__floor{
  position: absolute; left: 8px; right: 8px; bottom: 6px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(160,185,185,0.35));
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.8);
  z-index: 3;
}
.jar__shine{
  position: absolute; left: 20px; top: 16px;
  width: 14px; height: 150px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.06));
  filter: blur(0.6px);
  z-index: 4;
}
.jar__shine--soft{ left: 42px; top: 26px; width: 6px; height: 96px; opacity: 0.6; }
.jar__edge{
  position: absolute; left: 4px; top: 8px; bottom: 14px;
  width: 7px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.85), rgba(255,255,255,0));
  z-index: 4;
}
.jar__edge--right{ left: auto; right: 4px; background: linear-gradient(270deg, rgba(255,255,255,0.8), rgba(255,255,255,0)); }
.jar__gloss{
  position: absolute; right: 16px; bottom: 26px;
  width: 28px; height: 66px;
  border-radius: 30px;
  background: linear-gradient(200deg, rgba(255,255,255,0.55), rgba(255,255,255,0));
  filter: blur(3px);
  z-index: 4;
}
.jar__ribbon{
  position: absolute; left: 50%; top: 46px;
  transform: translateX(-50%);
  width: 132px; height: 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f3c3cb, #dc94a2);
  box-shadow: 0 3px 6px rgba(120,70,60,0.18), inset 0 1px 0 rgba(255,255,255,0.6);
  z-index: 4;
}

.jar__chits{
  position: absolute; left: 50%; bottom: 26px;
  transform: translateX(-50%);
  width: 148px; height: 92px;
  z-index: 2;
  transition: opacity 0.5s ease, transform 0.6s ease;
}
.jar.is-open .jar__chits{ opacity: 0.15; }

.chit{
  display: block;
  width: 42px; height: 26px;
  border-radius: 3px;
  border: 0;
  box-shadow: 0 4px 8px rgba(120, 70, 60, 0.22), inset 0 1px 0 rgba(255,255,255,0.75);
}
.chit--inJar{ position: absolute; }
.chit--inJar:nth-child(1){ left: 4px;  bottom: 2px;  transform: rotate(-11deg); }
.chit--inJar:nth-child(2){ left: 52px; bottom: 0;    transform: rotate(5deg); }
.chit--inJar:nth-child(3){ left: 96px;bottom: 4px;  transform: rotate(14deg); }
.chit--inJar:nth-child(4){ left: 22px; bottom: 22px; transform: rotate(8deg); }
.chit--inJar:nth-child(5){ left: 74px; bottom: 24px; transform: rotate(-7deg); }
.chit--inJar:nth-child(6){ left: 46px; bottom: 44px; transform: rotate(3deg); }

.chit--rose{ background: linear-gradient(160deg, #f4b8c0, #e08d9c); }
.chit--blush{ background: linear-gradient(160deg, #f6d9c0, #e8b393); }
.chit--gold{ background: linear-gradient(160deg, #f2e0ad, #d9bd7a); }

.jar__hint{
  position: absolute; left: 50%; bottom: -32px;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  opacity: 0.7;
  color: var(--ink-2);
}

.chitTray{
  display: flex; gap: 1.1rem;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  margin-top: 1.8rem;
}
.chitTray.is-live{ opacity: 1; transform: translateY(0); }

.chit--pick{
  position: relative;
  width: 76px; height: 50px;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), box-shadow 0.35s ease, opacity 0.3s ease;
}
.chit--pick:hover{ transform: translateY(-6px) rotate(-2deg); }
.chit--pick.is-chosen{ transform: translateY(-14px) scale(1.06); }
.chit__fold{
  position: absolute; left: 0; right: 0; top: 33%;
  height: 1px;
  background: rgba(255,255,255,0.65);
}
.chit__fold--b{ top: 66%; }

.chitOpenWrap{
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
  margin-top: 1.6rem;
}
.chitOpen{
  width: min(380px, 86vw);
  padding: 2.2rem 1.8rem;
  border-radius: 12px;
  background: linear-gradient(160deg, #fff8ef, #f8e9dc);
  box-shadow: 0 20px 40px rgba(120, 70, 60, 0.2), inset 0 1px 0 rgba(255,255,255,0.8);
  transform: scaleY(0.14) rotateX(-40deg);
  transform-origin: center top;
  opacity: 0;
  transition: transform 0.75s cubic-bezier(0.22,1,0.36,1), opacity 0.5s ease;
}
.chitOpen.is-open{ transform: scaleY(1) rotateX(0deg); opacity: 1; }
.chitOpen--rose{ background: linear-gradient(160deg, #fff2f4, #f8d9de); }
.chitOpen--blush{ background: linear-gradient(160deg, #fff5ec, #f8e0cf); }
.chitOpen--gold{ background: linear-gradient(160deg, #fffaea, #f5eccd); }
.chitOpen__text{
  font-family: var(--sans);
  font-style: italic;
  font-size: clamp(1.15rem, 3.4vw, 1.45rem);
  line-height: 1.6;
  text-align: center;
  margin: 0;
  color: var(--ink-1);
}

[hidden]{ display: none !important; }

/* ============================================================
   PAGE 8 — THE ENDING / GRAND FINALE
   ============================================================ */
.pageInner--ending{
  padding-top: clamp(20px, 6vh, 56px);
  gap: clamp(10px, 1.8vh, 16px);
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}
.pageInner--ending .pageTitle{ margin-bottom: 2px; }
.pageInner--ending .pageSub{
  max-width: 36ch;
  margin-top: clamp(6px, 1.4vh, 12px);
  animation-delay: .85s;
}

.endingFlourish{
  display: block;
  width: 64px; height: 10px;
  position: relative;
  opacity: 0;
  animation: endingFlourishIn .9s var(--easeOut) .55s forwards;
}
.endingFlourish::before{
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-1), transparent);
  transform: translate(-50%, -50%) scaleX(0);
  transform-origin: center;
  animation: endingFlourishGrow 1s var(--easeOut) .65s forwards;
}
.endingFlourish::after{
  content: '\2726';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: var(--gold-1); font-size: 11px;
  animation: endingFlourishPop .6s var(--easeOut) 1.2s forwards;
}
@keyframes endingFlourishIn{ to{ opacity: 1; } }
@keyframes endingFlourishGrow{ to{ transform: translate(-50%, -50%) scaleX(1); } }
@keyframes endingFlourishPop{
  0%{ transform: translate(-50%, -50%) scale(0) rotate(-45deg); }
  60%{ transform: translate(-50%, -50%) scale(1.3) rotate(8deg); }
  100%{ transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

.endingHeart{
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  color: var(--gold-1);
  margin-top: clamp(4px, 1vh, 10px);
  opacity: 0;
  animation: pageFadeUp .8s var(--easeOut) 1.35s forwards;
}
.endingHeart svg{ position: relative; z-index: 1; animation: endingHeartBeat 2.6s ease-in-out 2.2s infinite; }
.endingHeart__ring{
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(240,194,116,.5);
  animation: endingRingPulse 2.6s ease-out 2.2s infinite;
}
@keyframes endingHeartBeat{
  0%, 100%{ transform: scale(1); }
  50%{ transform: scale(1.14); }
}
@keyframes endingRingPulse{
  0%{ transform: scale(.7); opacity: .8; }
  70%{ opacity: 0; }
  100%{ transform: scale(1.9); opacity: 0; }
}

.endingSign{
  font-family: var(--script); font-size: clamp(22px, 4vw, 32px);
  color: rgba(255,246,238,.9);
  margin: 0;
  opacity: 0;
  animation: pageFadeUp .8s var(--easeOut) 1.7s forwards;
}

.endingSparkles{
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden; pointer-events: none;
}
.endingSpark{
  position: absolute;
  left: var(--x);
  bottom: -6%;
  width: var(--sz); height: var(--sz);
  border-radius: 50%;
  background: var(--gold-1);
  box-shadow: 0 0 6px 1px rgba(240,194,116,.65);
  opacity: 0;
  animation: endingSparkDrift var(--dur) ease-in var(--d) infinite;
}
@keyframes endingSparkDrift{
  0%{ transform: translateY(0) scale(.6); opacity: 0; }
  8%{ opacity: .9; }
  55%{ opacity: .55; }
  100%{ transform: translateY(-92vh) scale(1); opacity: 0; }
}

.pagenav--ending .btn{
  opacity: 0; transform: translateY(8px);
  animation: pageFadeUp .7s var(--easeOut) forwards;
}
.pagenav--ending .btn--back{ animation-delay: 2s; }
.pagenav--ending .btn--continue{ animation-delay: 2.1s; }

/* ============================================================
   MUSIC TOGGLE — fixed top right
   ============================================================ */
.musicToggle{
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 10px;
  border: 1px solid rgba(240,194,116,.55);
  border-radius: 999px;
  background: linear-gradient(160deg, rgba(44,7,20,.82), rgba(76,12,34,.82));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--cream-0);
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.5);
  transition: background .25s ease, transform .2s ease, border-color .25s ease;
}
.musicToggle:hover{ transform: translateY(-1px); border-color: var(--gold-1); }
.musicToggle:active{ transform: translateY(0); }
.musicToggle__icon{ display: block; color: var(--gold-1); }
.musicToggle__icon--off{ display: none; }
.musicToggle.is-muted .musicToggle__icon--on{ display: none; }
.musicToggle.is-muted .musicToggle__icon--off{ display: block; }
.musicToggle__label{
  font-family: var(--sans); font-style: italic; font-weight: 600;
  font-size: 12px; letter-spacing: .03em; color: var(--cream-0);
}
@media (max-width: 480px){
  .musicToggle{ padding: 7px 10px 7px 9px; gap: 5px; }
  .musicToggle__label{ font-size: 11px; }
}

/* ============================================================
   SITE WATERMARK
   ============================================================ */
.siteWatermark{
  position: fixed;
  left: 50%;
  bottom: max(6px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  padding: 3px 10px;
  font-family: var(--sans);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(8px, 1.3vw, 9.5px);
  letter-spacing: .02em;
  color: var(--ink-1);
  background: rgba(255,250,244,.6);
  border-radius: 999px;
  opacity: .5;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(255,255,255,.4);
}

/* ============================================================
   SAFETY NET & FALLBACK
   ============================================================ */
html.safe-mode #hero,
html.safe-mode #eyebrow,
html.safe-mode .targetWrap,
html.safe-mode #target,
html.safe-mode .heart__glow,
html.safe-mode #archery,
html.safe-mode #hint{
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
}
html.safe-mode #hero{ pointer-events: auto !important; }

.safeModeContinue{
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--gold-2, #d79a3f);
  background: rgba(255, 250, 244, .92);
  color: var(--ink-1, #5c1a2c);
  font-family: var(--sans, Georgia, serif);
  font-size: 15px;
  letter-spacing: .02em;
  cursor: pointer;
}
.safeModeContinue[hidden]{ display: none; }

@media (max-width: 480px){
  .cd__unit{ width:calc(33.333% - 8px); }
  .cameraPad{ width:64px; height:64px; }
}

/* ============================================================
   PASSCODE GATE (Required Code: 0421 or 2104)
   Split card styling: Left cute illustration, Right pink dialer
   ============================================================ */
.passcodeGate{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background: var(--cream-0, #fffaf4);
  transition:
    opacity .75s cubic-bezier(.2,.7,.2,1),
    transform .75s cubic-bezier(.2,.7,.2,1),
    visibility 0s linear 0s;
  will-change: opacity, transform;
}

.passcodeGate.is-unlocked{
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity .75s cubic-bezier(.2,.7,.2,1),
    transform .75s cubic-bezier(.2,.7,.2,1),
    visibility 0s linear .75s;
}

.passcodeGate__container{
  display: flex;
  width: 100%;
  height: 100%;
}

/* Left Panel: Cute Illustration & Floating Sparkles */
.passcodeGate__visual{
  flex: 1 1 54%;
  background: linear-gradient(135deg, #fff7f4 0%, #ffedf2 55%, #fce7ec 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 40px;
}

.passcodeVisual__sparkles{
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pSparkle{
  position: absolute;
  font-family: system-ui, -apple-system, sans-serif;
  user-select: none;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(225, 29, 72, 0.15));
}
.pSparkle--1{ top: 14%; left: 10%; font-size: 26px; color: #fb7185; opacity: .7; animation: pFloat 4s ease-in-out infinite alternate; }
.pSparkle--2{ top: 20%; right: 12%; font-size: 20px; color: #f472b6; opacity: .65; animation: pFloat 5.2s ease-in-out .8s infinite alternate; }
.pSparkle--3{ bottom: 16%; left: 14%; font-size: 24px; color: #fda4af; opacity: .7; animation: pFloat 4.6s ease-in-out 1.2s infinite alternate; }
.pSparkle--4{ bottom: 22%; right: 16%; font-size: 22px; color: #f43f5e; opacity: .65; animation: pFloat 3.8s ease-in-out 1.8s infinite alternate; }
.pSparkle--5{ top: 48%; left: 8%; font-size: 18px; color: #fbcfe8; opacity: .6; animation: pFloat 4.2s ease-in-out .4s infinite alternate; }
.pSparkle--6{ top: 52%; right: 8%; font-size: 20px; color: #fda4af; opacity: .6; animation: pFloat 4.8s ease-in-out 1.5s infinite alternate; }

@keyframes pFloat{
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  100% { transform: translateY(-12px) rotate(8deg) scale(1.1); }
}

.passcodeCard{
  background: #ffffff;
  border: 2.5px dashed #f9a8d4;
  border-radius: 36px;
  padding: 24px;
  max-width: 440px;
  width: 88%;
  aspect-ratio: 1 / 1;
  box-shadow:
    0 24px 52px -12px rgba(147, 32, 63, 0.12),
    0 0 0 1px rgba(244, 114, 182, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease;
}
.passcodeCard:hover{
  transform: translateY(-4px);
  box-shadow:
    0 28px 60px -12px rgba(147, 32, 63, 0.18),
    0 0 0 1px rgba(244, 114, 182, 0.2);
}

.passcodeCard__frame{
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff8f9;
}

.passcodeCard__img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Right Panel: Rose & Wine Dial Pad */
.passcodeGate__dialer{
  flex: 1 1 46%;
  background: linear-gradient(150deg, #fb7185 0%, #e11d48 35%, #93203f 72%, #4c0c22 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  color: #ffffff;
  text-align: center;
  position: relative;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}

.passcodeGate__dialer::before{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 25%, rgba(255,255,255,0.18), transparent 60%);
  pointer-events: none;
}

.passcodeTitle{
  font-family: var(--script), "Great Vibes", cursive;
  font-size: clamp(34px, 3.8vw, 48px);
  font-weight: 400;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(76, 12, 34, 0.35);
  margin: 0 0 24px 0;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

/* 4 Heart Slots */
.passcodeSlots{
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  justify-content: center;
}

.passcodeHeart{
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09), inset 0 2px 4px rgba(255, 255, 255, 0.25);
  transition: all 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.passcodeHeart__svg{
  width: 22px;
  height: 22px;
  fill: rgba(255, 255, 255, 0.55);
  transition: all 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.passcodeHeart.is-filled{
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.85), 0 8px 18px rgba(0, 0, 0, 0.14);
  transform: scale(1.08);
}

.passcodeHeart.is-filled .passcodeHeart__svg{
  fill: #e11d48;
  transform: scale(1.15);
}

.passcodeSlots.is-error{
  animation: passcodeShake 0.48s cubic-bezier(.36,.07,.19,.97) both;
}

.passcodeSlots.is-error .passcodeHeart{
  border-color: #fecdd3;
  background: rgba(244, 63, 94, 0.45);
}

.passcodeSlots.is-success .passcodeHeart{
  background: #ffffff;
  border-color: #fde047;
  box-shadow: 0 0 26px rgba(253, 224, 71, 0.95);
  transform: scale(1.14);
}

.passcodeSlots.is-success .passcodeHeart__svg{
  fill: #be123c;
  animation: heartBeat 0.4s ease infinite alternate;
}

@keyframes heartBeat{
  0% { transform: scale(1.05); }
  100% { transform: scale(1.25); }
}

@keyframes passcodeShake{
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Keypad Grid (3x4) */
.passcodeKeypad{
  display: grid;
  grid-template-columns: repeat(3, 68px);
  gap: 16px 18px;
  margin-bottom: 26px;
  justify-content: center;
}

.passcodeKey{
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
}

.passcodeKey:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  background: #fff5f7;
}

.passcodeKey:active, .passcodeKey.is-active{
  transform: scale(0.92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 2px 6px rgba(0, 0, 0, 0.15);
  background: #ffe4e9;
}

.passcodeKey[data-key="0"]{
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 6px 16px rgba(0, 0, 0, 0.12);
}

.passcodeKey[data-key="0"]:active, .passcodeKey[data-key="0"].is-active{
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.75), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.passcodeKey__num{
  font-family: var(--serif), "Fraunces", Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #4c0c22;
  line-height: 1;
  pointer-events: none;
}

.passcodeKey--util .passcodeKey__num{
  font-size: 26px;
  line-height: 0.85;
  color: #7a1638;
}

.passcodeKey__bar{
  width: 14px;
  height: 2.5px;
  background: #f472b6;
  border-radius: 2px;
  margin-top: 3px;
  pointer-events: none;
}

/* UNLOCK CTA Button */
.passcodeUnlockBtn{
  border: none;
  background: #ffffff;
  color: #881337;
  font-family: var(--sans), "Cormorant Garamond", Georgia, serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 13px 52px;
  border-radius: 9999px;
  box-shadow: 0 8px 22px rgba(76, 12, 34, 0.24);
  cursor: pointer;
  transition: transform 0.2s var(--easeOut), box-shadow 0.2s var(--easeOut), background-color 0.2s;
  user-select: none;
}

.passcodeUnlockBtn:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(76, 12, 34, 0.32);
  background: #fff8f9;
}

.passcodeUnlockBtn:active{
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(76, 12, 34, 0.2);
}

/* Status & Hint text */
.passcodeStatus{
  min-height: 24px;
  margin: 14px 0 0 0;
  font-family: var(--sans), Georgia, serif;
  font-size: 15px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s ease;
}

.passcodeStatus.is-error{
  color: #fed7aa;
}

.passcodeStatus.is-success{
  color: #fef08a;
}

/* Responsive Passcode Gate */
@media (max-width: 860px){
  .passcodeGate__container{
    flex-direction: column;
    overflow-y: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .passcodeGate__visual{
    flex: 0 0 auto;
    padding: 24px 20px 10px;
  }
  .passcodeCard{
    max-width: 180px;
    width: 44vw;
    aspect-ratio: 1 / 1;
    padding: 12px;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(147, 32, 63, 0.1);
  }
  .passcodeGate__dialer{
    flex: 1 0 auto;
    padding: 16px 20px 32px;
    box-shadow: none;
  }
  .passcodeTitle{
    font-size: 32px;
    margin-bottom: 14px;
  }
  .passcodeSlots{
    gap: 10px;
    margin-bottom: 18px;
  }
  .passcodeHeart{
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }
  .passcodeHeart__svg{
    width: 19px;
    height: 19px;
  }
  .passcodeKeypad{
    grid-template-columns: repeat(3, 60px);
    gap: 12px 14px;
    margin-bottom: 20px;
  }
  .passcodeKey{
    width: 60px;
    height: 60px;
  }
  .passcodeKey__num{
    font-size: 21px;
  }
  .passcodeKey--util .passcodeKey__num{
    font-size: 22px;
  }
  .passcodeUnlockBtn{
    padding: 12px 44px;
    font-size: 14px;
  }
}

@media (max-height: 680px) and (min-width: 861px){
  .passcodeCard{ max-width: 300px; padding: 16px; }
  .passcodeTitle{ font-size: 34px; margin-bottom: 14px; }
  .passcodeSlots{ margin-bottom: 16px; }
  .passcodeKeypad{ margin-bottom: 16px; gap: 10px 14px; }
  .passcodeKey{ width: 56px; height: 56px; }
  .passcodeKey__num{ font-size: 20px; }
}

/* ============================================================
   SCRAPBOOK CORNER DECORATIONS (Inspired by reference anniversary journal)
   ============================================================ */
.scrapbookCorners{
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

/* --- Top-Left Corner: Torn Paper + Washi Tape --- */
.sbCorner--tl{
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(140px, 16vw, 190px);
  height: clamp(120px, 14vw, 165px);
}

.sbTorn{
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(147, 32, 63, 0.18));
}

.sbWashi{
  position: absolute;
  width: 60px;
  height: 22px;
  background: rgba(254, 243, 235, 0.8);
  border-left: 2px dashed rgba(190, 80, 110, 0.45);
  border-right: 2px dashed rgba(190, 80, 110, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
}

.sbWashi--tl{
  top: 64px;
  left: 38px;
  transform: rotate(-38deg);
}

.sbDoodle{
  position: absolute;
  font-family: var(--script), "Great Vibes", cursive;
  font-size: 22px;
  color: rgba(190, 24, 93, 0.55);
  user-select: none;
}

.sbDoodle--tl{
  top: 102px;
  left: 26px;
  transform: rotate(-12deg);
}

/* --- Top-Right Corner: Layered Cutout Stars + Heart --- */
.sbCorner--tr{
  position: absolute;
  top: 12px;
  right: 14px;
  width: 135px;
  height: 145px;
}

.sbStars{
  position: relative;
  width: 100%;
  height: 100%;
}

.sbStar{
  position: absolute;
  filter: drop-shadow(0 4px 8px rgba(147, 32, 63, 0.22));
  transform-origin: center;
  transition: transform 0.4s ease;
}

.sbStar--1{
  top: 0px;
  right: 20px;
  width: 54px;
  height: 54px;
  transform: rotate(8deg);
  animation: starFloatA 4.5s ease-in-out infinite alternate;
}

.sbStar--2{
  top: 38px;
  right: 4px;
  width: 44px;
  height: 44px;
  transform: rotate(24deg);
  animation: starFloatB 5s ease-in-out 0.5s infinite alternate;
}

.sbStar--3{
  top: 78px;
  right: 14px;
  width: 48px;
  height: 48px;
  transform: rotate(-10deg);
  animation: starFloatA 4s ease-in-out 1s infinite alternate;
}

@keyframes starFloatA{
  0%{ transform: rotate(6deg) translateY(0); }
  100%{ transform: rotate(12deg) translateY(-5px); }
}

@keyframes starFloatB{
  0%{ transform: rotate(22deg) translateY(0); }
  100%{ transform: rotate(28deg) translateY(-4px); }
}

.sbHeartOutline{
  position: absolute;
  filter: drop-shadow(0 2px 4px rgba(147, 32, 63, 0.16));
}

.sbHeartOutline--tr{
  top: 26px;
  left: 6px;
  width: 28px;
  height: 28px;
  transform: rotate(-16deg);
  animation: heartWobble 4s ease-in-out infinite alternate;
}

@keyframes heartWobble{
  0%{ transform: rotate(-16deg) scale(1); }
  100%{ transform: rotate(-8deg) scale(1.08); }
}

/* --- Bottom-Left Corner: Clustered Flowers + Outline Heart --- */
.sbCorner--bl{
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 155px;
  height: 145px;
}

.sbFlowers{
  position: relative;
  width: 100%;
  height: 100%;
}

.sbFlower{
  position: absolute;
  filter: drop-shadow(0 4px 8px rgba(147, 32, 63, 0.24));
  transform-origin: center;
}

.sbFlower--lg{
  bottom: 12px;
  left: 36px;
  width: 62px;
  height: 62px;
  transform: rotate(18deg);
  animation: flowerBreatheA 5s ease-in-out infinite alternate;
}

.sbFlower--md{
  bottom: 48px;
  left: 0px;
  width: 52px;
  height: 52px;
  transform: rotate(-22deg);
  animation: flowerBreatheB 4.2s ease-in-out 0.8s infinite alternate;
}

.sbFlower--sm{
  bottom: 0px;
  left: 0px;
  width: 44px;
  height: 44px;
  transform: rotate(4deg);
  animation: flowerBreatheA 4.6s ease-in-out 1.4s infinite alternate;
}

@keyframes flowerBreatheA{
  0%{ transform: rotate(16deg) scale(1); }
  100%{ transform: rotate(22deg) scale(1.06); }
}

@keyframes flowerBreatheB{
  0%{ transform: rotate(-22deg) scale(1); }
  100%{ transform: rotate(-16deg) scale(1.06); }
}

.sbHeartOutline--bl{
  bottom: 14px;
  left: 106px;
  width: 26px;
  height: 26px;
  transform: rotate(12deg);
  animation: heartWobble 4.2s ease-in-out 1s infinite alternate;
}

/* --- Bottom-Right Corner: Torn Paper + Washi Tape + Overlapping Flower --- */
.sbCorner--br{
  position: absolute;
  bottom: 0;
  right: 0;
  width: clamp(145px, 17vw, 195px);
  height: clamp(125px, 15vw, 165px);
}

.sbWashi--br{
  bottom: 64px;
  right: 36px;
  transform: rotate(34deg);
}

.sbFlower--br{
  bottom: 8px;
  right: 18px;
  width: 64px;
  height: 64px;
  transform: rotate(-14deg);
  animation: flowerBreatheA 4.8s ease-in-out 0.6s infinite alternate;
}

.sbDoodle--br{
  bottom: 24px;
  right: 96px;
  transform: rotate(8deg);
}

/* Responsive adjustments for mobile screens */
@media (max-width: 768px){
  .sbCorner--tl{ width: 110px; height: 95px; }
  .sbWashi--tl{ width: 44px; height: 16px; top: 40px; left: 24px; }
  .sbDoodle--tl{ display: none; }
  .sbCorner--tr{ width: 95px; height: 105px; top: 6px; right: 6px; }
  .sbStar--1{ width: 40px; height: 40px; right: 14px; }
  .sbStar--2{ width: 32px; height: 32px; top: 26px; right: 2px; }
  .sbStar--3{ width: 34px; height: 34px; top: 52px; right: 8px; }
  .sbHeartOutline--tr{ width: 20px; height: 20px; top: 16px; left: 4px; }
  .sbCorner--bl{ width: 110px; height: 105px; bottom: 4px; left: 4px; }
  .sbFlower--lg{ width: 46px; height: 46px; bottom: 8px; left: 28px; }
  .sbFlower--md{ width: 40px; height: 40px; bottom: 36px; left: 0px; }
  .sbFlower--sm{ width: 34px; height: 34px; bottom: 0px; left: 0px; }
  .sbHeartOutline--bl{ display: none; }
  .sbCorner--br{ width: 115px; height: 100px; }
  .sbWashi--br{ width: 44px; height: 16px; bottom: 42px; right: 26px; }
  .sbFlower--br{ width: 48px; height: 48px; bottom: 6px; right: 12px; }
  .sbDoodle--br{ display: none; }
}

