:root {
  --ink: #120b10;
  --ink-2: #21151b;
  --cream: #fff3df;
  --rose: #ff6f9f;
  --rose-dark: #bd315f;
  --mint: #75e7d2;
  --amber: #f8c864;
  --glass: rgba(255, 243, 223, 0.12);
  --line: rgba(255, 243, 223, 0.22);
  --shake: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 243, 223, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 243, 223, 0.045) 1px, transparent 1px),
    linear-gradient(145deg, #120b10 0%, #251019 48%, #0a1918 100%);
  background-size: 34px 34px, 34px 34px, 100% 100%;
}

.stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 760ms ease,
    visibility 760ms ease;
}

.stage.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.lock-stage {
  z-index: 10;
}

.lock-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    repeating-linear-gradient(
      0deg,
      rgba(248, 200, 100, 0.08) 0 1px,
      transparent 1px 14px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(117, 231, 210, 0.06) 0 1px,
      transparent 1px 18px
    );
  mask-image: linear-gradient(transparent 0%, black 30%, black 70%, transparent 100%);
}

.password-panel {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(190px, 340px) auto;
  gap: 10px;
  width: min(92vw, 520px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 11, 16, 0.72);
  box-shadow:
    0 18px 70px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.password-input {
  min-width: 0;
  height: 54px;
  border: 1px solid rgba(255, 243, 223, 0.32);
  border-radius: 6px;
  outline: none;
  background: rgba(255, 243, 223, 0.08);
  color: var(--cream);
  padding: 0 16px;
  font-size: clamp(18px, 2.5vw, 24px);
}

.password-input::placeholder {
  color: rgba(255, 243, 223, 0.58);
}

.password-input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(117, 231, 210, 0.18);
}

.password-button {
  height: 54px;
  border: 0;
  border-radius: 6px;
  background: var(--cream);
  color: #2a1018;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.password-button:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.password-error {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: #ffb3c8;
  font-size: 14px;
  text-align: center;
}

.password-panel.is-wrong {
  animation: wrongPassword 360ms ease both;
}

@keyframes wrongPassword {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  50% {
    transform: translateX(8px);
  }
  75% {
    transform: translateX(-5px);
  }
}

.cat-runner {
  position: absolute;
  top: calc(50% - 142px);
  left: -170px;
  z-index: 5;
  width: 150px;
  height: 136px;
  animation: catArrives 4s cubic-bezier(0.21, 0.82, 0.25, 1) 250ms forwards;
  pointer-events: none;
}

.speech-bubble {
  position: absolute;
  left: 4px;
  top: -76px;
  width: 268px;
  max-width: min(78vw, 268px);
  padding: 12px 14px;
  border: 2px solid rgba(255, 243, 223, 0.84);
  border-radius: 8px;
  background: rgba(255, 243, 223, 0.94);
  color: #221016;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  animation: bubbleFloat 900ms ease-in-out infinite alternate;
}

.speech-bubble::after {
  position: absolute;
  left: 38px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  content: "";
  background: rgba(255, 243, 223, 0.94);
  border-right: 2px solid rgba(255, 243, 223, 0.84);
  border-bottom: 2px solid rgba(255, 243, 223, 0.84);
  transform: rotate(45deg);
}

.cat-runner.is-rested .speech-bubble {
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

@keyframes catArrives {
  0% {
    left: -170px;
  }
  100% {
    left: calc(50% - 76px);
  }
}

@keyframes bubbleFloat {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-7px);
  }
}

.pixel-cat {
  position: absolute;
  left: 8px;
  bottom: 0;
  width: 126px;
  height: 90px;
  image-rendering: pixelated;
  transform-origin: 50% 100%;
  animation: catHop 420ms steps(2, end) infinite;
  transition:
    transform 720ms ease,
    bottom 720ms ease;
}

.pixel-cat span {
  position: absolute;
  display: block;
}

.cat-body,
.cat-head,
.cat-tail,
.cat-ear,
.cat-leg {
  background: #ffb4c9;
  border: 4px solid #231014;
}

