@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(fonts/nunito-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(fonts/nunito-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Marck Script';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/marck-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Marck Script';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/marck-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --milk: #fffbfc;
  --petal: #ffe1e8;
  --blush: #ffc9d6;
  --pink: #f58aa6;
  --rose: #b83b5e;
  --plum: #3b1f2b;
  --soft: #6e5562;
  --fur: #9c919a;
  --hand: 'Marck Script', 'Segoe Script', cursive;
  --body: 'Nunito', ui-rounded, 'SF Pro Rounded', 'Segoe UI', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(245, 138, 166, 0.25);
}

body {
  margin: 0;
  background: var(--milk);
  color: var(--plum);
  font: 400 1.125rem/1.6 var(--body);
  overflow-x: hidden;
}

button,
a {
  touch-action: manipulation;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--rose);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--rose);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(100% - 44px, 880px);
  margin-inline: auto;
}

section {
  padding-block: 76px;
}

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.8rem, 5.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 52ch;
  margin: 10px 0 34px;
  color: var(--soft);
  text-wrap: pretty;
}

.hand {
  font-family: var(--hand);
  font-weight: 400;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: min(86svh, 760px);
  padding: max(8vh, 40px) 22px 0;
  background: var(--petal);
  text-align: center;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 14px;
  background: radial-gradient(circle 14px at 14px 0, var(--petal) 98%, transparent) repeat-x;
  background-size: 28px 14px;
}

.hero h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.name {
  display: block;
  font: 400 clamp(4.2rem, 21vw, 9rem) / 0.95 var(--hand);
  color: var(--rose);
  transform: rotate(-3deg);
}

.wish {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.5rem, 5.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
}

.together {
  margin-top: 36px;
}

.together .big {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.25rem, 4.6vw, 1.8rem);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.together .small {
  margin: 8px 0 0;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.mascot {
  margin-top: auto;
  width: clamp(150px, 38vw, 210px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% 100%;
}

.mascot svg {
  display: block;
  width: 100%;
  height: auto;
}

.mascot.pet {
  animation: squish 0.5s ease;
}

@keyframes squish {
  30% {
    transform: scale(1.08, 0.92);
  }
  60% {
    transform: scale(0.96, 1.06);
  }
}

.rise {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.name.rise {
  animation-name: rise-name;
}

@keyframes rise-name {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-3deg);
  }
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 8.2rem 1fr;
  column-gap: 30px;
  padding-bottom: 30px;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: calc(8.2rem + 14px);
  top: 8px;
  bottom: -8px;
  border-left: 2px dashed var(--blush);
}

.timeline li:last-child::before {
  display: none;
}

.timeline li::after {
  content: '';
  position: absolute;
  left: calc(8.2rem + 8px);
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 5px var(--milk);
}

.timeline time {
  text-align: right;
  padding-top: 2px;
  font: 400 1.25rem/1.3 var(--hand);
  color: var(--rose);
}

.timeline h3 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
}

.timeline p {
  margin: 2px 0 0;
  color: var(--soft);
}

.moments {
  background-color: var(--petal);
  background-image: radial-gradient(rgba(184, 59, 94, 0.14) 1.4px, transparent 1.6px);
  background-size: 22px 22px;
}

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 38px 28px;
  padding: 12px 6px 0;
}

.polaroid {
  position: relative;
  display: block;
  width: 100%;
  padding: 12px 12px 0;
  border: 0;
  border-radius: 3px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(59, 31, 43, 0.18),
    0 10px 22px -8px rgba(59, 31, 43, 0.3);
  text-align: center;
  cursor: pointer;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.25s ease;
}

.polaroid::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -13px;
  width: 78px;
  height: 24px;
  margin-left: -39px;
  background: rgba(245, 138, 166, 0.55);
  transform: rotate(calc(var(--r, 0deg) * -2));
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.04);
}

.polaroid .pic {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--petal);
}

.polaroid .empty {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  background: var(--petal);
}

.polaroid .empty svg {
  width: 58%;
  height: auto;
}

.polaroid .cap {
  display: block;
  padding: 10px 4px 14px;
  font: 400 1.2rem/1.25 var(--hand);
  color: var(--plum);
}

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 22px 18px;
}

.note {
  height: 150px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 700px;
  transform: rotate(var(--r, 0deg));
}

.note-in {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.55s;
  transform-style: preserve-3d;
}

