:root {
  color-scheme: dark;
  --night-deep: #03040a;
  --night: #05060d;
  --night-blue: #0a1020;
  --moon-white: #f5f8fd;
  --moon-blue: #cfdceb;
  --moon-rim: #9fb4cc;
  --rose: #c98692;
  --sky-x: 0px;
  --sky-y: 0px;
  --moon-x: 0px;
  --moon-y: 0px;
  --moon-size: clamp(286px, min(72vw, 72vh), 650px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--night-deep);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  font-family: system-ui, sans-serif;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lock-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(46, 64, 94, .18), transparent 30%),
    linear-gradient(155deg, #080b16 0%, #03050b 56%, #010207 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 1.25s ease, visibility 1.25s step-end;
}

.lock-screen::before,
.lock-screen::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(231, 241, 255, .65);
  box-shadow:
    -34vw -28vh 0 rgba(231, 241, 255, .22),
    27vw -20vh 0 rgba(231, 241, 255, .33),
    -21vw 24vh 0 rgba(231, 241, 255, .25),
    35vw 30vh 0 rgba(231, 241, 255, .18),
    9vw -35vh 0 rgba(231, 241, 255, .22);
}

.lock-screen::after {
  opacity: .55;
  transform: rotate(35deg) scale(.7);
}

.unlocked .lock-screen {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.passcode-form {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 34px;
}

.lock-moon {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 31%, rgba(255, 255, 255, .96) 0 8%, transparent 9%),
    radial-gradient(circle at 66% 64%, rgba(119, 142, 167, .18) 0 12%, transparent 13%),
    radial-gradient(circle at 30% 66%, rgba(119, 142, 167, .14) 0 8%, transparent 9%),
    radial-gradient(circle at 42% 38%, #fff 0%, #e6eff8 45%, #b8c9db 100%);
  box-shadow:
    0 0 16px rgba(201, 220, 240, .62),
    0 0 42px rgba(148, 179, 210, .28),
    0 0 80px rgba(122, 154, 192, .12);
  animation: lock-moon-breathe 5s ease-in-out infinite;
}

.lock-star {
  position: absolute;
  top: -12px;
  right: -18px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f6fbff;
  box-shadow: 0 0 9px 2px rgba(224, 240, 255, .72);
}

.lock-star::before,
.lock-star::after {
  content: "";
  position: absolute;
  top: 1px;
  left: -4px;
  width: 11px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #edf8ff, transparent);
}

.lock-star::after {
  transform: rotate(90deg);
}

.passcode-shell {
  position: relative;
  display: grid;
  grid-template-columns: 116px 42px;
  gap: 10px;
  padding: 6px;
  border: 1px solid rgba(179, 202, 226, .13);
  border-radius: 18px;
  background: rgba(14, 20, 35, .68);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, .32),
    inset 0 1px 0 rgba(255, 255, 255, .025);
  backdrop-filter: blur(16px);
  transition: border-color .3s ease, box-shadow .3s ease;
}

.passcode-shell input {
  width: 116px;
  height: 46px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  border-radius: 12px;
  background: rgba(4, 7, 14, .64);
  color: #edf5fc;
  font-size: 22px;
  font-weight: 400;
  line-height: 46px;
  letter-spacing: .62em;
  text-align: center;
  caret-color: rgba(231, 242, 253, .8);
  box-shadow: inset 0 0 0 1px rgba(174, 203, 231, .09);
  transition: box-shadow .25s ease, background .25s ease;
}

.passcode-shell input:focus-visible {
  box-shadow:
    inset 0 0 0 1px rgba(204, 227, 248, .45),
    0 0 18px rgba(135, 172, 211, .12);
}

.passcode-shell button {
  display: grid;
  width: 42px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  place-items: center;
  background: rgba(223, 235, 247, .09);
  color: rgba(229, 240, 250, .82);
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}

.passcode-shell button:hover {
  background: rgba(223, 235, 247, .14);
  color: #fff;
  transform: translateX(1px);
}