.cat-body {
  left: 38px;
  top: 34px;
  width: 68px;
  height: 34px;
  box-shadow: inset 10px 0 0 rgba(255, 255, 255, 0.26);
}

.cat-head {
  left: 6px;
  top: 22px;
  width: 42px;
  height: 42px;
  box-shadow: inset 7px 0 0 rgba(255, 255, 255, 0.26);
}

.cat-ear {
  top: 10px;
  width: 18px;
  height: 20px;
  transform: rotate(45deg);
}

.cat-ear-left {
  left: 9px;
}

.cat-ear-right {
  left: 28px;
}

.cat-eye {
  top: 38px;
  width: 5px;
  height: 7px;
  background: #1b1014;
}

.cat-eye-left {
  left: 18px;
}

.cat-eye-right {
  left: 34px;
}

.cat-cheek {
  left: 26px;
  top: 50px;
  width: 10px;
  height: 5px;
  background: #ff6f9f;
}

.cat-tail {
  left: 96px;
  top: 18px;
  width: 34px;
  height: 18px;
  border-left: 0;
  transform-origin: 0 100%;
  transform: rotate(-23deg);
  animation: tailWave 560ms steps(2, end) infinite;
}

.cat-leg {
  top: 62px;
  width: 16px;
  height: 20px;
}

.cat-leg-front {
  left: 46px;
  animation: legRun 420ms steps(2, end) infinite;
}

.cat-leg-back {
  left: 84px;
  animation: legRun 420ms steps(2, end) infinite reverse;
}

.cat-runner.is-rested .pixel-cat {
  bottom: -13px;
  transform: translateY(22px) rotate(-4deg) scaleX(1.18);
  animation: catBreathe 1800ms ease-in-out infinite;
}

.cat-runner.is-rested .cat-leg {
  height: 8px;
  top: 68px;
  animation: none;
}

.cat-runner.is-rested .cat-tail {
  transform: rotate(-6deg);
  animation: tailSleep 1800ms ease-in-out infinite;
}

@keyframes catHop {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-11px);
  }
}

@keyframes catBreathe {
  0%,
  100% {
    transform: translateY(22px) rotate(-4deg) scaleX(1.18);
  }
  50% {
    transform: translateY(19px) rotate(-4deg) scaleX(1.2);
  }
}

@keyframes tailWave {
  0% {
    transform: rotate(-23deg);
  }
  100% {
    transform: rotate(-5deg);
  }
}

@keyframes tailSleep {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(-11deg);
  }
}

@keyframes legRun {
  0% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(6px);
  }
}

.lock-cracks {
  position: absolute;
  inset: -3%;
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(117deg, transparent 46%, rgba(255, 255, 255, 0.92) 47%, transparent 48%),
    linear-gradient(38deg, transparent 51%, rgba(117, 231, 210, 0.68) 52%, transparent 53%),
    linear-gradient(154deg, transparent 54%, rgba(255, 111, 159, 0.74) 55%, transparent 56%);
  mix-blend-mode: screen;
}

.lock-stage.is-unlocking .lock-cracks {
  animation: lockBreak 1150ms ease forwards;
}

.lock-stage.is-unlocking .password-panel {
  animation: panelBreak 1150ms ease forwards;
}

.lock-stage.is-unlocking .cat-runner {
  animation-play-state: paused;
  opacity: 0;
  transition: opacity 280ms ease;
}

@keyframes lockBreak {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.12) rotate(1deg);
  }
}

@keyframes panelBreak {
  0% {
    transform: scale(1);
    filter: none;
  }
  45% {
    transform: scale(1.03) rotate(-0.8deg);
    filter: contrast(1.4);
  }
  100% {
    transform: scale(1.38) rotate(4deg);
    opacity: 0;
    filter: blur(5px);
  }
}

.gallery-stage {
  z-index: 8;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 243, 223, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 243, 223, 0.04) 1px, transparent 1px),
    linear-gradient(120deg, #170d12 0%, #2a1017 45%, #0d2724 100%);
  background-size: 30px 30px, 30px 30px, 100% 100%;
}

