:root {
  --ink: #342329;
  --muted: #9b7e84;
  --rose: #c65c70;
  --blush: #fff7f6;
  --cream: #fffdfb;
  --line: rgba(96, 48, 57, 0.12);
  --serif: "Playfair Display", serif;
  --sans: "DM Sans", sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #f8e9e8;
  color: var(--ink);
  font-family: var(--sans);
}
body {
  overflow-x: hidden;
}
.app-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--blush);
}
button {
  font: inherit;
  border: 0;
  cursor: pointer;
}
.is-hidden {
  display: none !important;
}
.screen {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 700;
}
.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: 0;
}
.ambient-one {
  width: 340px;
  height: 340px;
  right: -160px;
  top: 9%;
  background: rgba(241, 184, 190, 0.32);
}
.ambient-two {
  width: 300px;
  height: 300px;
  left: -170px;
  bottom: 5%;
  background: rgba(255, 220, 189, 0.32);
}
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.particle {
  position: absolute;
  color: #d98b99;
  font-size: 14px;
  opacity: 0.18;
  animation: float 8s ease-in-out infinite;
}
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #fff8f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: fadeAway 0.8s 1.5s forwards;
}
.loading-mark {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fbe2e3;
  color: var(--rose);
  font-size: 26px;
  animation: pulse 1.4s infinite;
  box-shadow: 0 0 0 14px rgba(246, 210, 214, 0.32);
}
.loading-mark span {
  animation: heartbeat 1.4s infinite;
}
.loading-screen h1,
.intro-screen h1 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  margin: 14px 0 18px;
}
.loading-screen h1 em,
.intro-screen h1 em,
.story-title em,
.birthday-screen h1 em,
.night-content h1 em,
.love-question em {
  color: var(--rose);
  font-weight: 500;
}
.loading-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 14px;
}
.loading-line {
  width: 90px;
  height: 2px;
  background: #f1dfe0;
  margin-top: 18px;
  overflow: hidden;
}
.loading-line span {
  display: block;
  height: 100%;
  width: 42%;
  background: var(--rose);
  animation: load 1.4s ease-in-out infinite;
}
.intro-screen {
  max-width: 620px;
  margin: auto;
  padding: 15vh 9vw 7vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.intro-heart {
  font-size: 54px;
  color: var(--rose);
  line-height: 1;
  margin: 26px 0 18px;
  animation: heartbeat 2s ease-in-out infinite;
}
.intro-screen h1 {
  font-size: clamp(45px, 10vw, 76px);
  line-height: 1.04;
  margin: 0;
}
.intro-subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 260px;
  margin: 28px 0;
}
.text-link {
  color: var(--rose);
  background: none;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.text-link span {
  display: inline-block;
  margin-left: 8px;
  font-size: 18px;
  transition: transform 0.2s;
}
.text-link:hover span {
  transform: translate(3px, -3px);
}
.signature {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted);
}
.story-screen {
  max-width: 720px;
  margin: auto;
  padding: 26px 5vw 34px;
  display: flex;
  flex-direction: column;
}
.story-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.story-counter {
  color: var(--rose);
  font-weight: 700;
}
.story-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.icon-button,
.music-pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--rose);
  display: grid;
  place-items: center;
  font-size: 17px;
  box-shadow: 0 6px 20px rgba(88, 42, 50, 0.08);
}
.progress-dots {
  display: flex;
  gap: 5px;
  margin: 30px 0 22px;
}
.progress-dots span {
  height: 3px;
  flex: 1;
  border-radius: 3px;
  background: #f0dddd;
  transition: 0.4s;
}
.progress-dots span.active {
  background: var(--rose);
}
.story-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3vh 0 2vh;
}
.story-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.story-photo-frame {
  width: min(78vw, 340px);
  height: min(52vh, 410px);
  padding: 9px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 22px 55px rgba(104, 48, 60, 0.16);
  transform: rotate(-2deg);
  animation: photoIn 0.7s both;
}
.story-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.story-photo-frame img.is-loaded,
.birthday-image-wrap img.is-loaded,
.memory-wall img.is-loaded {
  opacity: 1;
}
.image-loader {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 2px solid rgba(198, 92, 112, 0.18);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 2;
}
.image-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
  animation-play-state: paused;
}
.story-bubble {
  position: relative;
  margin-top: 27px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 22px;
  max-width: 390px;
  box-shadow: 0 10px 30px rgba(104, 48, 60, 0.07);
  animation: riseIn 0.7s 0.16s both;
}
.story-bubble:before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg) translateX(-50%);
}
.story-message {
  font-family: var(--serif);
  font-size: clamp(20px, 5vw, 27px);
  line-height: 1.35;
  margin: 0;
}
.story-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 0;
}
.primary-button {
  margin-top: 24px;
  padding: 14px 24px;
  border-radius: 99px;
  background: var(--rose);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(198, 92, 112, 0.25);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(198, 92, 112, 0.34);
}
.primary-button span {
  margin-left: 8px;
}
.birthday-screen {
  background: linear-gradient(180deg, #fff7f6, #fffdfb);
  padding: 60px 6vw 80px;
  text-align: center;
}
.birthday-inner {
  max-width: 760px;
  margin: auto;
}
.birthday-image-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  padding: 6px;
  margin: 18px auto 25px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 35px rgba(166, 79, 97, 0.2);
  animation: photoIn 0.8s both;
}
.birthday-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.birthday-screen h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 9vw, 66px);
  line-height: 1.08;
  font-weight: 500;
  margin: 0;
}
.birthday-screen h1 span {
  font-size: 0.5em;
  color: var(--rose);
}
.typewriter {
  max-width: 520px;
  margin: 28px auto 0;
  color: #755c62;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.8;
  min-height: 110px;
}
.typewriter .cursor {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--rose);
  vertical-align: -2px;
  margin-left: 3px;
  animation: blink 1s infinite;
}
.memory-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  max-width: 560px;
  margin: 45px auto 0;
}
.memory-tile {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
}
.memory-tile .image-loader {
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
}
.memory-wall img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 7px 16px rgba(86, 42, 50, 0.1);
  animation: riseIn 0.6s both;
  transition: transform 0.3s;
  opacity: 0;
}
.memory-tile:nth-child(even) {
  transform: translateY(9px);
}
.memory-tile:hover img {
  transform: scale(1.04);
}
.love-question {
  margin-top: 62px;
  animation: riseIn 0.7s both;
}
.love-question p {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.love-question h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 500;
  margin: 12px 0;
}
.night-screen {
  background: #080b19;
  color: #fff;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}
.night-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 50px 25px;
  animation: riseIn 1.2s both;
}
.night-content .eyebrow {
  color: #efa3b1;
}
.night-heart {
  font-size: 38px;
  color: #f58b9d;
  margin-bottom: 28px;
  animation: heartbeat 2s infinite;
}
.night-content h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 9vw, 70px);
  font-weight: 500;
  line-height: 1.08;
  margin: 20px 0 26px;
}
.night-content > p {
  max-width: 440px;
  margin: auto;
  color: #c0b5c7;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.8;
}
.night-signature {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
  margin-top: 36px;
  color: #f8dfe5;
}
.night-signature em {
  color: #bb9cad;
}
.night-signature strong {
  font-size: 15px;
  color: #f29aaa;
}
.night-stars,
.night-stars:before,
.night-stars:after {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    radial-gradient(#fff 1px, transparent 1px),
    radial-gradient(#e7b0bf 1px, transparent 1px);
  background-size:
    97px 97px,
    173px 173px;
  background-position:
    17px 31px,
    69px 99px;
  opacity: 0.3;
  animation: starsMove 18s linear infinite;
}
.night-stars:before {
  opacity: 0.18;
  transform: scale(1.4);
  animation-duration: 32s;
}
.moon-glow {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  top: -220px;
  right: -110px;
  background: radial-gradient(
    circle,
    rgba(213, 147, 179, 0.2),
    transparent 67%
  );
  filter: blur(2px);
}
.shooting-star {
  position: absolute;
  width: 110px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  transform: rotate(-35deg);
  opacity: 0;
  animation: shoot 6s linear infinite;
}
.star-one {
  top: 22%;
  left: 12%;
  animation-delay: 1s;
}
.star-two {
  top: 48%;
  right: 2%;
  animation-delay: 3.3s;
}
.star-three {
  top: 12%;
  right: 26%;
  animation-delay: 5s;
}
.music-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  padding: 8px 15px;
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.1);
  color: #f3b1bf;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.music-pill span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.restart-button {
  display: block;
  margin: 22px auto 0;
  background: none;
  color: #9b8da3;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.modal-backdrop.show {
  opacity: 0.5;
  background: #402832;
}
.love-modal-content {
  border: 0;
  border-radius: 26px;
  padding: 38px 25px 28px;
  background: #fffaf9;
  box-shadow: 0 30px 80px rgba(61, 28, 38, 0.2);
  text-align: center;
  overflow: hidden;
}
.modal-close {
  position: absolute;
  right: 16px;
  top: 11px;
  background: none;
  color: #b9989e;
  font-size: 25px;
  font-weight: 300;
}
.modal-heart {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fbe7e7;
  color: var(--rose);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 19px;
}
.modal-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 10px;
}
.modal-copy {
  color: #80666d;
  line-height: 1.7;
  font-size: 14px;
  margin: 0 auto;
  white-space: pre-line;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 25px;
  flex-wrap: wrap;
}
.modal-actions .primary-button {
  margin: 0;
}
.secondary-button {
  background: #f9ebeb;
  color: var(--rose);
  padding: 13px 18px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}