.passcode-shell button:focus-visible {
  outline: 1px solid rgba(222, 239, 255, .68);
  outline-offset: 3px;
}

.passcode-shell button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.passcode-shell.is-error {
  border-color: rgba(213, 102, 116, .48);
  box-shadow:
    0 0 0 1px rgba(213, 102, 116, .14),
    0 0 30px rgba(181, 53, 72, .22);
  animation: gentle-shake .52s cubic-bezier(.36, .07, .19, .97);
}

.passcode-shell.is-error input {
  background: rgba(62, 10, 20, .22);
  box-shadow:
    inset 0 0 0 1px rgba(215, 98, 115, .25),
    0 0 18px rgba(188, 54, 72, .13);
}

.scene {
  position: fixed;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(36, 53, 81, .3) 0%, transparent 38%),
    radial-gradient(ellipse at 20% 10%, rgba(28, 41, 70, .18), transparent 34%),
    linear-gradient(180deg, #090e20 0%, #050710 46%, #020308 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease;
  touch-action: manipulation;
}

.unlocked .scene {
  opacity: 1;
  visibility: visible;
}

.scene::before {
  content: "";
  position: absolute;
  z-index: 30;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, .43) 100%);
}

.sky-depth {
  position: absolute;
  inset: -4%;
  will-change: transform;
}

.sky-depth-back {
  transform: translate3d(calc(var(--sky-x) * -.28), calc(var(--sky-y) * -.28), 0);
}

.sky-depth-front {
  transform: translate3d(calc(var(--sky-x) * -.58), calc(var(--sky-y) * -.58), 0);
}

.star {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(236, 245, 255, var(--alpha));
  box-shadow: 0 0 calc(var(--size) * 3.5) rgba(214, 233, 255, calc(var(--alpha) * .75));
  opacity: 0;
}

.story-start .star {
  animation:
    star-reveal 1.8s ease var(--reveal) forwards,
    star-twinkle var(--twinkle) ease-in-out calc(var(--reveal) + 1.8s) infinite alternate;
}

.shooting-stars {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.shooting-stars i {
  position: absolute;
  top: 17%;
  left: 76%;
  width: 110px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(238, 247, 255, 0), rgba(238, 247, 255, .65));
  filter: drop-shadow(0 0 4px rgba(211, 231, 250, .48));
  opacity: 0;
  transform: rotate(-28deg) translateX(-60px);
}

.story-start .shooting-stars i:nth-child(1) {
  animation: shooting-star 2.1s ease 13s infinite;
  animation-iteration-count: 2;
}

.shooting-stars i:nth-child(2) {
  top: 34%;
  left: 11%;
  width: 80px;
  transform: rotate(-31deg) translateX(-60px);
}

.story-start .shooting-stars i:nth-child(2) {
  animation: shooting-star 1.9s ease 24s infinite;
  animation-iteration-count: 2;
}

.shooting-stars i:nth-child(3) {
  top: 10%;
  left: 42%;
  width: 64px;
  transform: rotate(-26deg) translateX(-60px);
}

.story-start .shooting-stars i:nth-child(3) {
  animation: shooting-star 1.8s ease 38s infinite;
  animation-iteration-count: 2;
}

.atmosphere {
  position: absolute;
  z-index: 2;
  width: 75vw;
  height: 30vh;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: .12;
}

.atmosphere-one {
  top: 3%;
  left: -25%;
  background: #263e69;
  transform: rotate(-12deg);
}

.atmosphere-two {
  right: -28%;
  bottom: 6%;
  background: #263855;
  transform: rotate(13deg);
}

.story-start .atmosphere-one {
  animation: atmosphere-drift 22s ease-in-out infinite alternate;
}

.story-start .atmosphere-two {
  animation: atmosphere-drift-two 26s ease-in-out infinite alternate;
}

.moon-stage {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  width: var(--moon-size);
  height: var(--moon-size);
  opacity: 0;
  transform: translate3d(
    calc(-50% + var(--moon-x)),
    calc(-33% + var(--moon-y) + 15vh),
    0
  ) scale(.84);
  will-change: transform, opacity;
}