.photo-collage {
  position: absolute;
  inset: 0;
  transform: translate(0, 0);
}

.photo-card {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: var(--ratio, 0.8);
  overflow: hidden;
  border: 1px solid rgba(255, 243, 223, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 111, 159, 0.42), rgba(117, 231, 210, 0.36)),
    rgba(255, 243, 223, 0.08);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
  transform: rotate(var(--r));
  transition:
    transform 280ms ease,
    filter 280ms ease;
}

.photo-card::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 10px solid rgba(255, 243, 223, 0.86);
  border-bottom-width: 30px;
  pointer-events: none;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.04);
}

.photo-card.is-missing img {
  display: none;
}

.photo-card.is-missing .photo-placeholder {
  display: grid;
}

.photo-placeholder {
  position: absolute;
  inset: 12px 12px 36px;
  display: none;
  place-items: center;
  color: rgba(255, 243, 223, 0.78);
  font-weight: 800;
  text-align: center;
}

.photo-card:nth-child(3n) {
  background:
    linear-gradient(135deg, rgba(248, 200, 100, 0.4), rgba(255, 111, 159, 0.38)),
    rgba(255, 243, 223, 0.08);
}

.photo-card:nth-child(3n + 1) {
  background:
    linear-gradient(135deg, rgba(117, 231, 210, 0.38), rgba(248, 200, 100, 0.34)),
    rgba(255, 243, 223, 0.08);
}

.photo-card:hover {
  transform: rotate(var(--r)) translateY(-5px) scale(1.03);
  filter: brightness(1.04);
}

.love-meter {
  position: relative;
  z-index: 3;
  width: min(88vw, 620px);
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid rgba(255, 243, 223, 0.28);
  border-radius: 8px;
  background: rgba(18, 11, 16, 0.72);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.love-meter label {
  display: block;
  margin-bottom: 18px;
  text-align: center;
  font-size: clamp(20px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.15;
}

.love-range {
  width: 100%;
  height: 34px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}

.love-range::-webkit-slider-runnable-track {
  height: 12px;
  border: 1px solid rgba(255, 243, 223, 0.36);
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--mint), var(--amber), var(--rose)),
    rgba(255, 255, 255, 0.08);
}

.love-range::-webkit-slider-thumb {
  width: 34px;
  height: 34px;
  margin-top: -12px;
  appearance: none;
  border: 3px solid #2a1018;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 0 5px rgba(255, 111, 159, 0.22);
}

.love-range::-moz-range-track {
  height: 12px;
  border: 1px solid rgba(255, 243, 223, 0.36);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--amber), var(--rose));
}

.love-range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 3px solid #2a1018;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 0 5px rgba(255, 111, 159, 0.22);
}

.gallery-stage.is-rumbling .photo-collage,
.gallery-stage.is-rumbling .love-meter {
  animation: quake 92ms linear infinite;
}

@keyframes quake {
  0% {
    transform: translate(var(--shake), calc(var(--shake) * -0.45));
  }
  25% {
    transform: translate(calc(var(--shake) * -0.5), var(--shake));
  }
  50% {
    transform: translate(calc(var(--shake) * 0.65), calc(var(--shake) * 0.55));
  }
  75% {
    transform: translate(calc(var(--shake) * -1), calc(var(--shake) * -0.25));
  }
  100% {
    transform: translate(var(--shake), calc(var(--shake) * -0.45));
  }
}

.crack-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 0.32;
  filter: drop-shadow(0 0 8px rgba(117, 231, 210, 0.45));
  transition: opacity 120ms ease;
}

.shards {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}

.shard {
  position: absolute;
  width: var(--sw);
  height: var(--sh);
  left: var(--sx);
  top: var(--sy);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(117, 231, 210, 0.16)),
    rgba(38, 15, 23, 0.82);
  clip-path: polygon(50% 0, 100% 35%, 68% 100%, 0 72%, 10% 12%);
  animation: shardFly var(--duration) cubic-bezier(0.16, 0.8, 0.25, 1) forwards;
  animation-delay: var(--delay);
}

@keyframes shardFly {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.82);
  }
}