.sad-sticker {
  font-size: 43px;
  margin-bottom: 12px;
  animation: float 3s infinite;
}
.love-input {
  width: 100%;
  border: 1px solid #efdfe1;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 20px;
  outline: 0;
  color: var(--ink);
  font: inherit;
  resize: none;
  background: #fff;
}
.love-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px #fae6e8;
}
.modal-actions .full-button {
  width: 100%;
}
@media (min-width: 700px) {
  .intro-screen {
    padding: 17vh 5vw 9vh;
  }
  .story-screen {
    padding-left: 30px;
    padding-right: 30px;
  }
  .birthday-screen {
    padding-top: 75px;
  }
  .love-modal-content {
    padding: 45px 42px 35px;
    min-width: 430px;
  }
  .intro-heart {
    font-size: 66px;
  }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeAway {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 22px rgba(246, 210, 214, 0);
  }
}
@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.15);
  }
  30% {
    transform: scale(1);
  }
}
@keyframes load {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(240%);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-18px) rotate(8deg);
  }
}
@keyframes photoIn {
  from {
    opacity: 0;
    transform: scale(0.92) rotate(3deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(-2deg);
  }
}
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes starsMove {
  to {
    transform: translate(-35px, 35px);
  }
}
@keyframes shoot {
  0% {
    transform: translate(0, 0) rotate(-35deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  25%,
  100% {
    transform: translate(520px, 330px) rotate(-35deg);
    opacity: 0;
  }
}