.story-start .moon-stage {
  animation:
    moon-entrance 5.8s cubic-bezier(.2, .72, .25, 1) 2.25s forwards,
    moon-breathe 8s ease-in-out 8.1s infinite alternate;
}

.moon-halo,
.moon {
  position: absolute;
  border-radius: 50%;
  inset: 0;
}

.moon-halo {
  pointer-events: none;
}

.halo-outer {
  inset: -24%;
  background: radial-gradient(circle, rgba(191, 215, 237, .2) 0 33%, rgba(132, 167, 204, .08) 48%, transparent 70%);
  filter: blur(17px);
  opacity: .62;
}

.halo-inner {
  inset: -9%;
  background: radial-gradient(circle, rgba(229, 240, 250, .2) 0 45%, rgba(161, 190, 217, .11) 57%, transparent 72%);
  filter: blur(8px);
  opacity: .78;
}

.moon {
  overflow: hidden;
  background:
    radial-gradient(circle at 33% 28%, rgba(255, 255, 255, .97) 0 3%, transparent 17%),
    radial-gradient(circle at 72% 25%, rgba(149, 171, 194, .12) 0 10%, transparent 18%),
    radial-gradient(circle at 42% 71%, rgba(139, 164, 190, .16) 0 12%, transparent 26%),
    radial-gradient(circle at 36% 34%, #fdfefe 0%, #eaf1f7 38%, #c7d5e3 75%, #9eb2c7 100%);
  box-shadow:
    0 0 8px 2px rgba(240, 247, 253, .7),
    0 0 34px 10px rgba(185, 210, 234, .35),
    0 0 100px 28px rgba(117, 151, 188, .18),
    inset -22px -16px 42px rgba(91, 116, 143, .26),
    inset 18px 12px 38px rgba(255, 255, 255, .24);
}

.moon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: .38;
  background-image:
    radial-gradient(circle at 18% 20%, rgba(76, 99, 123, .22) 0 1px, transparent 1.5px),
    radial-gradient(circle at 82% 37%, rgba(76, 99, 123, .18) 0 1px, transparent 1.5px),
    radial-gradient(circle at 59% 79%, rgba(76, 99, 123, .16) 0 1px, transparent 1.5px);
  background-size: 23px 27px, 31px 29px, 37px 35px;
  mix-blend-mode: multiply;
}

.moon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, .58);
  box-shadow: inset 7px 8px 15px rgba(255, 255, 255, .22);
}

.crater,
.lunar-sea {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(255, 255, 255, .18), rgba(89, 112, 137, .13) 56%, rgba(68, 92, 117, .04) 70%);
  box-shadow:
    inset 2px 2px 4px rgba(86, 110, 135, .12),
    inset -2px -2px 4px rgba(255, 255, 255, .16);
}

.crater-one {
  top: 18%;
  left: 20%;
  width: 13%;
  height: 13%;
}

.crater-two {
  top: 33%;
  right: 17%;
  width: 19%;
  height: 19%;
  opacity: .7;
}

.crater-three {
  top: 58%;
  left: 16%;
  width: 22%;
  height: 22%;
  opacity: .55;
}

.crater-four {
  top: 69%;
  right: 25%;
  width: 10%;
  height: 10%;
  opacity: .58;
}

.crater-five {
  top: 12%;
  left: 50%;
  width: 8%;
  height: 8%;
  opacity: .5;
}

.lunar-sea {
  border-radius: 48% 52% 62% 38% / 54% 41% 59% 46%;
  box-shadow: none;
  filter: blur(2px);
}

.sea-one {
  top: 32%;
  left: 28%;
  width: 31%;
  height: 22%;
  background: rgba(106, 133, 159, .09);
  transform: rotate(-18deg);
}

.sea-two {
  right: 13%;
  bottom: 26%;
  width: 24%;
  height: 17%;
  background: rgba(104, 129, 154, .08);
  transform: rotate(24deg);
}

.character-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  overflow: hidden;
  border-radius: 50%;
}