.gallery-stage.is-shattering .love-meter {
  animation: meterGone 650ms ease forwards;
}

.gallery-stage.is-shattering .photo-card {
  animation: photosGone 900ms ease forwards;
}

@keyframes meterGone {
  to {
    opacity: 0;
    transform: scale(0.94);
  }
}

@keyframes photosGone {
  to {
    opacity: 0;
    transform: rotate(var(--r)) scale(1.12);
    filter: blur(4px);
  }
}

.web-stage {
  z-index: 6;
  overflow: hidden;
  background:
    linear-gradient(rgba(117, 231, 210, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 111, 159, 0.035) 1px, transparent 1px),
    #050607;
  background-size: 42px 42px, 42px 42px, 100% 100%;
}

.web-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.love-rain {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.love-rain span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: rgba(255, 243, 223, 0.2);
  font-size: clamp(17px, 2.7vw, 38px);
  font-weight: 900;
  text-shadow: 0 0 20px rgba(255, 111, 159, 0.34);
  transform: rotate(var(--r)) scale(0.76);
  opacity: 0;
}

.love-rain.is-waving {
  opacity: 1;
}

.love-rain.is-waving span {
  animation: loveWave 1700ms ease-out both;
  animation-delay: calc(var(--wave-delay) + var(--delay));
}

@keyframes loveWave {
  0% {
    opacity: 0;
    transform: rotate(var(--r)) translateY(18px) scale(0.72);
  }
  20% {
    opacity: 0.28;
    transform: rotate(var(--r)) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--r)) translateY(-28px) scale(1.16);
  }
}

.web-text {
  position: relative;
  z-index: 4;
  width: min(88vw, 960px);
  margin: 0;
  color: var(--cream);
  text-align: center;
  font-size: clamp(23px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.15;
  text-wrap: balance;
  text-shadow:
    0 0 18px rgba(117, 231, 210, 0.4),
    0 7px 28px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 720ms ease,
    transform 720ms ease;
}

.web-text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.web-text.is-exiting {
  opacity: 0;
  transform: translateY(-14px) scale(0.98);
}

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

.point-label {
  position: absolute;
  left: var(--label-x);
  top: var(--label-y);
  color: var(--cream);
  font-size: clamp(26px, 5vw, 58px);
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  text-shadow:
    0 0 16px rgba(255, 111, 159, 0.66),
    0 0 34px rgba(117, 231, 210, 0.3);
  transform: translate(-50%, -20px) scale(0.82);
  transition:
    opacity 900ms ease,
    transform 900ms cubic-bezier(0.2, 0.9, 0.22, 1.18);
}

.point-labels.is-visible .point-label {
  opacity: 1;
  transform: translate(-50%, -66px) scale(1);
}

.point-labels.is-visible .point-label:nth-child(2) {
  transition-delay: 260ms;
}

.calendar-moment {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: min(90vw, 620px);
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 243, 223, 0.28);
  border-radius: 8px;
  background: rgba(10, 10, 12, 0.72);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 22px)) scale(0.96);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition:
    opacity 1100ms ease,
    transform 1100ms ease;
}

.calendar-moment.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.together-counter {
  margin: 0 auto 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 243, 223, 0.16);
}

.counter-title {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 243, 223, 0.6);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.counter-grid span {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid rgba(255, 243, 223, 0.16);
  border-radius: 8px;
  background: rgba(255, 243, 223, 0.06);
}

.counter-grid strong {
  display: block;
  color: var(--cream);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1;
  overflow-wrap: anywhere;
  text-shadow: 0 0 18px rgba(117, 231, 210, 0.32);
}