.note[aria-pressed='true'] .note-in {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--tint, var(--blush));
  border-radius: 3px 3px 26px 3px;
  box-shadow: 0 8px 14px -8px rgba(59, 31, 43, 0.35);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
}

.face.back {
  transform: rotateY(180deg);
  font: 400 1.18rem/1.25 var(--hand);
}

.ours {
  margin: 0 0 34px;
}

.ours div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 0;
}

.ours dt {
  flex: none;
  font-weight: 800;
}

.ours .dots {
  flex: 1;
  min-width: 18px;
  border-bottom: 2px dotted var(--blush);
  transform: translateY(-5px);
}

.ours dd {
  margin: 0;
  max-width: 24ch;
  text-align: right;
  color: var(--soft);
  text-wrap: balance;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border: 2px solid var(--rose);
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.btn:hover {
  background: #9c2e4d;
  border-color: #9c2e4d;
}

.btn.ghost {
  background: transparent;
  color: var(--rose);
}

.btn.ghost:hover {
  background: var(--petal);
  border-color: var(--rose);
}

.tickets {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tickets li {
  position: relative;
  filter: drop-shadow(0 6px 8px rgba(59, 31, 43, 0.18));
}

.ticket {
  display: grid;
  grid-template-columns: 84px 1fr;
  width: 100%;
  min-height: 108px;
  padding: 0;
  border: 0;
  background: var(--petal);
  text-align: left;
  cursor: pointer;
  -webkit-mask:
    radial-gradient(circle 11px at 84px 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 11px at 84px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle 11px at 84px 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 11px at 84px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  border-radius: 10px;
  transition: transform 0.2s;
}

.ticket:hover:not([aria-disabled='true']) {
  transform: translateX(4px);
}

.ticket .stub {
  display: grid;
  place-items: center;
  background: var(--rose);
  font-size: 2rem;
}

.ticket .info {
  padding: 16px 22px;
  border-left: 3px dashed var(--milk);
}

.ticket h3 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

.ticket p {
  margin: 4px 0 0;
  color: var(--soft);
}

.ticket[aria-disabled='true'] {
  cursor: default;
}

.ticket[aria-disabled='true'] .info {
  opacity: 0.45;
}

.ticket[aria-disabled='true'] .stub {
  background: var(--fur);
}

.stamp {
  position: absolute;
  right: 22px;
  top: 50%;
  padding: 2px 14px;
  border: 3px solid var(--rose);
  border-radius: 10px;
  color: var(--rose);
  font: 400 1.5rem/1.3 var(--hand);
  transform: translateY(-50%) rotate(-9deg);
  pointer-events: none;
}

.stamp.fresh {
  animation: stamp 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: translateY(-50%) rotate(-9deg) scale(2.2);
  }
}

.quiz {
  min-height: 320px;
  padding: 26px 0 0;
  border-top: 3px dotted var(--blush);
}

.progress {
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.progress li {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blush);
}

.progress li.done {
  background: var(--rose);
}

.progress li.now {
  background: var(--pink);
  transform: scale(1.35);
}

.quiz h3 {
  max-width: 24ch;
  margin-bottom: 20px;
  font-size: clamp(1.4rem, 4.6vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
}

.opts {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.opt {
  padding: 13px 18px;
  border: 2px solid var(--blush);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}

.opt:hover:not(:disabled) {
  border-color: var(--rose);
}

.opt:disabled {
  cursor: default;
}

.opt.ok {
  border-color: #2f7a4b;
  background: #e6f5ea;
}

.opt.bad {
  border-color: #b3261e;
  background: #fde9e7;
}

.quiz .go {
  margin-top: 18px;
}

.status {
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--soft);
  font-weight: 700;
}

.result .score {
  display: block;
  font: 400 clamp(3.4rem, 15vw, 6rem) / 1 var(--hand);
  color: var(--rose);
}

.result p {
  max-width: 34ch;
  margin: 8px 0 22px;
}

.sheet {
  --lh: 36px;
  --gut: 48px;
  --shift: -9px;
  position: relative;
  margin-top: 28px;
  min-height: 252px;
  padding: var(--lh) 24px var(--lh) calc(var(--gut) + 18px);
  background-color: #fff;
  background-image:
    linear-gradient(
      90deg,
      transparent var(--gut),
      rgba(245, 138, 166, 0.55) var(--gut) calc(var(--gut) + 2px),
      transparent calc(var(--gut) + 2px)
    ),
    repeating-linear-gradient(transparent 0 calc(var(--lh) - 2px), #f5d6de calc(var(--lh) - 2px) var(--lh));
  background-position:
    0 0,
    0 var(--shift);
  border-radius: 4px;
  box-shadow:
    0 1px 2px rgba(59, 31, 43, 0.18),
    0 16px 30px -14px rgba(59, 31, 43, 0.35);
}

.sheet .hand {
  font-size: 1.45rem;
  line-height: var(--lh);
}

.sheet .hand p {
  margin: 0;
  min-height: var(--lh);
}

.sheet .sign {
  margin-top: var(--lh);
  text-align: right;
  color: var(--rose);
  font-size: 1.7rem;
}

.heart-hand {
  display: inline-block;
  width: 1.15em;
  height: 1.05em;
  margin-left: 0.2em;
  vertical-align: -0.12em;
  overflow: visible;
}

.sheet[data-locked='true'] {
  display: grid;
  place-items: center;
  padding: 30px;
}

.seal[hidden] {
  display: none;
}

.seal {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
  color: var(--rose);
  font-weight: 800;
  font-size: 1rem;
}

.seal span {
  font-size: 2.8rem;
}

.seal p {
  margin: 0;
}

.sheet[data-locked='false'] .hand {
  animation: unfold 0.8s ease both;
}

@keyframes unfold {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

footer {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 50px 22px 70px;
  background: var(--petal);
  text-align: center;
}

.foot-chin {
  width: 96px;
  height: 96px;
}

footer .hand {
  margin: 8px 0 0;
  font-size: 1.7rem;
  color: var(--rose);
}

.since {
  margin: 0;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #3b1f2b;
  color: #fff;
  overscroll-behavior: contain;
}

.viewer[open] {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  padding-block: env(safe-area-inset-top) env(safe-area-inset-bottom);
}

.viewer form {
  display: contents;
}

.viewer figure {
  grid-column: 2;
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 0;
  min-width: 0;
}

.viewer img {
  max-width: 100%;
  max-height: 74svh;
  border: 10px solid #fff;
  border-radius: 3px;
}

.viewer .empty {
  display: grid;
  place-items: center;
  width: min(72vw, 360px);
  aspect-ratio: 1;
  border: 10px solid #fff;
  background: var(--petal);
}

.viewer .empty svg {
  width: 62%;
}

.viewer figcaption {
  font-size: 1.6rem;
  text-align: center;
}

.x {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 14px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}

.nv.prev {
  grid-column: 1;
  grid-row: 1;
}

.nv.next {
  grid-column: 3;
  grid-row: 1;
}

.viewer figure {
  grid-row: 1;
}

.nv {
  height: 96px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 4.4rem;
  line-height: 1;
  cursor: pointer;
}

.nv:disabled {
  opacity: 0.25;
  cursor: default;
}

.ask {
  width: min(90vw, 380px);
  padding: 26px;
  border: 0;
  border-radius: 20px;
  background: var(--milk);
  color: var(--plum);
  box-shadow: 0 24px 60px rgba(59, 31, 43, 0.4);
}

.ask::backdrop,
.viewer::backdrop {
  background: rgba(59, 31, 43, 0.5);
}

.ask p {
  margin: 0 0 22px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
  text-wrap: balance;
}

.ask .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bursts {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

.bursts span {
  position: absolute;
  font-size: 1.5rem;
}

.nojs {
  margin: 0;
  padding: 16px;
  text-align: center;
}

@media (max-width: 560px) {
  section {
    padding-block: 58px;
  }

  .hero {
    min-height: 74svh;
  }

  .mascot {
    width: 190px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    padding-left: 34px;
  }

  .timeline li::before {
    left: 6px;
  }

  .timeline li::after {
    left: 0;
  }

  .timeline time {
    text-align: left;
  }

  .ours div {
    flex-wrap: wrap;
  }

  .ours .dots {
    display: none;
  }

  .ours dd {
    flex-basis: 100%;
    max-width: none;
    text-align: left;
  }

  .sheet {
    --gut: 34px;
    padding-right: 14px;
    padding-left: calc(var(--gut) + 14px);
  }

  .sheet .hand {
    font-size: 1.3rem;
  }

  .viewer[open] {
    grid-template-columns: 40px 1fr 40px;
  }

  .stamp {
    right: 12px;
    font-size: 1.25rem;
  }
}

dialog[open] {
  animation: soft 0.25s ease both;
}

@keyframes soft {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