.story-start .character-layer {
  animation: character-reveal 1.75s ease 8.35s forwards;
}

.boy,
.girl,
.bouquet,
.boy-breathe,
.girl-breathe,
.girl-reach {
  transform-box: view-box;
  transform-origin: center;
}

.boy {
  transform: translateX(-70px);
}

.girl {
  transform: translateX(55px);
}

.story-start .boy {
  animation:
    boy-walk 3.4s cubic-bezier(.38, .02, .25, 1) 10.3s forwards,
    boy-hug 3.05s cubic-bezier(.26, .65, .28, 1) 18.55s forwards;
}

.story-start .girl {
  animation: girl-hug 3.05s cubic-bezier(.26, .65, .28, 1) 18.55s forwards;
}

.boy-breathe,
.girl-breathe {
  transform-origin: 50% 83%;
}

.story-complete .boy-breathe {
  animation: character-breathe 5.4s ease-in-out infinite alternate;
}

.story-complete .girl-breathe {
  animation: character-breathe 5.4s ease-in-out .45s infinite alternate;
}

.boy-back-arm {
  transform-origin: 216px 355px;
}

.story-start .boy-back-arm {
  animation: hidden-arm 4s ease 10.2s both;
}

.boy-front-arm,
.boy-hug-arm,
.girl-side-arm,
.girl-hug-arm {
  transform-origin: 50% 58%;
  transition: opacity .8s ease;
}

.boy-hug-arm,
.girl-hug-arm {
  opacity: 0;
}

.story-complete .boy-hug-arm,
.story-complete .girl-hug-arm {
  opacity: 1;
}

.girl-reach {
  transform-origin: 390px 352px;
  transition: opacity .8s ease;
}

.story-start .girl-reach {
  animation: girl-accept 2.6s cubic-bezier(.28, .66, .3, 1) 16.1s both;
}

.story-complete .boy-front-arm,
.story-complete .girl-side-arm,
.story-complete .girl-reach {
  opacity: 0;
}

.bouquet {
  opacity: 0;
  transform: translate(211px, 394px) rotate(-26deg) scale(.78);
  filter: drop-shadow(0 0 5px rgba(201, 134, 146, .23));
}

.story-start .bouquet {
  animation:
    bouquet-reveal 1.5s cubic-bezier(.24, .7, .3, 1) 14s forwards,
    bouquet-give 2.85s cubic-bezier(.3, .64, .27, 1) 15.55s forwards;
}

.story-hearts {
  position: absolute;
  z-index: 18;
  top: calc(50% + var(--moon-size) * .12);
  left: 50%;
  width: calc(var(--moon-size) * .28);
  height: calc(var(--moon-size) * .4);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.story-hearts i,
.particle {
  position: absolute;
  width: var(--heart-size, 7px);
  height: var(--heart-size, 7px);
  background: var(--heart-color, rgba(201, 134, 146, .84));
  transform: rotate(45deg);
  border-radius: 1px 55% 4px 55%;
  box-shadow: 0 0 8px rgba(220, 152, 166, .44);
  opacity: 0;
}

.story-hearts i::before,
.story-hearts i::after,
.particle.heart::before,
.particle.heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
}

.story-hearts i::before,
.particle.heart::before {
  left: -50%;
}

.story-hearts i::after,
.particle.heart::after {
  top: -50%;
}

.story-hearts i:nth-child(1) {
  left: 29%;
  bottom: 4%;
  --heart-size: 6px;
}

.story-hearts i:nth-child(2) {
  left: 57%;
  bottom: 0;
  --heart-size: 5px;
}

.story-hearts i:nth-child(3) {
  left: 42%;
  bottom: 10%;
  --heart-size: 8px;
}

.story-hearts i:nth-child(4) {
  left: 65%;
  bottom: 18%;
  --heart-size: 4px;
}

.story-hearts i:nth-child(5) {
  left: 20%;
  bottom: 24%;
  --heart-size: 5px;
}

.story-complete .story-hearts i {
  animation: heart-rise 6.8s ease-in infinite;
}