.counter-grid em {
  display: block;
  margin-top: 7px;
  color: rgba(255, 243, 223, 0.62);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.together-counter small {
  display: block;
  margin-top: 10px;
  color: rgba(255, 243, 223, 0.74);
  font-size: clamp(13px, 2.5vw, 16px);
  line-height: 1.35;
}

.calendar-kicker {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 243, 223, 0.62);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-month {
  display: block;
  color: var(--cream);
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.98;
  text-shadow: 0 0 28px rgba(255, 111, 159, 0.52);
  transform-origin: 50% 100%;
}

.calendar-year {
  display: block;
  margin-top: 8px;
  color: var(--mint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
}

.calendar-caption {
  margin: 14px auto 0;
  max-width: 330px;
  color: rgba(255, 243, 223, 0.88);
  font-size: 16px;
  line-height: 1.35;
}

.calendar-moment.is-flipping .calendar-month,
.calendar-moment.is-flipping .calendar-year {
  animation: calendarFlip 280ms ease both;
}

@keyframes calendarFlip {
  0% {
    opacity: 0.15;
    transform: translateY(-12px) rotateX(72deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.heart-svg {
  position: absolute;
  z-index: 3;
  width: min(68vw, 440px);
  max-height: 58vh;
  opacity: 0;
  filter:
    drop-shadow(0 0 12px rgba(255, 111, 159, 0.72))
    drop-shadow(0 0 38px rgba(117, 231, 210, 0.22));
}

.heart-path {
  fill: transparent;
  stroke: var(--rose);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
}

.web-stage.is-heart .heart-svg {
  opacity: 1;
  transition: opacity 600ms ease;
}

.web-stage.is-heart-beating .heart-svg {
  animation: heartBeat 700ms ease-in-out both;
}

.web-stage.is-heart .heart-path {
  animation:
    drawHeart 3800ms ease forwards,
    heartFill 1200ms ease 3000ms forwards;
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.07);
  }
}

@keyframes drawHeart {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes heartFill {
  to {
    fill: rgba(255, 111, 159, 0.23);
  }
}

.heart-letter {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 6vh, 64px);
  z-index: 6;
  width: min(88vw, 680px);
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(255, 243, 223, 0.28);
  border-radius: 8px;
  background: rgba(3, 3, 3, 0.68);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.44),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--cream);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 18px) scale(0.98);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition:
    opacity 1100ms ease,
    transform 1100ms ease;
}

.heart-letter.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.heart-letter p {
  margin: 0;
  font-size: clamp(16px, 2.8vw, 24px);
  font-weight: 750;
  line-height: 1.42;
}

.heart-letter p + p {
  margin-top: 8px;
}

.final-stage {
  z-index: 20;
  background: #030303;
}

.final-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 49%, rgba(255, 111, 159, 0.22) 50%, transparent 51%),
    linear-gradient(0deg, transparent 0 49%, rgba(117, 231, 210, 0.14) 50%, transparent 51%);
  background-size: 120px 120px;
  opacity: 0.18;
}

.final-text {
  position: relative;
  z-index: 2;
  width: min(86vw, 960px);
  min-height: 2.6em;
  margin: 0;
  color: var(--cream);
  font-family:
    "Snell Roundhand", "Apple Chancery", "Segoe Script", "Brush Script MT",
    cursive;
  font-size: clamp(34px, 8vw, 94px);
  line-height: 1.08;
  text-align: center;
  text-shadow:
    0 0 12px rgba(255, 111, 159, 0.72),
    0 0 44px rgba(248, 200, 100, 0.18);
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 1100ms ease,
    transform 1100ms ease;
}

.final-text.is-fading {
  opacity: 0;
  transform: translateY(-18px) scale(0.98);
}

.final-text::after {
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.06em;
  content: "";
  background: var(--cream);
  transform: translateY(0.12em);
  animation: cursorBlink 760ms steps(2, end) infinite;
}

@keyframes cursorBlink {
  50% {
    opacity: 0;
  }
}

