﻿:root {
  --paper: #fff6f2;
  --pink: #f3bac9;
  --rose: #bc4667;
  --deep: #683547;
  --ink: #593e46;
  --muted: #957880;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", sans-serif;
  --hand: "La Belle Aurore", cursive;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 95px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button,
a,
input {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 6px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  cursor: default;
}
[hidden] {
  display: none !important;
}
svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.svg-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' filter='url(%23n)' opacity='.4' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
.topbar {
  height: 104px;
  padding: 0 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 12;
  max-width: 1600px;
  margin: auto;
}
.brand {
  font: 24px var(--serif);
  font-style: italic;
  line-height: 1;
}
.brand span {
  font: 9px var(--sans);
  text-transform: uppercase;
  letter-spacing: 3px;
  display: block;
  margin-top: 8px;
}
.sound-button {
  border: 1px solid #dfc6c9;
  background: #fff8f47d;
  border-radius: 30px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: 0.5px;
}
.equalizer {
  height: 14px;
  display: flex;
  gap: 2px;
  align-items: center;
}
.equalizer i {
  display: block;
  width: 2px;
  height: 4px;
  background: var(--rose);
  border-radius: 2px;
}
.sound-on .equalizer i {
  animation: equalize 1.2s infinite alternate;
}
.sound-on .equalizer i:nth-child(2) {
  animation-delay: -0.6s;
}
.sound-on .equalizer i:nth-child(3) {
  animation-delay: -0.3s;
}
.sound-on .equalizer i:nth-child(4) {
  animation-delay: -0.9s;
}
@keyframes equalize {
  to {
    height: 14px;
  }
}
.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.1px;
  line-height: 1.7;
  color: #9c5b6b;
}
.tiny-heart {
  display: inline-block;
  font-size: 13px;
  margin-right: 8px;
  animation: heartbeat 2.8s infinite;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
}
em {
  font-weight: 400;
  color: var(--rose);
}
.invitation {
  position: relative;
  max-width: 1280px;
  min-height: calc(100svh - 104px);
  margin: auto;
  padding: 65px 64px 95px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 30px;
}
.invite-copy {
  position: relative;
  z-index: 2;
  padding-bottom: 30px;
}
.invite-copy h1 {
  font-size: clamp(60px, 6vw, 89px);
  line-height: 1.02;
  letter-spacing: -3px;
  margin: 28px 0 25px;
}
.love-word {
  position: relative;
  color: var(--rose);
  font-style: italic;
}
.love-word:after {
  content: "";
  position: absolute;
  left: 0;
  right: -8px;
  bottom: 3px;
  border-bottom: 1px solid #d58b9c;
  transform: rotate(-5deg);
}
.love-word svg {
  position: absolute;
  width: 38px;
  height: 38px;
  right: -55px;
  top: 24px;
  transform: rotate(15deg);
  stroke-width: 1;
  animation: heartbeat 3s infinite;
}
.intro-description,
.section-heading p,
.birthday-heading p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.primary-button {
  border: 0;
  border-radius: 50px;
  background: var(--rose);
  color: #fff8f5;
  padding: 18px 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  font-size: 12px;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 22px #bc46671a;
  transition:
    transform 0.3s,
    background 0.3s,
    box-shadow 0.3s;
  min-height: 54px;
}
.primary-button:hover {
  background: #a33b59;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px #bc46672a;
}
.primary-button:active {
  transform: scale(0.98);
}
.primary-button svg {
  width: 19px;
  height: 19px;
}
.invite-copy .primary-button {
  margin-top: 30px;
}
.small-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  letter-spacing: 0.3px;
}
.invite-copy .small-note {
  margin: 14px 0 0 10px;
}
.handwritten {
  font-family: var(--hand);
  font-weight: 400;
  color: var(--rose);
}
.invite-art {
  height: 515px;
  position: relative;
  margin-top: 10px;
}
.invite-art:before {
  content: "";
  position: absolute;
  inset: 40px -30px -20px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #efc3c655, transparent 67%);
}
.polaroid {
  background: #fffdf8;
  padding: 13px 13px 8px;
  position: absolute;
  box-shadow:
    0 20px 55px #6d3a3a1c,
    0 2px 8px #6d3a3a0c;
  width: 245px;
  transition: transform 0.7s;
}
.polaroid img {
  display: block;
  width: 100%;
  height: 282px;
  object-fit: cover;
}
.polaroid figcaption {
  font: 22px var(--hand);
  text-align: center;
  color: #8b5262;
  padding: 13px 0 2px;
}
.polaroid-back {
  top: 35px;
  left: 0;
  transform: rotate(-12deg);
  animation: float-back 9s ease-in-out infinite;
}
.polaroid-back img {
  object-position: center 39%;
}
.polaroid-front {
  right: -5px;
  top: 125px;
  transform: rotate(9deg);
  animation: float-front 8s ease-in-out infinite;
}
.polaroid-front img {
  object-position: 50% 30%;
}
.photo-tape {
  position: absolute;
  width: 90px;
  height: 26px;
  background: #e8bbc885;
  top: -11px;
  left: 80px;
  transform: rotate(-8deg);
  clip-path: polygon(2% 0, 100% 6%, 97% 100%, 0 94%);
}
.art-note {
  position: absolute;
  top: -7px;
  right: 30px;
  transform: rotate(8deg);
  font-size: 25px;
}
.art-signature {
  font-size: 25px;
  position: absolute;
  bottom: -15px;
  left: 8px;
  transform: rotate(-6deg);
}
.doodle-star {
  color: #c7808d;
  position: absolute;
  font-size: 42px;
}
.star-one {
  left: -35px;
  top: 0;
}
.star-two {
  right: -35px;
  bottom: 0;
  font-size: 35px;
}
.love-stamp {
  width: 91px;
  height: 91px;
  position: absolute;
  left: 26px;
  bottom: 54px;
  border: 1px solid #b96f83;
  border-radius: 50%;
  background: #fae8e5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transform: rotate(-13deg);
  box-shadow:
    0 0 0 4px #fae8e5,
    0 0 0 5px #c78b9b80;
}
.love-stamp svg {
  width: 25px;
  height: 25px;
  margin-bottom: 5px;
}
.love-stamp span {
  font-size: 8px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  line-height: 1.6;
}
.invitation-footer {
  position: absolute;
  bottom: 25px;
  left: 64px;
  right: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e8d7d5;
  padding-top: 20px;
  color: #ad8b91;
  font-size: 8px;
  letter-spacing: 1.6px;
}
.invitation-footer svg {
  width: 15px;
  height: 15px;
}
.ambient-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.ambient-heart {
  position: absolute;
  bottom: -40px;
  color: #c7688733;
  animation: drift-up var(--duration) linear infinite;
  animation-delay: var(--delay);
  font-family: Georgia, serif;
}
.story-section {
  position: relative;
  z-index: 1;
}
.birthday-hero {
  max-width: 1120px;
  margin: auto;
  padding: 85px 60px 100px;
  min-height: 760px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}