.story-complete .story-hearts i:nth-child(2) {
  animation-delay: 1.4s;
  animation-duration: 7.6s;
}

.story-complete .story-hearts i:nth-child(3) {
  animation-delay: 2.7s;
  animation-duration: 8.4s;
}

.story-complete .story-hearts i:nth-child(4) {
  animation-delay: 4.2s;
  animation-duration: 7.2s;
}

.story-complete .story-hearts i:nth-child(5) {
  animation-delay: 5.4s;
  animation-duration: 8.8s;
}

.love-note {
  position: absolute;
  z-index: 26;
  top: calc(50% + var(--moon-size) * .56);
  left: 50%;
  color: #f8fbff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 3.4vw, 36px);
  font-weight: 400;
  letter-spacing: .08em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
}

.love-note span {
  display: inline-block;
  margin-left: .16em;
  font-family: system-ui, sans-serif;
  font-size: .82em;
  letter-spacing: 0;
}

.story-complete .love-note {
  animation: love-note-reveal 1.8s ease forwards;
}

.particle-field {
  position: absolute;
  z-index: 24;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  left: var(--x);
  top: var(--y);
  animation: particle-burst var(--duration) ease-out forwards;
}

.particle.spark {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  transform: none;
  background: rgba(225, 235, 247, .82);
  box-shadow: 0 0 7px rgba(215, 231, 247, .7);
}

.ground-haze {
  position: absolute;
  z-index: 20;
  right: -15%;
  bottom: -17%;
  left: -15%;
  height: 34%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(49, 69, 100, .26), rgba(11, 18, 32, .08) 54%, transparent 72%);
  filter: blur(34px);
  opacity: .48;
  pointer-events: none;
}

.story-complete .ground-haze {
  animation: haze-breathe 10s ease-in-out infinite alternate;
}

@keyframes lock-moon-breathe {
  0%,
  100% { transform: translateY(1px) scale(.98); }
  50% { transform: translateY(-3px) scale(1.02); }
}

@keyframes gentle-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

@keyframes star-reveal {
  from { opacity: 0; transform: scale(.2); }
  to { opacity: var(--alpha); transform: scale(1); }
}

@keyframes star-twinkle {
  0% { opacity: calc(var(--alpha) * .45); transform: scale(.72); }
  100% { opacity: var(--alpha); transform: scale(1.12); }
}

@keyframes shooting-star {
  0% { opacity: 0; transform: rotate(-28deg) translateX(-60px) scaleX(.3); }
  11% { opacity: .68; }
  40% { opacity: 0; transform: rotate(-28deg) translateX(190px) scaleX(1); }
  100% { opacity: 0; transform: rotate(-28deg) translateX(190px) scaleX(1); }
}

@keyframes atmosphere-drift {
  from { transform: translate3d(-4%, -2%, 0) rotate(-12deg) scale(.9); }
  to { transform: translate3d(18%, 7%, 0) rotate(-8deg) scale(1.1); }
}

@keyframes atmosphere-drift-two {
  from { transform: translate3d(4%, 2%, 0) rotate(13deg) scale(.92); }
  to { transform: translate3d(-16%, -5%, 0) rotate(8deg) scale(1.08); }
}

@keyframes moon-entrance {
  0% {
    opacity: 0;
    transform: translate3d(
      calc(-50% + var(--moon-x)),
      calc(-33% + var(--moon-y) + 15vh),
      0
    ) scale(.84);
  }
  42% { opacity: .46; }
  100% {
    opacity: 1;
    transform: translate3d(
      calc(-50% + var(--moon-x)),
      calc(-50% + var(--moon-y)),
      0
    ) scale(1);
  }
}

@keyframes moon-breathe {
  from {
    transform: translate3d(
      calc(-50% + var(--moon-x)),
      calc(-50% + var(--moon-y)),
      0
    ) scale(1);
    filter: brightness(.98);
  }
  to {
    transform: translate3d(
      calc(-50% + var(--moon-x)),
      calc(-50% + var(--moon-y) - 3px),
      0
    ) scale(1.008);
    filter: brightness(1.025);
  }
}

