:root {
  --cream: #fff9fb;
  --pink-50: #fff1f6;
  --pink-100: #ffe2ec;
  --pink-200: #ffc3d7;
  --pink-300: #ff9fbd;
  --pink-main: #ff6f9f;
  --pink-deep: #e85083;
  --text-main: #633847;
  --text-soft: #946273;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(164, 74, 107, 0.14);
  --radius: 30px;
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 195, 215, 0.46), transparent 28rem),
    radial-gradient(circle at 90% 80%, rgba(255, 226, 236, 0.8), transparent 30rem),
    linear-gradient(145deg, var(--cream), var(--pink-50));
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: radial-gradient(rgba(255, 111, 159, .24) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 85%);
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.ambient { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .45; animation: float 8s ease-in-out infinite; }
.blob-a { width: 230px; height: 230px; top: -80px; right: -60px; background: #ffd4e3; }
.blob-b { width: 170px; height: 170px; bottom: 4%; left: -70px; background: #ffe0ec; animation-delay: -3s; }
.paw, .sparkle { position: absolute; opacity: .14; user-select: none; }
.paw-a { top: 11%; left: 7%; transform: rotate(-22deg); font-size: 30px; }
.paw-b { bottom: 10%; right: 8%; transform: rotate(18deg); font-size: 34px; }
.sparkle-a { top: 16%; right: 16%; font-size: 26px; animation: sparkle 2.8s ease-in-out infinite; }
.sparkle-b { bottom: 20%; left: 17%; font-size: 20px; animation: sparkle 3.3s ease-in-out infinite .5s; }
.sparkle-c { top: 55%; right: 4%; font-size: 16px; animation: sparkle 2.4s ease-in-out infinite 1s; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1100px);
  margin: 0 auto;
}

.scene {
  display: none;
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) 18px var(--safe-bottom);
  align-items: center;
  justify-content: center;
}
.scene.is-active { display: flex; animation: sceneIn 1.1s ease both; }
.scene-letter.is-active { display: block; }

.card {
  position: relative;
  width: min(100%, 720px);
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--pink-deep);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero-title, h2 {
  margin: 0;
  font-family: "Nunito", "Be Vietnam Pro", sans-serif;
  line-height: 1.15;
}
.hero-title { font-size: clamp(2.45rem, 8vw, 5rem); }
h2 { font-size: clamp(1.65rem, 4.7vw, 3rem); }
.lead { font-size: clamp(1.08rem, 3vw, 1.3rem); font-weight: 700; }
.soft-copy { color: var(--text-soft); line-height: 1.8; }
.microcopy { margin: 12px 0 0; color: var(--text-soft); font-size: .83rem; }


.primary-btn, .secondary-btn, .yes-btn, .no-btn, .music-toggle, .egg {
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
}
.primary-btn, .yes-btn {
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink-main), var(--pink-deep));
  box-shadow: 0 12px 28px rgba(232, 80, 131, .25);
  font-weight: 800;
}
.secondary-btn, .no-btn {
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--pink-200);
  border-radius: 999px;
  color: var(--text-main);
  background: rgba(255,255,255,.9);
  font-weight: 700;
}
.primary-btn:hover, .secondary-btn:hover, .yes-btn:hover, .no-btn:hover, .egg:hover { transform: translateY(-2px); }
.primary-btn:active, .secondary-btn:active, .yes-btn:active, .no-btn:active, .egg:active { transform: translateY(0) scale(.98); }
button:focus-visible { outline: 3px solid rgba(255, 111, 159, .35); outline-offset: 4px; }
button:disabled { cursor: progress; opacity: .64; }

.reveal-line { opacity: 0; animation: fadeUp .8s ease forwards; }
.delay-1 { animation-delay: .55s; }
.delay-2 { animation-delay: 1.1s; }
.delay-3 { animation-delay: 1.7s; }

