:root {
  color-scheme: dark;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --ink: #f8edf5;
  --muted: #c4b6cd;
  --lavender: #d9b5e7;
  --rose: #eab4c9;
}

@keyframes flower-arrive-mobile {
  from {
    opacity: 0;
    transform: translate(1rem, 1rem);
  }
  to {
    opacity: 0.66;
    transform: translate(0, 0);
  }
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #171326;
  color: var(--ink);
}

button {
  font: inherit;
}

.scene [hidden] {
  display: none !important;
}

.scene {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(2.5rem, 7vh, 5.5rem) 1.5rem 2rem;
  background:
    radial-gradient(ellipse at 50% 86%, rgb(123 81 133 / 36%), transparent 41%),
    radial-gradient(ellipse at 13% 40%, rgb(80 71 117 / 28%), transparent 35%),
    linear-gradient(155deg, #1d1932 0%, #171326 58%, #20162d 100%);
}

.scene::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 25%;
  background: linear-gradient(0deg, rgb(16 13 27 / 66%), transparent);
  content: "";
}

.stars {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 17%, #fff 99%, transparent),
    radial-gradient(1px 1px at 31% 12%, #f6d9ed 99%, transparent),
    radial-gradient(1.5px 1.5px at 72% 18%, #fff 99%, transparent),
    radial-gradient(1px 1px at 87% 31%, #e8c8f5 99%, transparent),
    radial-gradient(1px 1px at 57% 8%, #fff 99%, transparent),
    radial-gradient(1px 1px at 8% 55%, #e8c8f5 99%, transparent),
    radial-gradient(1px 1px at 92% 61%, #fff 99%, transparent),
    radial-gradient(1px 1px at 42% 27%, #fff 99%, transparent);
}

.moon {
  position: absolute;
  z-index: -1;
  top: 13%;
  right: 17%;
  width: clamp(3.5rem, 7vw, 5.5rem);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background-color: transparent;
  background-image: url("theme moon.png");
  background-position: 73% 42%;
  background-repeat: no-repeat;
  background-size: 348% auto;
  box-shadow: 0 0 2rem rgb(247 215 225 / 38%), 0 0 6rem rgb(220 173 218 / 17%);
  opacity: 0.78;
}

.love-note {
  z-index: 2;
  text-align: center;
  animation: fade-up 1.1s ease both;
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: #d4bfd9;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.arabic-line {
  margin: 0;
  color: #fff1f2;
  font-family: "Lateef", serif;
  font-size: clamp(2.7rem, 6vw, 4.25rem);
  font-weight: 400;
  line-height: 1.25;
  text-shadow: 0 0 2.5rem rgb(230 177 218 / 30%);
}

.translation {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-family: "Playfair Display", serif;
  font-size: clamp(0.92rem, 2vw, 1.1rem);
  font-style: italic;
  letter-spacing: 0.02em;
}

.note-flourish {
  display: block;
  margin-top: 1.1rem;
  color: #e5b9d5;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}

.door-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  min-height: 24rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0 1rem;
  perspective: 1200px;
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.door-glow {
  position: absolute;
  top: 49%;
  left: 50%;
  width: 23rem;
  height: 23rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(218 156 206 / 18%), transparent 68%);
  filter: blur(12px);
  pointer-events: none;
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.doorway {
  position: relative;
  width: clamp(11rem, 24vw, 16rem);
  height: clamp(17rem, 42vh, 22rem);
  padding: 0.55rem;
  border: 1px solid rgb(238 203 221 / 61%);
  border-bottom: 0;
  border-radius: 48% 48% 0 0 / 15% 15% 0 0;
  background: linear-gradient(100deg, #9b718d, #d5a9c0 43%, #765872);
  box-shadow:
    0 0 0 0.35rem rgb(196 145 177 / 13%),
    0 0 3rem rgb(212 157 204 / 24%),
    0 1.25rem 4rem rgb(9 7 17 / 58%);
  transform-style: preserve-3d;
}

.doorway::before {
  position: absolute;
  inset: 0.65rem 0.65rem 0;
  border: 1px solid rgb(255 237 241 / 30%);
  border-bottom: 0;
  border-radius: 48% 48% 0 0 / 15% 15% 0 0;
  content: "";
  pointer-events: none;
}

.doorway-light {
  position: absolute;
  inset: 0.6rem 0.6rem 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  border-radius: 47% 47% 0 0 / 14% 14% 0 0;
  background:
    radial-gradient(ellipse at 50% 44%, #fff3d7 0%, #f3c8c8 27%, #c290bd 59%, #755a87 100%);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 1s ease 0.35s, transform 1.4s ease 0.25s;
}

.light-heart {
  color: rgb(255 250 238 / 88%);
  font-family: "Playfair Display", serif;
  font-size: clamp(4rem, 9vw, 7rem);
  text-shadow: 0 0 2.5rem #fff3d7;
  animation: heartbeat 2s ease-in-out infinite;
}

.door {
  position: absolute;
  z-index: 1;
  inset: 0.6rem 0.6rem 0;
  display: block;
  overflow: hidden;
  border: 1px solid #efd0d2;
  border-bottom: 0;
  border-radius: 47% 47% 0 0 / 14% 14% 0 0;
  background: linear-gradient(105deg, #875d7c 0%, #ba83a4 17%, #a87597 76%, #79536f 100%);
  box-shadow: inset 0 0 1.3rem rgb(43 24 48 / 35%), inset 0.45rem 0 0.8rem rgb(255 226 232 / 13%);
  cursor: pointer;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 2.4s cubic-bezier(0.55, 0, 0.25, 1), box-shadow 2.1s ease;
}

.door-lock:focus-visible {
  outline: 2px solid #fff1c9;
  outline-offset: 5px;
}

.door-panel {
  position: absolute;
  right: 15%;
  left: 15%;
  border: 1px solid rgb(255 226 232 / 48%);
  border-radius: 45% 45% 0.45rem 0.45rem / 13% 13% 0.45rem 0.45rem;
  box-shadow: inset 0 0 1rem rgb(72 37 68 / 14%), 0 0 0 0.25rem rgb(104 66 95 / 15%);
}

.door-panel-top {
  top: 15%;
  height: 35%;
}

.door-panel-bottom {
  top: 55%;
  bottom: 8%;
  border-radius: 0.4rem;
}

.door-knob {
  position: absolute;
  top: 58%;
  right: 12%;
  width: 0.7rem;
  aspect-ratio: 1;
  border: 1px solid #fff0bb;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1c8, #c89468 72%);
  box-shadow: 0 0 0.7rem rgb(255 225 174 / 62%);
}

.door-lock {
  position: absolute;
  z-index: 2;
  top: 66%;
  right: calc(12% - 0.275rem);
  width: 1.25rem;
  height: 1.55rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 0 0.35rem rgb(255 225 174 / 25%));
  transition: filter 0.2s ease, transform 0.2s ease;
}

.door-lock:hover {
  filter: drop-shadow(0 0 0.65rem rgb(255 225 174 / 70%));
  transform: translateY(-0.08rem);
}

.door-lock.is-shaking {
  animation: lock-shake 0.62s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  transform-origin: 50% 15%;
}

.lock-shackle {
  position: absolute;
  top: 0.05rem;
  left: 50%;
  width: 0.62rem;
  height: 0.64rem;
  border: 2px solid #ffe9cc;
  border-bottom: 0;
  border-radius: 0.4rem 0.4rem 0 0;
  transform: translateX(-50%);
}

.lock-body {
  position: absolute;
  top: 0.48rem;
  left: 50%;
  width: 0.94rem;
  height: 0.82rem;
  border: 1px solid #fff0c8;
  border-radius: 0.18rem;
  background: linear-gradient(135deg, #ffe9bd, #c98f67 78%);
  box-shadow: inset 0 0 0.35rem rgb(83 49 65 / 30%);
  transform: translateX(-50%);
}

.lock-body::after {
  position: absolute;
  top: 0.2rem;
  left: 50%;
  width: 0.14rem;
  height: 0.3rem;
  border-radius: 50%;
  background: #79546a;
  content: "";
  transform: translateX(-50%);
}

.door-plaque {
  position: absolute;
  top: 43%;
  left: 50%;
  color: rgb(255 232 238 / 88%);
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  transform: translate(-50%, -50%);
}

.door-hint {
  margin: 1.4rem 0 0;
  color: #d5c4d8;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-align: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.door-hint span {
  padding: 0 0.3rem;
  color: var(--rose);
}

.reveal-message {
  position: absolute;
  top: calc(50% + clamp(9rem, 22vh, 12rem));
  width: max-content;
  max-width: calc(100vw - 3rem);
  margin: 0;
  color: #fff1e7;
  font-family: "Playfair Display", serif;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-style: italic;
  opacity: 0;
  text-align: center;
  transform: translateY(0.5rem);
  transition: opacity 0.8s ease 0.75s, transform 0.8s ease 0.75s;
}

.question-stage,
.memory-stage,
.feeling-stage,
.nameinhand-stage,
.meetup-stage,
.letter-stage,
.memories-gallery-stage,
.future-intro-stage,
.nikah-stage,
.together-stage,
.baby-stage,
.tell-you-stage,
.hands-stage,
.our-gallery-stage,
.final-message-stage,
.writing-stage,
.kisses-stage {
  display: none;
  position: absolute;
  z-index: 2;
  inset: 0;
  width: min(100%, 42rem);
  min-height: 100svh;
  height: 100%;
  margin: auto;
  overflow-y: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
  text-align: center;
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 1s cubic-bezier(0.2, 0.75, 0.25, 1) 0.12s,
    transform 1s cubic-bezier(0.2, 0.75, 0.25, 1) 0.12s;
}

.nameinhand-stage,
.meetup-stage,
.letter-stage,
.memories-gallery-stage,
.future-intro-stage,
.nikah-stage,
.together-stage,
.baby-stage,
.tell-you-stage,
.hands-stage,
.our-gallery-stage,
.final-message-stage,
.writing-stage,
.kisses-stage {
  padding: 1.5rem 1rem 2rem;
}

.memories-loading-stage {
  position: fixed;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  max-width: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: radial-gradient(ellipse at center, rgb(46 30 54 / 86%), rgb(15 12 26 / 95%));
  backdrop-filter: blur(0.6rem);
}

.memories-loading-card {
  display: flex;
  width: min(100%, 28rem);
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 6vw, 2.5rem);
  border: 1px solid rgb(255 237 241 / 22%);
  border-radius: 1.5rem;
  background: linear-gradient(145deg, rgb(45 34 56 / 94%), rgb(27 22 39 / 96%));
  box-shadow: 0 1.5rem 5rem rgb(5 4 12 / 45%), 0 0 3rem rgb(216 161 202 / 12%);
  text-align: center;
}

.memories-loading-card .meetup-title {
  margin-bottom: 0.5rem;
}

.story-stage.is-visible {
  display: flex;
}

.story-stage.is-entered {
  opacity: 1;
  transform: translateY(0);
}

.scene .is-leaving {
  animation: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.6rem);
  transition-duration: 0.35s;
  transition-delay: 0s;
}

.question-flourish {
  margin-bottom: 1.1rem;
  color: #e5b9d5;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-shadow: 0 0 1.5rem rgb(229 185 213 / 55%);
}

.question-eyebrow {
  margin: 0 0 0.7rem;
  color: #e5b9d5;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.question-title {
  max-width: 36rem;
  margin: 0;
  color: #fff1f2;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 0 2.5rem rgb(230 177 218 / 28%);
}

.question-title:focus {
  outline: none;
}

.question-prompt {
  margin: 1.1rem 0 1.6rem;
  color: #d8c7dc;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-style: italic;
}

.yes-button {
  min-width: 11rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid rgb(255 224 231 / 65%);
  border-radius: 999px;
  background: linear-gradient(110deg, #b97e9c, #e0a9bf);
  box-shadow: 0 0.6rem 2rem rgb(217 157 190 / 23%);
  color: #281c2b;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.memory-next-button {
  margin-top: 1.25rem;
}

.nameinhand-next-button {
  margin-top: 0.25rem;
}

.feeling-title {
  max-width: 38rem;
  margin: 0;
  color: #fff1f2;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 4.5vw, 2.7rem);
  font-weight: 400;
  line-height: 1.45;
  text-shadow: 0 0 2rem rgb(230 177 218 / 30%);
}

.feeling-title:focus {
  outline: none;
}

.meetup-title {
  max-width: 38rem;
  margin: 0 0 0.75rem;
  color: #fff1f2;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.7rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.3;
  text-shadow: 0 0 2rem rgb(230 177 218 / 32%);
}

.meetup-title:focus {
  outline: none;
}

.meetup-photo {
  display: block;
  width: min(100%, 40rem);
  max-height: 65svh;
  margin: 0;
  object-fit: contain;
  border: 1px solid rgb(255 237 241 / 44%);
  border-radius: 0.75rem;
  background: rgb(14 11 24 / 75%);
  box-shadow: 0 1rem 3rem rgb(7 5 15 / 42%), 0 0 2rem rgb(216 161 202 / 18%);
}

.letter-prompt {
  margin: 0.8rem 0 0.5rem;
  color: #f3e5ee;
  font-family: "Playfair Display", serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-style: italic;
}

.letter-button {
  margin-top: 0.25rem;
}

.letter-photo {
  display: block;
  width: min(100%, 34rem);
  max-height: 75svh;
  margin: 0;
  border: 1px solid rgb(255 237 241 / 44%);
  border-radius: 0.75rem;
  box-shadow: 0 1rem 3rem rgb(7 5 15 / 42%), 0 0 2rem rgb(216 161 202 / 18%);
  object-fit: contain;
}

.memories-gallery-stage .meetup-title {
  max-width: 34rem;
  margin-bottom: 0.75rem;
  font-size: clamp(1.5rem, 4.5vw, 2.5rem);
}

.future-intro-message {
  margin: 0.25rem 0 1.25rem;
  color: #f3e5ee;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.15rem, 3.5vw, 1.55rem);
  line-height: 1.65;
}

.see-future-button {
  margin-top: 0.25rem;
}

.nikah-stage .meetup-title {
  margin-bottom: 0.35rem;
}

.together-stage .meetup-title,
.baby-stage .meetup-title {
  margin-bottom: 0.75rem;
}

.nikah-urdu {
  margin: 0;
  color: #ffe3b5;
  font-family: "Lateef", serif;
  font-size: clamp(3rem, 9vw, 5rem);
  line-height: 1.2;
  text-shadow: 0 0 1.5rem rgb(255 227 181 / 28%);
}

.nikah-arabic {
  margin: 0.1rem 0 0.85rem;
  color: #f6d8e6;
  font-family: "Lateef", serif;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.35;
}

.nikah-photo {
  display: block;
  width: min(100%, 20rem);
  max-height: 42svh;
  border: 1px solid rgb(255 237 241 / 44%);
  border-radius: 0.9rem;
  box-shadow: 0 1rem 3rem rgb(7 5 15 / 42%), 0 0 2rem rgb(216 161 202 / 18%);
  object-fit: contain;
}

.together-photo {
  display: block;
  width: min(100%, 22rem);
  max-height: 60svh;
  border: 1px solid rgb(255 237 241 / 44%);
  border-radius: 0.9rem;
  box-shadow: 0 1rem 3rem rgb(7 5 15 / 42%), 0 0 2rem rgb(216 161 202 / 18%);
  object-fit: contain;
}

.our-baby-button {
  margin-top: 1rem;
}

.baby-photo {
  display: block;
  width: min(100%, 20rem);
  max-height: 55svh;
  object-fit: contain;
}

.tell-you-button {
  margin-top: 1rem;
}

.tell-you-message {
  max-width: 34rem;
  margin: 0.25rem 0 1rem;
  color: #f3e5ee;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.15rem, 3.5vw, 1.55rem);
  line-height: 1.6;
}

.tell-you-photo-placeholder {
  display: grid;
  width: min(100%, 20rem);
  min-height: 12rem;
  place-items: center;
  border: 1px dashed rgb(255 237 241 / 50%);
  border-radius: 0.9rem;
  background: linear-gradient(145deg, rgb(45 34 56 / 76%), rgb(27 22 39 / 82%));
  color: #d8c7dc;
  font-family: "Playfair Display", serif;
  font-style: italic;
  text-align: center;
}

.beautiful-thing-button {
  margin-top: 1rem;
}

.beautiful-thing-button:disabled {
  cursor: not-allowed;
  filter: saturate(0.55);
  opacity: 0.65;
}

.hands-message {
  max-width: 34rem;
  margin: 0.25rem 0 1rem;
  color: #f3e5ee;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  line-height: 1.6;
}

.hands-photo {
  display: block;
  width: min(100%, 22rem);
  max-height: 55svh;
  border: 1px solid rgb(255 237 241 / 44%);
  border-radius: 0.9rem;
  box-shadow: 0 1rem 3rem rgb(7 5 15 / 42%), 0 0 2rem rgb(216 161 202 / 18%);
  object-fit: contain;
}

.our-gallery-button {
  margin-top: 1rem;
}

.our-gallery-slide {
  width: min(100%, 23rem);
  margin: 0;
  touch-action: pan-y;
}

.our-gallery-photo {
  display: block;
  width: auto;
  height: min(58svh, 41rem);
  max-width: 100%;
  border: 1px solid rgb(255 237 241 / 44%);
  border-radius: 0.9rem;
  background: rgb(14 11 24 / 75%);
  box-shadow: 0 1rem 3rem rgb(7 5 15 / 42%), 0 0 2rem rgb(216 161 202 / 18%);
  object-fit: contain;
}

.our-gallery-photo.is-changing {
  animation: memory-photo-enter 0.4s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.our-gallery-caption {
  margin-top: 0.55rem;
  color: #d8c7dc;
  font-family: "Playfair Display", serif;
  font-size: 0.9rem;
  font-style: italic;
}

.our-gallery-count {
  margin: 0.5rem 0 0.4rem;
  color: #d8c7dc;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.our-gallery-next {
  display: grid;
  width: 3.25rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(255 224 231 / 65%);
  border-radius: 50%;
  background: linear-gradient(135deg, #b97e9c, #e0a9bf);
  box-shadow: 0 0.6rem 2rem rgb(217 157 190 / 23%);
  color: #281c2b;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.our-gallery-next:hover {
  box-shadow: 0 0.8rem 2.4rem rgb(217 157 190 / 38%);
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.our-gallery-next:focus-visible {
  outline: 2px solid #fff1c9;
  outline-offset: 4px;
}

.gallery-message-button {
  margin-top: 0.75rem;
}

.final-message {
  width: min(100%, 38rem);
  color: #f3e5ee;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  line-height: 1.65;
  text-align: center;
}

.final-message p {
  margin: 0 0 0.8rem;
}

.final-message p:last-child {
  margin-bottom: 0;
  color: #ffe3b5;
  font-size: 1.12em;
  font-style: italic;
}

.write-something-button {
  margin-top: 1.25rem;
}

.kisses-button {
  align-self: center;
  margin-top: 0.25rem;
}

.kisses-video {
  display: block;
  width: min(100%, 30rem);
  max-height: 65svh;
  border: 1px solid rgb(255 237 241 / 44%);
  border-radius: 0.9rem;
  background: rgb(14 11 24 / 75%);
  box-shadow: 0 1rem 3rem rgb(7 5 15 / 42%), 0 0 2rem rgb(216 161 202 / 18%);
}

.story-ending {
  margin: 1.25rem 0 0;
  color: #e5b9d5;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-style: italic;
  text-shadow: 0 0 2rem rgb(230 177 218 / 32%);
}

.writing-form {
  display: flex;
  width: min(100%, 34rem);
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  text-align: left;
}

.writing-label {
  color: #f3e5ee;
  font-size: 0.9rem;
  font-weight: 600;
}

.writing-input {
  width: 100%;
  min-height: 12rem;
  resize: vertical;
  padding: 1rem;
  border: 1px solid rgb(255 237 241 / 38%);
  border-radius: 1rem;
  background: rgb(14 11 24 / 72%);
  color: #fff1f2;
  font: inherit;
  line-height: 1.6;
}

.writing-input::placeholder {
  color: #a99aaf;
}

.writing-input:focus-visible {
  border-color: #eab4c9;
  outline: 2px solid rgb(234 180 201 / 35%);
  outline-offset: 2px;
}

.writing-status {
  margin: 0;
  color: #d8c7dc;
  font-size: 0.82rem;
  line-height: 1.5;
}

.writing-submit-button {
  align-self: center;
  margin-top: 0.25rem;
}

.saved-notes {
  width: min(100%, 34rem);
  margin-top: 1.5rem;
  text-align: left;
}

.saved-notes-title {
  margin: 0;
  color: #fff1f2;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 400;
  text-align: center;
}

.saved-notes-status {
  margin: 0.55rem 0 0.85rem;
  color: #d8c7dc;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
}

.saved-notes-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 0.75rem;
  list-style: none;
}

.saved-note {
  padding: 0.9rem 1rem;
  border: 1px solid rgb(255 237 241 / 24%);
  border-radius: 0.8rem;
  background: rgb(14 11 24 / 48%);
}

.saved-note-message {
  margin: 0;
  color: #fff1f2;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.saved-note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
  color: #c4b6cd;
  font-size: 0.72rem;
}

.saved-note-delete {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgb(255 224 231 / 38%);
  border-radius: 0.5rem;
  background: rgb(255 243 248 / 6%);
  color: #f3c6d8;
  cursor: pointer;
  font: inherit;
}

.saved-note-delete:hover {
  background: rgb(229 181 205 / 15%);
}

.saved-note-delete:focus-visible {
  outline: 2px solid #fff1c9;
  outline-offset: 3px;
}

.after-this-button {
  margin-top: 1rem;
}

.memories-gallery-photo {
  display: block;
  width: min(100%, 22rem);
  max-height: 54svh;
  border: 1px solid rgb(255 237 241 / 44%);
  border-radius: 0.9rem;
  background: rgb(14 11 24 / 75%);
  box-shadow: 0 1rem 3rem rgb(7 5 15 / 42%), 0 0 2rem rgb(216 161 202 / 18%);
  object-fit: contain;
}

.memories-gallery-photo.is-entering {
  animation: memory-photo-enter 0.5s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.memories-gallery-count {
  margin: 0.65rem 0 0.4rem;
  color: #d8c7dc;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.memories-next-button {
  display: grid;
  width: 3.25rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(255 224 231 / 65%);
  border-radius: 50%;
  background: linear-gradient(135deg, #b97e9c, #e0a9bf);
  box-shadow: 0 0.6rem 2rem rgb(217 157 190 / 23%);
  color: #281c2b;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.memories-next-button:hover {
  box-shadow: 0 0.8rem 2.4rem rgb(217 157 190 / 38%);
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.memories-next-button:focus-visible {
  outline: 2px solid #fff1c9;
  outline-offset: 4px;
}

@keyframes memory-photo-enter {
  from {
    opacity: 0;
    transform: translateX(0.6rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.memories-button {
  margin-top: 0.75rem;
}

.memories-loading-visual {
  position: relative;
  width: clamp(9rem, 35vw, 13rem);
  height: clamp(9rem, 35vw, 13rem);
  margin: 0.75rem 0;
}

.memories-loading-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.55s ease, transform 0.8s cubic-bezier(0.2, 0.75, 0.25, 1);
  filter: drop-shadow(0 0.5rem 1.5rem rgb(255 214 226 / 25%));
}

.memories-loading-image.is-active {
  opacity: 1;
  transform: scale(1);
}

.memories-loading-status {
  min-height: 1.7em;
  margin: 0;
  color: #f3e5ee;
  font-family: "Playfair Display", serif;
  font-style: italic;
}

.memories-progress {
  width: min(100%, 20rem);
  height: 0.45rem;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 237 241 / 12%);
}

.memories-progress-fill {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b97e9c, #ffe3b5, #e0a9bf);
  box-shadow: 0 0 1rem rgb(224 169 191 / 60%);
  animation: memories-progress-shimmer 1.4s ease-in-out infinite;
}

.memories-progress.is-complete .memories-progress-fill {
  width: 100%;
  animation: none;
  transition: width 0.45s ease;
}

@keyframes memories-progress-shimmer {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(280%);
  }
}

.feeling-prompt {
  margin: 1.4rem 0 1.5rem;
  color: #ffe3b5;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  font-style: italic;
  text-shadow: 0 0 1.2rem rgb(255 227 181 / 28%);
}

.yes-button:hover {
  box-shadow: 0 0.8rem 2.4rem rgb(217 157 190 / 38%);
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.yes-button:active {
  transform: scale(0.98);
}

.yes-button:focus-visible {
  outline: 2px solid #fff1c9;
  outline-offset: 4px;
}

.yes-button span {
  margin-left: 0.25rem;
}

.memory-eyebrow {
  margin: 0 0 0.6rem;
  color: #e5b9d5;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.memory-blush {
  display: block;
  width: clamp(5rem, 15vh, 8rem);
  max-height: 17vh;
  margin: 0 auto 0.45rem;
  object-fit: contain;
  filter: drop-shadow(0 0.4rem 1.2rem rgb(255 214 226 / 25%));
}

.memory-title {
  margin: 0 0 1.2rem;
  color: #fff1f2;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  font-weight: 400;
  text-shadow: 0 0 2rem rgb(230 177 218 / 32%);
}

.memory-title:focus {
  outline: none;
}

.memory-photo {
  display: block;
  width: min(100%, 34rem);
  max-height: min(44vh, 22rem);
  border: 1px solid rgb(255 237 241 / 44%);
  border-radius: 0.9rem;
  box-shadow: 0 1rem 3rem rgb(7 5 15 / 42%), 0 0 2rem rgb(216 161 202 / 18%);
  object-fit: contain;
}

.memory-caption {
  max-width: 38rem;
  margin: 1.1rem 0 0;
  color: #f3e5ee;
  font-family: "Playfair Display", serif;
  font-size: clamp(0.98rem, 2.5vw, 1.15rem);
  line-height: 1.55;
}

.memory-caption p {
  margin: 0;
}

.memory-greeting {
  color: #f6d8e6;
  font-size: 1.06em;
  font-style: italic;
}

.memory-story {
  margin-top: 0.3rem !important;
}

.memory-story strong {
  color: #ffe3b5;
  font-weight: 600;
  text-shadow: 0 0 1rem rgb(255 227 181 / 35%);
}

.memory-date-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.9rem !important;
}

.memory-date,
.memory-time {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgb(242 203 220 / 44%);
  border-radius: 999px;
  background: linear-gradient(135deg, rgb(229 181 205 / 16%), rgb(255 243 248 / 7%));
  box-shadow: 0 0.35rem 1.2rem rgb(7 5 15 / 18%);
  color: #fff1f2;
  font-family: "DM Sans", sans-serif;
  font-size: 0.87em;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.memory-time {
  border-color: rgb(255 227 181 / 52%);
  background: linear-gradient(135deg, rgb(255 227 181 / 15%), rgb(255 243 248 / 7%));
  color: #ffe3b5;
}

.memory-time-note {
  margin-top: 0.45rem !important;
  color: #cdbbd1;
  font-size: 0.82em;
  font-style: italic;
}

.scene.is-memory-visible .memory-eyebrow,
.scene.is-memory-visible .memory-blush,
.scene.is-memory-visible .memory-title,
.scene.is-memory-visible .memory-photo,
.scene.is-memory-visible .memory-greeting,
.scene.is-memory-visible .memory-story,
.scene.is-memory-visible .memory-date-line,
.scene.is-memory-visible .memory-time-note {
  animation: memory-detail-arrive 0.85s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.scene.is-memory-visible .memory-title {
  animation-delay: 0.1s;
}

.scene.is-memory-visible .memory-blush {
  animation-delay: 0.04s;
}

.scene.is-memory-visible .memory-photo {
  animation-delay: 0.2s;
}

.scene.is-memory-visible .memory-greeting {
  animation-delay: 0.32s;
}

.scene.is-memory-visible .memory-story {
  animation-delay: 0.42s;
}

.scene.is-memory-visible .memory-date-line {
  animation-delay: 0.54s;
}

.scene.is-memory-visible .memory-time-note {
  animation-delay: 0.65s;
}

@keyframes memory-detail-arrive {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flower {
  --flower-opacity: 0.9;
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  width: clamp(13rem, 34vw, 30rem);
  height: auto;
  opacity: var(--flower-opacity);
  filter: drop-shadow(0 0 2rem rgb(201 143 212 / 20%));
  pointer-events: none;
  animation: flower-arrive 1.5s ease 0.2s both;
}

.bottom-note {
  position: absolute;
  z-index: 1;
  bottom: 1.25rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #a99aaf;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.bottom-heart {
  color: #e5a8bf;
  font-size: 0.72rem;
}

.lock-screen {
  position: fixed;
  inset: 0;
  width: min(24rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0.5rem;
  overflow-y: auto;
  border: 0;
  background: transparent;
  color: inherit;
}

.lock-screen[open] {
  animation: lock-screen-arrive 0.65s ease both;
}

.lock-screen::backdrop {
  background: rgb(14 11 24 / 48%);
  backdrop-filter: blur(0.2rem);
}

.lock-screen[open]::backdrop {
  animation: lock-backdrop-arrive 0.35s ease both;
}

.scene.is-returning .lock-screen[open] {
  animation: lock-screen-leave 0.55s ease both;
}

.scene.is-returning .lock-screen[open]::backdrop {
  animation: lock-backdrop-leave 0.35s ease both;
}

.lock-panel {
  width: min(100%, 22rem);
  padding: 1.6rem 1.5rem 1.4rem;
  border: 1px solid rgb(242 203 220 / 34%);
  border-radius: 1rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgb(220 164 193 / 13%), transparent 54%),
    linear-gradient(155deg, rgb(49 37 59 / 96%), rgb(29 24 42 / 97%));
  box-shadow: 0 1.5rem 5rem rgb(7 5 15 / 52%), 0 0 3rem rgb(216 161 202 / 11%);
  text-align: center;
  transform: translateY(1rem) scale(0.97);
  transition: transform 0.55s cubic-bezier(0.2, 0.75, 0.25, 1);
}

.lock-screen[open] .lock-panel {
  transform: translateY(0) scale(1);
  animation: lock-panel-arrive 0.7s cubic-bezier(0.2, 0.75, 0.25, 1) 0.08s both;
}

.scene.is-returning .lock-screen[open] .lock-panel {
  animation: lock-panel-leave 0.4s ease both;
}

.lock-icon {
  display: grid;
  width: 2.5rem;
  aspect-ratio: 1;
  margin: 0 auto 0.8rem;
  place-items: center;
  border: 1px solid rgb(242 203 220 / 45%);
  border-radius: 50%;
  color: #f3c6d8;
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
}

.lock-eyebrow {
  margin: 0 0 0.45rem;
  color: #e5b9d5;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lock-title {
  margin: 0;
  color: #fff1f2;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.55rem, 7vw, 1.9rem);
  font-weight: 500;
}

.lock-instructions {
  margin: 0.45rem 0 0;
  color: #c4b6cd;
  font-size: 0.82rem;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.2rem 0 0.35rem;
}

.pin-dot {
  width: 0.72rem;
  aspect-ratio: 1;
  border: 1px solid rgb(241 207 222 / 72%);
  border-radius: 50%;
  background: transparent;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pin-dot.is-filled {
  background: #f1c5d7;
  box-shadow: 0 0 0.75rem rgb(241 197 215 / 70%);
  transform: scale(1.12);
}

.lock-status {
  min-height: 1.25rem;
  margin: 0 0 0.55rem;
  color: #c4b6cd;
  font-size: 0.72rem;
}

.lock-status.is-error {
  color: #ffb7bd;
}

.lock-status.is-success {
  color: #d5efcf;
}

.scene.is-open .door-lock {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.keypad-key {
  min-width: 0;
  min-height: 3rem;
  border: 1px solid rgb(242 220 231 / 18%);
  border-radius: 0.65rem;
  background: rgb(255 243 248 / 5%);
  color: #fff3f6;
  cursor: pointer;
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.keypad-key:hover {
  border-color: rgb(242 203 220 / 56%);
  background: rgb(229 181 205 / 13%);
}

.keypad-key:active {
  transform: scale(0.96);
}

.keypad-key:focus-visible,
.unlock-button:focus-visible {
  outline: 2px solid #fff1c9;
  outline-offset: 3px;
}

.keypad-utility {
  color: #d8c5d7;
  font-family: "DM Sans", sans-serif;
  font-size: 0.75rem;
}

.unlock-button {
  width: 100%;
  min-height: 2.8rem;
  margin-top: 0.75rem;
  border: 1px solid rgb(255 224 231 / 54%);
  border-radius: 0.65rem;
  background: linear-gradient(110deg, #b97e9c, #d59bb2);
  color: #281c2b;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.unlock-button:hover {
  filter: brightness(1.1);
}

.unlock-button:active {
  transform: scale(0.99);
}

.scene.is-unlocked .keypad,
.scene.is-unlocked .unlock-button {
  opacity: 0.45;
  pointer-events: none;
}

.scene.is-unlocked .pin-dot {
  border-color: #cbe8c7;
  background: #cbe8c7;
  box-shadow: 0 0 0.75rem rgb(203 232 199 / 60%);
}

.scene.is-open .door {
  box-shadow: inset 0 0 1.3rem rgb(43 24 48 / 35%);
  transform: rotateY(-108deg);
}

.scene.is-open .doorway-light {
  opacity: 1;
  transform: scale(1);
}

.scene.is-open .door-glow {
  opacity: 1.7;
  transform: translate(-50%, -50%) scale(1.35);
}

.scene.is-open .door-hint {
  opacity: 0;
  transform: translateY(-0.4rem);
}

.scene.is-open .reveal-message {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lock-screen-arrive {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lock-backdrop-arrive {
  from {
    background-color: transparent;
    backdrop-filter: blur(0);
  }
  to {
    background-color: rgb(14 11 24 / 48%);
    backdrop-filter: blur(0.2rem);
  }
}

@keyframes lock-panel-arrive {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lock-screen-leave {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
}

@keyframes lock-backdrop-leave {
  from {
    background-color: rgb(14 11 24 / 48%);
    backdrop-filter: blur(0.2rem);
  }
  to {
    background-color: transparent;
    backdrop-filter: blur(0);
  }
}

@keyframes lock-panel-leave {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-0.5rem) scale(0.98);
  }
}

@keyframes flower-arrive {
  from {
    opacity: 0;
    transform: translate(1rem, 1rem);
  }
  to {
    opacity: var(--flower-opacity);
    transform: translate(0, 0);
  }
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  12% {
    transform: scale(1.08);
  }
  24% {
    transform: scale(1);
  }
}

@keyframes lock-shake {
  0%, 100% {
    transform: rotate(0);
  }
  18%, 54%, 86% {
    transform: rotate(-11deg);
  }
  36%, 72% {
    transform: rotate(10deg);
  }
}

@media (max-width: 700px) {
  .scene {
    padding-top: 3.5rem;
  }

  .moon {
    top: 4%;
    right: 4%;
    width: 3rem;
    opacity: 0.5;
  }

  .door-stage {
    min-height: 23rem;
    justify-content: center;
    padding-top: 2rem;
  }

  .flower {
    --flower-opacity: 0.66;
    right: -1rem;
    bottom: -2rem;
    width: clamp(12rem, 48vw, 19rem);
  }

  .doorway {
    z-index: 1;
    width: clamp(10rem, 42vw, 13rem);
    height: clamp(16rem, 39vh, 19rem);
  }

  .door-glow {
    width: 18rem;
    height: 18rem;
  }

  .reveal-message {
    top: calc(50% + 10.5rem);
  }
}

@media (max-width: 400px) {
  .scene {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .eyebrow {
    letter-spacing: 0.18em;
  }

  .flower {
    --flower-opacity: 0.5;
  }

  .lock-panel {
    padding: 1.35rem 1.1rem 1.1rem;
  }

  .keypad {
    gap: 0.45rem;
  }

  .keypad-key {
    min-height: 2.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