@keyframes character-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes boy-walk {
  0% { transform: translateX(-70px) translateY(0); }
  14% { transform: translateX(-62px) translateY(-2px) rotate(.6deg); }
  28% { transform: translateX(-54px) translateY(0) rotate(-.5deg); }
  42% { transform: translateX(-45px) translateY(-2px) rotate(.5deg); }
  56% { transform: translateX(-36px) translateY(0) rotate(-.4deg); }
  72% { transform: translateX(-25px) translateY(-1px) rotate(.3deg); }
  100% { transform: translateX(-12px) translateY(0); }
}

@keyframes boy-hug {
  from { transform: translateX(-12px); }
  to { transform: translateX(40px) translateY(1px) rotate(1.2deg); }
}

@keyframes girl-hug {
  from { transform: translateX(55px); }
  to { transform: translateX(-32px) translateY(2px) rotate(-1deg); }
}

@keyframes hidden-arm {
  0%, 70% { transform: rotate(13deg); }
  100% { transform: rotate(0); }
}

@keyframes bouquet-reveal {
  0% {
    opacity: 0;
    transform: translate(211px, 394px) rotate(-26deg) scale(.72);
  }
  100% {
    opacity: 1;
    transform: translate(242px, 360px) rotate(-8deg) scale(.84);
  }
}

@keyframes bouquet-give {
  0% {
    opacity: 1;
    transform: translate(242px, 360px) rotate(-8deg) scale(.84);
  }
  100% {
    opacity: 1;
    transform: translate(332px, 353px) rotate(13deg) scale(.88);
  }
}

@keyframes girl-accept {
  0%, 12% { transform: rotate(-9deg) translateX(0); }
  70%, 100% { transform: rotate(7deg) translateX(-8px); }
}

@keyframes character-breathe {
  from { transform: scaleY(1) translateY(0); }
  to { transform: scaleY(1.006) translateY(-1px); }
}

@keyframes heart-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) rotate(45deg) scale(.55);
  }
  18% { opacity: .72; }
  72% { opacity: .38; }
  100% {
    opacity: 0;
    transform: translate3d(10px, -110px, 0) rotate(55deg) scale(1.05);
  }
}

@keyframes particle-burst {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(45deg) scale(.4);
  }
  15% { opacity: .78; }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--turn)) scale(.1);
  }
}

@keyframes haze-breathe {
  from { opacity: .38; transform: translateY(5px) scaleX(.94); }
  to { opacity: .54; transform: translateY(-4px) scaleX(1.04); }
}

@keyframes love-note-reveal {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 700px) {
  :root {
    --moon-size: clamp(280px, min(88vw, 66vh), 510px);
  }

  .passcode-form {
    gap: 30px;
  }

  .lock-moon {
    width: 58px;
    height: 58px;
  }

  .story-hearts {
    width: calc(var(--moon-size) * .34);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --moon-size: min(80vh, 520px);
  }

  .lock-moon {
    width: 48px;
    height: 48px;
  }

  .passcode-form {
    gap: 22px;
  }
}

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

  .lock-screen {
    transition-duration: .35s;
  }
}

.reduced-motion .moon-stage {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.reduced-motion .character-layer {
  opacity: 1;
}

.reduced-motion .boy {
  transform: translateX(40px) translateY(1px) rotate(1.2deg);
}

.reduced-motion .girl {
  transform: translateX(-32px) translateY(2px) rotate(-1deg);
}

.reduced-motion .bouquet {
  opacity: 1;
  transform: translate(332px, 353px) rotate(13deg) scale(.88);
}

.reduced-motion .star {
  opacity: var(--alpha);
}

.reduced-motion .boy-hug-arm,
.reduced-motion .girl-hug-arm {
  opacity: 1;
}

.reduced-motion .boy-front-arm,
.reduced-motion .girl-side-arm,
.reduced-motion .girl-reach {
  opacity: 0;
}