.days-reveal { margin-top: 30px; }
.date-line { display: grid; gap: 6px; font-weight: 800; color: var(--pink-deep); font-size: clamp(1.15rem, 4vw, 1.5rem); }
.date-arrow { color: var(--pink-main); }
.counter-wrap { margin: 20px 0; display: flex; flex-direction: column; align-items: center; }
.big-counter { font-family: "Nunito", sans-serif; font-size: clamp(4.8rem, 19vw, 8.6rem); line-height: .9; font-weight: 800; color: var(--pink-main); text-shadow: 0 12px 30px rgba(255, 111, 159, .18); }
.counter-label { margin-top: 8px; font-weight: 800; color: var(--text-soft); }

.quantity-panel { margin-top: 24px; padding: 22px; border-radius: 24px; background: linear-gradient(180deg, #fff, var(--pink-50)); border: 1px solid var(--pink-100); }
.quantity-label { font-family: "Nunito", sans-serif; font-size: clamp(2rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: .09em; color: var(--pink-deep); }
.mini-timeline { margin: 14px 0 18px; display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; color: var(--text-soft); font-weight: 700; }
.progress-shell { width: 100%; height: 14px; overflow: hidden; border-radius: 999px; background: #f7d8e3; box-shadow: inset 0 1px 4px rgba(99,56,71,.08); }
.progress-bar { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff9fbd, #ff5f95); transition: width .7s ease; }
.progress-text { margin-top: 10px; font-family: "Nunito", sans-serif; font-size: 1.35rem; font-weight: 800; color: var(--pink-deep); }
.status-copy { margin-bottom: 0; color: var(--text-soft); }
.quality-result { margin-top: 18px; }
.success-tag { display: inline-block; padding: 7px 12px; border-radius: 999px; background: #ffe5ee; color: var(--pink-deep); font-size: .8rem; font-weight: 800; }
.fake-console { min-height: 130px; margin: 16px 0; padding: 16px; text-align: left; color: #774657; background: #fffafd; border: 1px dashed var(--pink-200); border-radius: 18px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; line-height: 1.7; }
.fake-console p { margin: 4px 0; animation: fadeUp .55s ease both; }
.quality-final { display: grid; gap: 6px; margin-bottom: 18px; }
.quality-final span { color: var(--text-soft); font-size: .82rem; font-weight: 800; letter-spacing: .12em; }
.quality-final strong { font-size: clamp(1.35rem, 4vw, 2rem); color: var(--pink-deep); }

.letter-wrap { width: min(100%, 760px); margin: 0 auto; padding: 8vh 0 12vh; }
.letter-intro { margin: 0 auto 70px; }
.letter-stack { display: grid; gap: 38px; }
.letter-block {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 38px);
  border-radius: 26px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 14px 45px rgba(153, 71, 102, .09);
  border: 1px solid rgba(255,255,255,.72);
  font-size: clamp(1.02rem, 2.5vw, 1.19rem);
  line-height: 1.9;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.letter-block.in-view { opacity: 1; transform: translateY(0); }
.letter-block.short { text-align: center; font-weight: 800; }
.letter-block.emphasis { text-align: center; font-size: clamp(1.15rem, 3vw, 1.45rem); }
.letter-block strong { color: #8f3656; }
.gratitude { line-height: 2.15; }
.courage-block { text-align: center; background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,241,246,.88)); }
.confession-block { text-align: center; padding-block: clamp(48px, 9vw, 90px); }
.confession-line { margin: 0; font-family: "Nunito", sans-serif; font-size: clamp(2.4rem, 9vw, 5.2rem); font-weight: 800; color: var(--pink-deep); letter-spacing: -.03em; }
.pre-question, .intent-reveal { text-align: center; }

.question-card { overflow: hidden; }
.heartbeat { margin-bottom: 18px; font-size: clamp(3rem, 10vw, 5.5rem); animation: heartBeat 1.2s ease-in-out infinite; }
.name-call { margin: 0 0 8px; color: var(--pink-deep); font-family: "Nunito", sans-serif; font-size: clamp(1.7rem, 6vw, 2.7rem); font-weight: 800; }
.answer-buttons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.yes-btn, .no-btn { min-width: 180px; }

.yes-card { overflow: hidden; }
.countdown { min-height: 100px; display: grid; place-items: center; font-family: "Nunito", sans-serif; font-size: clamp(4rem, 16vw, 8rem); font-weight: 800; color: var(--pink-main); }
.achievement { margin: 20px auto; padding: 24px; border: 2px solid var(--pink-200); border-radius: 22px; background: linear-gradient(145deg, #fff, #fff1f6); }
.achievement span { display: block; font-size: .75rem; letter-spacing: .17em; font-weight: 800; color: var(--pink-deep); }
.achievement strong { display: block; margin-top: 12px; font-size: clamp(1.5rem, 5vw, 2.5rem); line-height: 1.45; }
.yes-letter { margin-top: 26px; line-height: 1.8; }
.day101-card { display: grid; gap: 4px; width: min(100%, 380px); margin: 26px auto; padding: 22px; border-radius: 22px; background: var(--pink-50); border: 1px solid var(--pink-100); font-weight: 700; }
.ending-name { margin-top: 28px; font-size: 1.16rem; }
.signature { color: var(--text-soft); font-size: .9rem; }
.easter-eggs { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.egg { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 7px 20px rgba(99,56,71,.08); font-size: 1.35rem; }

.hack-scene { background: #040507; color: #ff7bab; }
.hack-terminal { width: min(100%, 790px); min-height: 65vh; padding: clamp(20px, 5vw, 42px); border: 1px solid #6d2a46; border-radius: 18px; background: radial-gradient(circle at 50% 0%, #1a0710, #050507 65%); box-shadow: 0 0 50px rgba(255, 80, 140, .12); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.glitch { position: relative; font-family: inherit; font-size: clamp(2.2rem, 8vw, 5rem); color: #ff75a6; text-shadow: 2px 0 #fff, -2px 0 #74133a; animation: glitch 1.2s steps(2, end) infinite; }
.terminal-lines { min-height: 220px; margin-top: 28px; color: #ff9ebf; line-height: 1.8; }
.terminal-lines p { margin: 4px 0; }
.hack-progress-wrap { margin-top: 20px; }
.hack-progress { height: 14px; border: 1px solid #a63a64; border-radius: 4px; overflow: hidden; }
.hack-progress span { display: block; width: 0; height: 100%; background: #ff6f9f; transition: width .2s linear; }
.hack-joke { margin: 46px 0 0; text-align: center; font-size: clamp(2.2rem, 9vw, 5.5rem); font-weight: 900; color: #fff; }
.respect-card, .final-no-card { line-height: 1.8; }

.music-toggle {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: var(--safe-bottom);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: rgba(232, 80, 131, .88);
  box-shadow: 0 12px 30px rgba(232,80,131,.2);
  backdrop-filter: blur(10px);
  font-weight: 800;
}
.music-toggle.is-muted { background: rgba(148, 98, 115, .78); }
.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 58px);
  transform: translate(-50%, 16px);
  width: min(calc(100% - 32px), 430px);
  padding: 12px 16px;
  border-radius: 16px;
  color: var(--text-main);
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 34px rgba(99,56,71,.16);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.is-hidden { display: none !important; }

@keyframes sceneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes sparkle { 0%,100% { opacity: .12; transform: scale(.8) rotate(0); } 50% { opacity: .45; transform: scale(1.2) rotate(15deg); } }
@keyframes softBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes heartBeat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } 60% { transform: scale(1); } }
@keyframes glitch { 0%,92%,100% { transform: none; } 93% { transform: translateX(2px); } 95% { transform: translateX(-3px); } 97% { transform: skewX(4deg); } }

@media (max-width: 640px) {
  .scene { padding-inline: 14px; }
  .card { padding: 28px 20px; border-radius: 24px; }
  .answer-buttons { flex-direction: column; }
  .yes-btn, .no-btn { width: 100%; min-width: 0; }
  .letter-stack { gap: 24px; }
  .letter-block { padding: 24px 20px; border-radius: 22px; }
  .letter-intro { margin-bottom: 42px; }
  .music-toggle { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .letter-block { opacity: 1; transform: none; }
}


/* A letter arriving, before the story starts. */
body.is-opening { background: #fcf5f2; }
body.is-opening::before, body.is-reading-letter::before { opacity: 0; }
body.is-opening .ambient, body.is-reading-letter .ambient { opacity: 0; }
.ambient { transition: opacity .7s ease; }
#scene-opening {
  min-height: 100svh;
  padding: max(20px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom));
  animation: none;
}
.opening-stage {
  position: relative;
  width: min(100%, 520px);
  height: 620px;
  perspective: 1200px;
  isolation: isolate;
}
.envelope {
  position: absolute;
  width: clamp(260px, 48vw, 390px);
  aspect-ratio: 1.55;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  perspective: 1000px;
  transition: transform 1.25s ease, opacity .95s ease, filter 1.2s ease;
  filter: drop-shadow(0 18px 22px rgba(126, 86, 76, .13));
}
.envelope-body { position: absolute; inset: 0; border: 1px solid #e4cec7; border-radius: 8px; background: #f5e4df; }
.envelope-flap {
  position: absolute; inset: 0 0 auto; height: 64%; z-index: 6;
  background: #faede7;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 1.6s cubic-bezier(.4, 0, .2, 1);
  backface-visibility: visible;
}
.envelope-left, .envelope-right, .envelope-front { position: absolute; inset: 0; z-index: 4; border-radius: 7px; }
.envelope-left { background: #fff6ef; clip-path: polygon(0 0, 57% 56%, 0 100%); }
.envelope-right { background: #fbedE6; clip-path: polygon(100% 0, 43% 56%, 100% 100%); }
.envelope-front { background: #fff3eb; clip-path: polygon(0 100%, 0 94%, 50% 43%, 100% 94%, 100% 100%); }
.envelope-seal {
  position: absolute; top: 49%; left: 50%; z-index: 7;
  width: 34px; height: 34px; display: grid; place-items: center;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: #eec2c5; color: #a76170; font-size: 25px;
  transition: opacity .3s ease;
}
.envelope-address {
  position: absolute; bottom: 20px; left: 0; right: 0; z-index: 5;
  text-align: center; color: #9f7874; font-family: "Nunito", sans-serif;
  font-style: italic; font-size: 15px; letter-spacing: .04em;
}
.envelope-glow { position: absolute; inset: -15% 0 0; z-index: 2; background: radial-gradient(ellipse, #f7cbd5, transparent 68%); opacity: 0; transition: opacity 1.6s ease; }
.bunny-sticker { display: inline-block; width: 130px; line-height: 0; flex: 0 0 auto; }
.bunny-sticker img { display: block; width: 100%; height: auto; object-fit: contain; }
.envelope-bunny { position: absolute; width: 100px; left: calc(50% - 50px); top: -94px; z-index: -1; transition: transform 1s ease, opacity .6s ease; }
.letter-paper {
  position: absolute; top: 50%; left: 50%; z-index: 1;
  width: calc(100% - 12px); max-width: 460px; min-height: 574px;
  padding: 32px 20px 28px;
  border: 1px solid #ebdbd5; border-radius: 9px;
  background: #fffcf7;
  box-shadow: 0 22px 60px rgba(116, 77, 67, .09);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -24%) scale(.52);
  transition: transform 1.2s cubic-bezier(.22, .7, .2, 1), opacity .95s ease;
}
.paper-rule { width: 28px; height: 1px; background: #d8b0b7; margin: 0 auto 24px; }
.opening-copy { opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 1.15s ease, transform 1.15s ease, visibility 1.15s; }
.opening-copy.is-visible { opacity: 1; visibility: visible; transform: none; }
#openingTitle { font: 800 clamp(2.2rem, 6vw, 3.1rem)/1.15 "Nunito", sans-serif; color: #855160; margin: 0 0 20px; }
.opening-lead { font-size: 19px; line-height: 1.7; font-weight: 600; margin: 0 0 18px; }
.opening-hesitation { color: #ae858b; font-style: italic; margin: 0 0 15px; }
.opening-thought { color: #927078; font-size: 14px; line-height: 1.9; margin: 0; }
.paper-bunny { width: 76px; margin: 8px auto 0; }
.opening-reason { font-size: 15px; margin: 6px 0 22px; }
.reading-btn { font-size: 14px; padding: 13px 20px; box-shadow: 0 8px 20px #e850831c; }
.opening-stage.is-shivering .envelope { animation: envelopeShiver .45s ease; }
.opening-stage.is-unsealing .envelope { filter: drop-shadow(0 25px 28px #a772781f); }
.opening-stage.is-unsealing .envelope-flap { transform: rotateX(180deg); }
.opening-stage.is-unsealing .envelope-seal { opacity: 0; }
.opening-stage.is-unsealing .envelope-glow { opacity: .8; }
.opening-stage.is-unsealing .envelope-bunny { transform: translateY(-16px); }
.opening-stage.is-extracting .letter-paper { opacity: 1; transform: translate(-50%, -83%) scale(.60); }
.opening-stage.is-open .letter-paper { z-index: 8; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.opening-stage.is-open .envelope { transform: translate(-50%, 66%) scale(.94); opacity: 0; pointer-events: none; }
.opening-stage.is-leaving .letter-paper { transform: translate(-50%, -50%) scale(.96); opacity: 0; transition-duration: .9s; }
.transition-calendar {
  position: absolute; left: calc(50% - 34px); bottom: 5px; z-index: 9; width: 68px;
  border: 1px solid #e7c7c9; border-radius: 10px; background: #fffcf7;
  opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; text-align: center;
}
.transition-calendar span, .little-calendar span { display: block; padding: 5px; background: #eed4d6; color: #90616b; font-size: 9px; letter-spacing: .06em; border-radius: 8px 8px 0 0; }
.transition-calendar strong { display: block; font: 800 28px "Nunito", sans-serif; }
.transition-calendar i { color: #c38b97; font-style: normal; }
.is-leaving .transition-calendar { opacity: 1; transform: none; }
.days-companion { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 200px; margin: 0 auto 22px; }
.calendar-bunny { width: 116px; transform-origin: bottom center; }
.little-calendar { width: 66px; border: 1px solid #e7c7c9; border-radius: 9px; background: #fffaf5; margin: 0 0 12px -7px; transform: rotate(5deg); }
.little-calendar strong { display: block; font: 800 33px "Nunito", sans-serif; padding: 6px; }
.milestone-heart { position: absolute; top: 6px; left: 106px; color: #d985a0; opacity: 0; transition: opacity .6s, transform .6s; }
.is-counting .calendar-bunny { animation: bunnyEarWiggle 1.3s ease-in-out infinite; }
.is-complete .calendar-bunny { transform: rotate(-4deg) translateY(-3px); transition: transform .7s; }
.is-complete .milestone-heart { opacity: 1; transform: translateY(-10px); }
.quality-companion { position: relative; width: 140px; margin: 0 auto 16px; }
.quality-companion .bunny-sticker { transition: transform .65s ease; transform-origin: bottom center; }
.bunny-question { position: absolute; right: 2px; top: 35px; color: #bf8b9b; font: 700 26px "Nunito", sans-serif; opacity: 0; transition: opacity .5s; }
.is-puzzled .bunny-sticker { transform: rotate(10deg); }
.is-puzzled .bunny-question { opacity: 1; }
.is-alert .bunny-sticker { transform: translateY(-5px); }
.confession-block { background: #fffdfb; box-shadow: none; border-color: transparent; }
.confession-bunny { width: 65px; margin-top: 20px; animation: quietHeart 3.5s ease-in-out infinite; }
.bunny-celebration { position: relative; min-height: 155px; margin-bottom: 16px; }
.joy-bunny { width: 140px; transform-origin: bottom center; }
.running-bunny { position: absolute; bottom: 0; left: 0; width: 80px; opacity: 0; }
.joy-sparkles { position: absolute; inset: 20px 0 auto; color: #d5a170; font-size: 28px; opacity: 0; }
.is-surprised .joy-bunny { transform: scale(1.045); transition: transform .15s; }
.is-celebrating .joy-bunny { animation: bunnyJump .85s ease-in-out 3; }
.is-celebrating .running-bunny { animation: bunnyRun 2.1s ease-in-out .45s 1 both; }
.is-celebrating .joy-sparkles { animation: sparkle 1.4s ease-in-out .8s 3 both; }
.terminal-bunny { text-align: center; }
.terminal-bunny .bunny-sticker { width: 100px; transition: transform .45s; }
.terminal-bunny.is-reassured .bunny-sticker { transform: translateY(-5px); }
.hack-scene.is-reassured { background: var(--pink-50); transition: background .4s; }
.hack-scene.is-reassured .hack-terminal { background: #fff6f8; box-shadow: none; border-color: #edc4d1; }
.hack-scene.is-reassured .hack-joke { color: var(--pink-deep); }
.ending-bunny { width: 95px; margin-bottom: 20px; }
.egg .bunny-sticker { width: 39px; }
@keyframes envelopeShiver {
  0%,100% { transform: translate(-50%, -50%) rotate(0); }
  30% { transform: translate(-50%, -50%) rotate(-1deg); }
  65% { transform: translate(-50%, -50%) rotate(1deg); }
}
@keyframes bunnyEarWiggle { 0%,100% { transform: rotate(0); } 40% { transform: rotate(-2deg); } 70% { transform: rotate(2deg); } }
@keyframes quietHeart { 0%,100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes bunnyJump { 0%,100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-22px) rotate(-5deg); } 70% { transform: translateY(0) scale(1.04,.96); } }
@keyframes bunnyRun { 0% { opacity: 0; transform: translateX(-40px) rotate(-8deg); } 15%,80% { opacity: 1; } 100% { opacity: 0; transform: translateX(340px) rotate(8deg); } }
@media (max-width: 640px) {
  .opening-stage { height: 610px; }
  .letter-paper { width: 100%; padding-inline: 14px; }
  .envelope { width: clamp(260px, 72vw, 300px); }
  .envelope-bunny { width: 86px; left: calc(50% - 43px); top: -82px; }
}
@media (prefers-reduced-motion: reduce) {
  .envelope, .letter-paper { transition: opacity .15s ease !important; }
  .opening-copy { transition: opacity .1s ease !important; }
  .confession-bunny, .calendar-bunny, .joy-bunny, .running-bunny { animation: none !important; }
}

/* The blank sheet sits in front of the opened flap, inside the envelope. */
.envelope-sheet {
  position: absolute; z-index: 3; width: 88%; height: 108%; bottom: 0; left: 6%;
  background: #fffcf7; border: 1px solid #ebdbd5; border-radius: 5px;
  opacity: 0; transform: translateY(0);
  transition: transform 1.35s cubic-bezier(.22,.7,.2,1), opacity .45s ease;
}
.opening-stage.is-extracting .envelope-flap { z-index: 1; }
.opening-stage.is-extracting .envelope-sheet { opacity: 1; transform: translateY(-60%); }
.opening-stage.is-extracting:not(.is-open) .letter-paper { opacity: 0; }

/* Give each scene and its words a little room to settle. */
.scene.is-active.is-exiting { animation: sceneOut .42s ease both; pointer-events: none; }
.days-reveal, .quality-result, .quality-final, .achievement, .yes-letter, .answer-buttons {
  animation: fadeUp 1s ease both;
}
@keyframes sceneOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-6px); }
}