.birthday-heading h1 {
  font-size: 87px;
  line-height: 1.01;
  letter-spacing: -2px;
  margin: 23px 0;
}
.birthday-heading {
  position: relative;
}
.heading-sparkle {
  position: absolute;
  font-size: 42px;
  color: #c88798;
  right: 35px;
  top: 15px;
}
.birthday-portrait {
  width: 345px;
  height: 430px;
  justify-self: center;
  position: relative;
}
.birthday-portrait > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 180px 180px 10px 10px;
  box-shadow: 0 22px 55px #80535a17;
}
.portrait-outline {
  position: absolute;
  inset: -13px 13px 13px -13px;
  border: 1px solid #dba6b5;
  border-radius: 180px 180px 10px 10px;
  z-index: -1;
  transform: rotate(-4deg);
}
.portrait-label {
  position: absolute;
  bottom: 22px;
  left: 20px;
  font-size: 22px;
  color: white;
  text-shadow: 0 1px 10px #432d31;
}
.age-badge {
  position: absolute;
  right: -35px;
  bottom: 58px;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: #f9e1e6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: 0 0 0 7px var(--paper);
}
.age-badge strong {
  font: 80px/0.95 var(--serif);
  color: var(--rose);
  font-weight: 500;
}
.age-badge > span {
  font-size: 7px;
  letter-spacing: 1.5px;
  line-height: 2.5;
}
.portrait-heart {
  position: absolute;
  font: 70px var(--serif);
  color: var(--rose);
  left: -36px;
  top: 55px;
  transform: rotate(-20deg);
  animation: heartbeat 3s infinite;
}
.birthday-next {
  grid-column: 1/-1;
  justify-self: center;
  margin-top: 25px;
}
.text-link {
  font-size: 11px;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
}
.text-link span {
  font-size: 23px;
  color: var(--rose);
}
.section-marker {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-size: 10px;
  letter-spacing: 2px;
  color: #a56e7b;
}
.section-marker span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.section-heading {
  text-align: center;
  margin-top: 42px;
}
.section-heading > .handwritten {
  font-size: 26px;
  display: block;
  margin-bottom: 10px;
}
.section-heading h2 {
  font-size: 70px;
  line-height: 1.02;
  letter-spacing: -1.8px;
}
.section-heading p {
  margin-top: 20px;
}
.wish-section {
  background: radial-gradient(ellipse at center, #fbdfe780, transparent 70%);
  padding: 85px 24px 100px;
  text-align: center;
}
.cake-scene {
  position: relative;
  width: 300px;
  height: 295px;
  margin: 15px auto 5px;
  isolation: isolate;
}
.candles {
  position: absolute;
  display: flex;
  gap: 14px;
  top: 30px;
  left: calc(50% - 43px);
  z-index: 5;
}
.number-candle {
  position: relative;
}
.number-candle b {
  font-family: var(--serif);
  font-size: 74px;
  line-height: 1;
  font-weight: 600;
  color: #ffedef;
  -webkit-text-stroke: 1px #d2849c;
  text-shadow: 2px 3px 0 #bd738e;
}
.flame {
  position: absolute;
  width: 12px;
  height: 23px;
  top: -22px;
  left: 20px;
  background: linear-gradient(#ffefb5, #ffb569);
  border-radius: 60% 40% 55% 45%;
  box-shadow: 0 0 17px #ffbd6966;
  transform-origin: 50% 100%;
  animation: flicker 0.65s ease-in-out infinite alternate;
}
.number-candle:nth-child(2) .flame {
  animation-delay: -0.3s;
}
.cake {
  position: absolute;
  width: 230px;
  height: 138px;
  left: 35px;
  top: 108px;
}
.cake-top {
  position: absolute;
  top: -22px;
  width: 230px;
  height: 60px;
  background: radial-gradient(ellipse, #fff5ee 35%, #fbe4de);
  border: 1px solid #e9b7c1;
  border-radius: 50%;
  z-index: 4;
  display: flex;
  justify-content: center;
  align-items: center;
}
.cake-top span {
  font: 36px var(--serif);
  color: #ca7d98;
  transform: rotate(-14deg);
  margin-top: 6px;
}
.cake-body {
  position: absolute;
  top: 8px;
  width: 100%;
  height: 120px;
  background: linear-gradient(
    90deg,
    #df9cb3,
    #f1b9ca 30%,
    #f5c4d3 60%,
    #e4a2ba
  );
  border-radius: 0 0 48% 48% / 0 0 23% 23%;
  box-shadow: inset 0 -8px 14px #d996ac40;
}
.cake-body > span {
  position: absolute;
  font: 22px var(--hand);
  left: 54px;
  top: 49px;
  color: #a85676;
  transform: rotate(-3deg);
}
.cake-pearls {
  position: absolute;
  bottom: 5px;
  left: 17px;
  right: 17px;
  color: #fff2ec;
  font-size: 23px;
  white-space: nowrap;
}
.cake-icing {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-around;
  padding: 0 4px;
}
.cake-icing i {
  width: 25px;
  height: 40px;
  background: linear-gradient(#fff0e7, #ffe9e3);
  border-radius: 0 0 18px 18px;
}
.cake-icing i:nth-child(even) {
  height: 26px;
}
.cake-bottom {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30px;
  border: 9px dotted #ffe9ed;
  border-radius: 50%;
  z-index: 3;
}
.cake-plate {
  position: absolute;
  width: 285px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(#fffaf4, #e9cfcc);
  left: 8px;
  top: 228px;
  z-index: -1;
  box-shadow: 0 23px 25px #9d68761b;
  border-bottom: 3px solid #e2c6c8;
}
.cake-sparkle {
  position: absolute;
  color: #d39aac;
  font-size: 33px;
  animation: twinkle 4s infinite;
}
.s1 {
  left: 0;
  top: 70px;
}
.s2 {
  right: 2px;
  top: 130px;
  font-size: 22px;
  animation-delay: -2s;
}
.s3 {
  right: 28px;
  top: 20px;
  font-size: 24px;
  animation-delay: -1s;
}
.wish-button {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  min-width: 292px;
  gap: 12px;
}
.wish-button > span:not(.hold-progress) {
  position: relative;
  z-index: 1;
}
.hold-progress {
  position: absolute;
  inset: 0;
  background: #81314f;
  transform: scaleX(0);
  transform-origin: left;
}
.wish-button.holding .hold-progress {
  transform: scaleX(1);
  transition: transform 1.6s linear;
}
.wish-action .small-note {
  margin-top: 13px;
}
.smoke {
  position: absolute;
  top: -35px;
  left: 19px;
  width: 8px;
  height: 28px;
  border-radius: 50%;
  opacity: 0;
  background: #aa8c9e;
  filter: blur(3px);
}
.candles-out .flame {
  animation: flame-out 0.5s forwards;
}
.candles-out .smoke {
  animation: smoke-up 2.3s ease-out forwards;
}
.wish-result {
  margin-top: 18px;
  animation: soft-in 1.2s both;
}
.wish-result > .handwritten {
  font-size: 27px;
}
.wish-result h3 {
  font-size: 52px;
  line-height: 1.05;
  margin: 10px 0 18px;
}
.wish-result p {
  font-size: 12px;
  color: var(--muted);
}
.wish-result .text-link {
  margin-top: 28px;
}
.memories-section {
  padding: 60px 0 85px;
  overflow: hidden;
}
.memories-section .section-heading {
  margin-bottom: 45px;
}
.memory-film {
  display: flex;
  gap: 25px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 20px max(30px, calc((100vw - 270px) / 2)) 40px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.memory-film::-webkit-scrollbar {
  display: none;
}
.memory-card {
  flex: 0 0 270px;
  scroll-snap-align: center;
  position: relative;
  border: 0;
  text-align: left;
  background: #fffdf7;
  padding: 11px 11px 16px;
  box-shadow: 0 12px 28px #78505a14;
  transform: rotate(var(--tilt));
  transition: transform 0.4s;
}
.memory-card:hover {
  transform: rotate(0deg) translateY(-6px);
}
.memory-card img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center 35%;
}
.memory-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}
.memory-caption > span {
  font: 21px var(--hand);
  color: #995b6e;
}
.memory-caption small {
  font-size: 9px;
  color: #b2949a;
}
.gallery-controls {
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 0 30px;
  gap: 20px;
}
.gallery-controls > .handwritten {
  font-size: 25px;
}
.gallery-controls > div {
  display: flex;
  align-items: center;
  gap: 18px;
}
.circle-button {
  border: 1px solid #ddbdc5;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: transparent;
  font-size: 20px;
  transition: background 0.2s;
}
.circle-button:disabled {
  opacity: 0.35;
  cursor: default;
}
.circle-button:hover {
  background: #f8dfe6;
}
#photo-counter {
  font-size: 10px;
  white-space: nowrap;
  color: var(--muted);
}
.gallery-hint {
  text-align: center;
  margin-top: 18px;
}
.letter-section {
  padding: 60px 25px 100px;
  max-width: 850px;
  margin: auto;
}
.envelope {
  position: relative;
  display: block;
  width: 340px;
  height: 230px;
  max-width: 100%;
  margin: 55px auto 20px;
  background: #efd1d3;
  border: 1px solid #e7bec5;
  box-shadow: 0 20px 40px #7f536418;
  border-radius: 3px;
  transition: transform 0.5s;
}
.envelope:before,
.envelope:after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 56% 55%, 0 100%);
  background: #f4dedb;
}
.envelope:after {
  clip-path: polygon(100% 0, 44% 55%, 100% 100%);
  background: #f2d8d7;
}
.envelope-flap {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  background: #f7e5e1;
  z-index: 1;
  filter: drop-shadow(0 2px 2px #c3949a);
}
.envelope-address {
  position: absolute;
  z-index: 2;
  top: 35px;
  left: 0;
  right: 0;
  font-size: 29px;
}
.wax-seal {
  position: absolute;
  top: 104px;
  left: calc(50% - 25px);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c06a85, #a84b6b);
  z-index: 3;
  color: #f2c2cb;
  font: 35px/50px var(--serif);
  box-shadow:
    0 3px 6px #783d5933,
    inset 0 0 0 4px #a9536b88,
    inset 0 0 0 5px #d78ea3;
  animation: seal-pulse 3s infinite;
}
.envelope-instruction {
  position: absolute;
  bottom: 23px;
  left: 0;
  right: 0;
  font-size: 8px;
  letter-spacing: 2px;
  z-index: 3;
  color: #966575;
}
.envelope:hover {
  transform: rotate(-3deg) translateY(-4px);
}
.envelope.opening {
  animation: envelope-open 0.7s forwards;
}
.love-letter {
  position: relative;
  max-width: 570px;
  margin: 40px auto 0;
  padding: 46px 52px 50px;
  background: #fffdf8;
  box-shadow: 0 8px 40px #78455210;
  border: 1px solid #efdfd7;
  transform: rotate(-1deg);
  animation: letter-arrive 1s both;
}
.letter-date {
  font-size: 8px;
  letter-spacing: 2px;
  color: #b7959b;
}
.love-letter h3 {
  font-size: 35px;
  margin: 27px 0 18px;
}
.love-letter p {
  font-size: 13px;
  line-height: 2.1;
  margin-bottom: 20px;
  color: #82656c;
}
.letter-ending {
  margin-top: 30px;
}
.letter-ending .handwritten {
  display: block;
  font-size: 30px;
  margin-top: 15px;
}
.letter-bottom-heart {
  position: absolute;
  bottom: 28px;
  right: 35px;
  color: #cc8ca0;
  font-size: 23px;
}
.forever-section {
  text-align: center;
  padding: 35px 25px 90px;
  background: radial-gradient(ellipse, #f9dce559, transparent 68%);
}
.forever-heart {
  display: block;
  font: 95px var(--serif);
  color: var(--rose);
  margin-bottom: 20px;
  animation: heartbeat 3s infinite;
}
.forever-section h2 {
  font-size: 70px;
  line-height: 1.08;
  letter-spacing: -1.4px;
  margin: 25px 0;
}
.forever-section > p:not(.final-note) {
  color: var(--muted);
  line-height: 1.9;
  font-size: 12px;
}
.forever-section .primary-button {
  margin-top: 30px;
}
.final-note {
  font-size: 26px;
  margin-top: 22px;
  min-height: 45px;
}
.replay-link {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: 25px;
}
.story-footer {
  position: relative;
  text-align: center;
  padding: 35px 20px 120px;
  border-top: 1px solid #ead8d9;
  font-size: 8px;
  letter-spacing: 1.4px;
  line-height: 2.5;
  color: #a47d87;
}
.story-footer > span {
  color: var(--rose);
  margin: 0 8px;
}
.story-footer small {
  font-size: 7px;
  letter-spacing: 1px;
}
.story-nav {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ead1d3;
  background: #fff8f1e8;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 50px;
  padding: 8px 12px;
  box-shadow: 0 6px 35px #8b46521a;
  white-space: nowrap;
}
.story-nav a {
  font-size: 9px;
  padding: 10px 14px;
  border-radius: 24px;
  color: #967080;
  transition:
    background 0.4s,
    color 0.4s;
}
.story-nav a:first-child {
  padding: 8px 11px;
  display: flex;
}
.story-nav svg {
  height: 18px;
  width: 18px;
}
.story-nav a.active {
  background: #f5dbe2;
  color: #9d3e60;
}
.opening-transition {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background: #f8e5e7;
  animation: transition-in 0.7s both;
}
.transition-heart {
  font: 90px var(--serif);
  color: var(--rose);
  animation: heartbeat 2s infinite;
}
.opening-transition p {
  font: 80px/1.05 var(--serif);
  margin: 25px 0;
  letter-spacing: -2px;
}
.opening-transition .handwritten {
  font-size: 26px;
}
.opening-transition.leaving {
  animation: transition-out 0.9s forwards;
}
.photo-dialog {
  position: fixed;
  border: 0;
  max-width: 100vw;
  max-height: 100svh;
  width: 100vw;
  height: 100svh;
  margin: 0;
  padding: 55px 45px 25px;
  background: #392630f5;
  color: white;
  overflow: hidden;
}
.photo-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-dialog::backdrop {
  background: #392630;
}
.photo-dialog figure {
  max-width: 650px;
  max-height: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
}
.photo-dialog img {
  max-width: 100%;
  max-height: calc(100svh - 140px);
  object-fit: contain;
  border: 7px solid #fff7f0;
  box-shadow: 0 10px 50px #170e20;
}
.photo-dialog figcaption {
  font-size: 25px;
  color: #f8dce2;
  margin-top: 15px;
}
.dialog-close {
  position: absolute;
  right: 20px;
  top: 15px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 36px;
  width: 44px;
  height: 44px;
}
.viewer-arrow {
  position: absolute;
  top: 50%;
  border: 0;
  background: #ffffff14;
  color: white;
  border-radius: 50%;
  height: 40px;
  width: 40px;
  font-size: 22px;
}
.viewer-prev {
  left: 4px;
}
.viewer-next {
  right: 4px;
}
#celebration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 65;
  overflow: hidden;
}
.confetti {
  position: absolute;
  left: var(--x);
  top: -30px;
  width: 8px;
  height: 12px;
  background: var(--color);
  animation: confetti-fall var(--fall) var(--delay) ease-in forwards;
  transform: rotate(var(--rotation));
}
.confetti.heart-confetti {
  width: auto;
  height: auto;
  background: none;
  color: var(--color);
  font-size: 22px;
}
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition:
    opacity 1s,
    transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.age-changing {
  animation: age-reveal 0.7s both;
}
body.dialog-open {
  overflow: hidden;
}
@keyframes heartbeat {
  0%,
  35%,
  65%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.12);
  }
  55% {
    transform: scale(1.04);
  }
}
@keyframes float-back {
  0%,
  100% {
    transform: rotate(-12deg) translateY(0);
  }
  50% {
    transform: rotate(-10deg) translateY(-9px);
  }
}
@keyframes float-front {
  0%,
  100% {
    transform: rotate(9deg) translateY(0);
  }
  50% {
    transform: rotate(7deg) translateY(-12px);
  }
}
@keyframes drift-up {
  to {
    transform: translate3d(40px, -115vh, 0) rotate(30deg);
  }
}
@keyframes flicker {
  to {
    transform: rotate(7deg) scale(0.85, 1.08);
    opacity: 0.85;
  }
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}
@keyframes flame-out {
  to {
    transform: scale(0.2) translateY(-12px);
    opacity: 0;
  }
}
@keyframes smoke-up {
  15% {
    opacity: 0.5;
  }
  100% {
    transform: translate(13px, -65px) scale(3);
    opacity: 0;
  }
}
@keyframes soft-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes seal-pulse {
  50% {
    box-shadow:
      0 3px 6px #783d5933,
      0 0 0 8px #bc46670a,
      inset 0 0 0 4px #a9536b88,
      inset 0 0 0 5px #d78ea3;
  }
}
@keyframes envelope-open {
  to {
    transform: translateY(-25px) scale(0.93);
    opacity: 0;
  }
}
@keyframes letter-arrive {
  from {
    opacity: 0;
    transform: translateY(40px) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-1deg);
  }
}
@keyframes transition-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes transition-out {
  to {
    opacity: 0;
    transform: translateY(-4%);
  }
}
@keyframes age-reveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes confetti-fall {
  to {
    top: 110%;
    transform: translateX(var(--sway)) rotate(700deg);
    opacity: 0.2;
  }
}
@media (min-width: 1500px) {
  .invitation {
    padding-top: 100px;
    padding-bottom: 150px;
  }
}
@media (max-width: 1000px) {
  .invitation {
    padding: 50px 45px 100px;
    gap: 10px;
  }
  .invite-art {
    transform: scale(0.85);
    transform-origin: center;
  }
  .invite-copy h1 {
    font-size: 66px;
  }
  .birthday-heading h1 {
    font-size: 72px;
  }
  .birthday-portrait {
    width: 290px;
    height: 375px;
  }
  .birthday-hero {
    padding: 70px 50px;
  }
  .age-badge {
    width: 125px;
    height: 125px;
    right: -22px;
  }
  .age-badge strong {
    font-size: 68px;
  }
}
@media (max-width: 700px) {
  html {
    scroll-padding-top: 35px;
  }
  .topbar {
    height: 83px;
    padding: 0 25px;
  }
  .brand {
    font-size: 21px;
  }
  .brand span {
    font-size: 7px;
    letter-spacing: 2.5px;
    margin-top: 6px;
  }
  .sound-button {
    font-size: 9px;
    padding: 9px 12px;
    gap: 7px;
  }
  .invitation {
    padding: 30px 25px 87px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: calc(100svh - 83px);
    text-align: center;
    overflow: hidden;
  }
  .invite-copy {
    padding: 0;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
  }
  .tiny-heart {
    font-size: 11px;
    margin-right: 3px;
  }
  .invite-copy h1 {
    font-size: 60px;
    line-height: 1.01;
    letter-spacing: -2.3px;
    margin: 23px 0 18px;
  }
  .love-word svg {
    height: 27px;
    width: 27px;
    right: -38px;
    top: 20px;
  }
  .intro-description {
    font-size: 11px;
    line-height: 1.8;
  }
  .invite-copy .primary-button {
    margin-top: 23px;
    font-size: 11px;
    min-height: 52px;
    padding: 16px 22px;
    gap: 20px;
  }
  .invite-copy .small-note {
    font-size: 8px;
    margin: 11px 0 0;
  }
  .invite-art {
    width: 310px;
    height: 345px;
    margin: 34px auto 8px;
    transform: none;
    flex-shrink: 0;
  }
  .polaroid {
    width: 167px;
    padding: 9px 9px 7px;
  }
  .polaroid img {
    height: 193px;
  }
  .polaroid figcaption {
    font-size: 16px;
    padding-top: 9px;
  }
  .polaroid-back {
    left: 13px;
    top: 28px;
  }
  .polaroid-front {
    right: 6px;
    top: 76px;
  }
  .photo-tape {
    width: 63px;
    height: 20px;
    left: 48px;
    top: -8px;
  }
  .art-note {
    font-size: 20px;
    top: 0;
    right: 9px;
  }
  .art-signature {
    font-size: 20px;
    bottom: -4px;
    left: 13px;
  }
  .love-stamp {
    width: 65px;
    height: 65px;
    left: 22px;
    bottom: 36px;
  }
  .love-stamp svg {
    width: 18px;
    height: 18px;
    margin: 1px 0 3px;
  }
  .love-stamp span {
    font-size: 6px;
    letter-spacing: 0.8px;
  }
  .star-one {
    left: -9px;
    top: 0;
    font-size: 30px;
  }
  .star-two {
    right: -10px;
    bottom: 12px;
    font-size: 27px;
  }
  .invitation-footer {
    bottom: 19px;
    left: 25px;
    right: 25px;
    padding-top: 15px;
    font-size: 6px;
    letter-spacing: 0.9px;
    gap: 8px;
  }
  .invitation-footer svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
  }
  .birthday-hero {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 40px 25px 60px;
    gap: 32px;
    min-height: 0;
  }
  .birthday-heading h1 {
    font-size: 67px;
    margin: 20px 0 16px;
    letter-spacing: -2px;
  }
  .birthday-heading p {
    font-size: 11px;
  }
  .heading-sparkle {
    right: -14px;
    top: 35px;
    font-size: 30px;
  }
  .birthday-portrait {
    width: 255px;
    height: 325px;
    margin: 5px auto 0;
  }
  .age-badge {
    width: 113px;
    height: 113px;
    right: -27px;
    bottom: 28px;
  }
  .age-badge strong {
    font-size: 65px;
  }
  .age-badge > span {
    font-size: 6px;
  }
  .portrait-label {
    font-size: 18px;
    left: 15px;
    bottom: 18px;
  }
  .portrait-heart {
    font-size: 55px;
    left: -28px;
    top: 40px;
  }
  .birthday-next {
    font-size: 10px;
    margin-top: 0;
  }
  .wish-section {
    padding: 65px 22px 70px;
  }
  .section-marker {
    gap: 12px;
    font-size: 9px;
    letter-spacing: 1px;
  }
  .section-marker span {
    font-size: 7px;
    letter-spacing: 1.4px;
  }
  .section-heading {
    margin-top: 32px;
  }
  .section-heading h2 {
    font-size: 58px;
    letter-spacing: -1.5px;
  }
  .section-heading > .handwritten {
    font-size: 23px;
    margin-bottom: 9px;
  }
  .section-heading p {
    font-size: 11px;
    margin-top: 16px;
  }
  .cake-scene {
    margin-top: 15px;
    transform: scale(0.95);
    margin-bottom: 0;
  }
  .wish-button {
    min-width: 275px;
    font-size: 11px;
    padding: 17px 20px;
  }
  .wish-action .small-note {
    font-size: 8px;
  }
  .wish-result h3 {
    font-size: 45px;
  }
  .wish-result > .handwritten {
    font-size: 24px;
  }
  .wish-result p {
    font-size: 11px;
  }
  .memories-section {
    padding: 50px 0 65px;
  }
  .memories-section .section-heading {
    margin-bottom: 26px;
  }
  .memory-film {
    gap: 20px;
    padding: 20px calc((100vw - 255px) / 2) 35px;
  }
  .memory-card {
    flex-basis: 255px;
  }
  .memory-card img {
    height: 310px;
  }
  .gallery-controls {
    flex-direction: column;
    gap: 16px;
    padding: 0 25px;
  }
  .gallery-controls > .handwritten {
    font-size: 23px;
  }
  .gallery-controls > div {
    gap: 22px;
  }
  .gallery-hint {
    font-size: 8px;
    margin-top: 13px;
  }
  .letter-section {
    padding: 40px 22px 75px;
  }
  .envelope {
    width: 310px;
    height: 210px;
    margin-top: 38px;
  }
  .envelope-address {
    top: 30px;
    font-size: 27px;
  }
  .wax-seal {
    top: 95px;
  }
  .envelope-instruction {
    bottom: 20px;
    font-size: 7px;
  }
  .love-letter {
    padding: 32px 27px 40px;
    margin-top: 30px;
  }
  .letter-date {
    font-size: 7px;
    letter-spacing: 1.5px;
  }
  .love-letter h3 {
    font-size: 32px;
    margin-top: 22px;
  }
  .love-letter p {
    font-size: 12px;
    line-height: 2;
    margin-bottom: 18px;
  }
  .letter-ending .handwritten {
    font-size: 28px;
  }
  .forever-section {
    padding: 15px 22px 65px;
  }
  .forever-heart {
    font-size: 78px;
    margin-bottom: 10px;
  }
  .forever-section h2 {
    font-size: 52px;
    letter-spacing: -1.3px;
    line-height: 1.12;
    margin: 23px 0;
  }
  .forever-section > p:not(.final-note) {
    font-size: 11px;
  }
  .forever-section .primary-button {
    font-size: 11px;
    padding: 16px 24px;
    min-height: 50px;
  }
  .final-note {
    font-size: 24px;
    margin-top: 20px;
  }
  .story-footer {
    font-size: 7px;
    letter-spacing: 1px;
    padding-bottom: 115px;
  }
  .story-footer small {
    font-size: 6px;
  }
  .story-nav {
    padding: 6px 8px;
    gap: 1px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .story-nav a {
    font-size: 8px;
    padding: 11px 12px;
  }
  .opening-transition p {
    font-size: 64px;
  }
  .opening-transition .eyebrow {
    font-size: 8px;
  }
  .opening-transition .handwritten {
    font-size: 23px;
  }
  .photo-dialog {
    padding: 60px 35px 25px;
  }
  .viewer-arrow {
    width: 30px;
    height: 36px;
    font-size: 18px;
  }
  .photo-dialog img {
    border-width: 5px;
  }
  .photo-dialog figcaption {
    font-size: 22px;
  }
}
@media (max-width: 360px) {
  .invite-copy h1 {
    font-size: 53px;
  }
  .invitation {
    padding-left: 18px;
    padding-right: 18px;
  }
  .eyebrow {
    letter-spacing: 1.1px;
  }
  .invite-art {
    transform: scale(0.93);
    margin-top: 25px;
  }
  .section-heading h2 {
    font-size: 52px;
  }
  .forever-section h2 {
    font-size: 46px;
  }
  .section-marker span {
    letter-spacing: 1px;
  }
  .cake-scene {
    transform: scale(0.88);
    margin-left: calc(50% - 150px);
  }
  .wish-button {
    min-width: 260px;
  }
  .story-nav a {
    padding: 10px;
  }
  .birthday-heading h1 {
    font-size: 60px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
  .ambient-heart {
    display: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .wish-button.holding .hold-progress {
    transition: transform 1.6s linear !important;
  }
}