.final-promo {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.final-promo.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.final-cat-scene {
  width: min(88vw, 560px);
  text-align: center;
  transform: translateX(-76vw);
}

.final-promo.is-visible .final-cat-scene {
  animation: finalCatReturn 1900ms cubic-bezier(0.18, 0.84, 0.24, 1) forwards;
}

.final-cat-bubble {
  position: relative;
  left: auto;
  top: auto;
  width: min(88vw, 520px);
  max-width: 100%;
  margin: 0 auto 16px;
  animation: bubbleFloat 1100ms ease-in-out infinite alternate;
}

.final-cat-bubble::after {
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.final-pixel-cat {
  position: relative;
  left: auto;
  bottom: auto;
  width: 126px;
  height: 90px;
  margin: 0 auto 20px;
}

.promo-code-card {
  width: min(86vw, 360px);
  margin: 0 auto;
  padding: 14px 16px 16px;
  border: 1px solid rgba(255, 243, 223, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 111, 159, 0.24), rgba(117, 231, 210, 0.16)),
    rgba(255, 243, 223, 0.08);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 34px rgba(248, 200, 100, 0.16);
}

.promo-code-card span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 243, 223, 0.64);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.promo-code-card strong {
  display: block;
  color: var(--cream);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(22px, 5vw, 38px);
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-shadow: 0 0 18px rgba(248, 200, 100, 0.36);
}

.promo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 14px;
  padding: 0 18px;
  border: 1px solid rgba(248, 200, 100, 0.58);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(248, 200, 100, 0.26), rgba(255, 111, 159, 0.22)),
    rgba(3, 3, 3, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 28px rgba(248, 200, 100, 0.18);
  color: var(--cream);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.promo-link:hover,
.promo-link:focus-visible {
  border-color: rgba(255, 243, 223, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 34px rgba(248, 200, 100, 0.28);
  outline: none;
  transform: translateY(-2px);
}

@keyframes finalCatReturn {
  0% {
    opacity: 0;
    transform: translateX(-76vw);
  }
  68% {
    opacity: 1;
    transform: translateX(24px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 680px) {
  .password-panel {
    grid-template-columns: 1fr;
    width: min(90vw, 380px);
  }

  .password-button {
    width: 100%;
  }

  .cat-runner {
    top: calc(50% - 186px);
    transform: scale(0.78);
    transform-origin: left bottom;
  }

  .speech-bubble {
    left: -6px;
    width: 244px;
    font-size: 14px;
  }

  @keyframes catArrives {
    0% {
      left: -150px;
    }
    100% {
      left: calc(50% - 68px);
    }
  }

  .photo-card {
    width: calc(var(--w) * 0.52);
  }

  .photo-card:nth-child(1) {
    --x: -7vw;
    --y: 5vh;
  }

  .photo-card:nth-child(2) {
    --x: 28vw;
    --y: 3vh;
  }

  .photo-card:nth-child(3) {
    --x: 64vw;
    --y: 5vh;
  }

  .photo-card:nth-child(4) {
    --x: 84vw;
    --y: 23vh;
  }

  .photo-card:nth-child(5) {
    --x: 3vw;
    --y: 22vh;
  }

  .photo-card:nth-child(6) {
    --x: 63vw;
    --y: 29vh;
  }

  .photo-card:nth-child(7) {
    --x: -4vw;
    --y: 59vh;
  }

  .photo-card:nth-child(8) {
    --x: 32vw;
    --y: 66vh;
  }

  .photo-card:nth-child(9) {
    --x: 70vw;
    --y: 61vh;
  }

  .photo-card:nth-child(10) {
    --x: -11vw;
    --y: 39vh;
  }

  .photo-card:nth-child(11) {
    --x: 86vw;
    --y: 42vh;
  }

  .photo-card:nth-child(12) {
    --x: 8vw;
    --y: 78vh;
  }

  .photo-card:nth-child(13) {
    --x: 56vw;
    --y: 80vh;
  }

  .photo-card:nth-child(14) {
    --x: 39vw;
    --y: 17vh;
  }

  .photo-card:nth-child(15) {
    --x: 77vw;
    --y: 4vh;
  }

  .photo-card:nth-child(16) {
    --x: 46vw;
    --y: 55vh;
  }

  .calendar-moment {
    width: min(90vw, 420px);
    padding: 16px 14px 18px;
  }

  .counter-grid {
    gap: 6px;
  }

  .counter-grid span {
    padding: 9px 4px;
  }

  .counter-grid strong {
    font-size: clamp(14px, 3.75vw, 22px);
  }

  .counter-grid em {
    font-size: 10px;
  }
}

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