

@font-face {
  font-family: "Poiret One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poiret-one-400.woff2") format("woff2");
}
@font-face {
  font-family: "Didact Gothic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/didact-gothic-400.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/playfair-display-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/playfair-display-500.woff2") format("woff2");
}

:root {
  
  --cream: #FFF7F2;
  --rose: #E8627C;
  --rose-deep: #C9475F;
  --peach: #F7A072;
  --blush: #FBD3D9;
  --ink: #3B2A33;
  --ink-soft: #6E5560;
  --white: #FFFFFF;

  
  --f-display: "Poiret One", "Didact Gothic", system-ui, sans-serif;
  --f-body: "Didact Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-letter: "Playfair Display", Georgia, "Times New Roman", serif;

  
  --r-lg: 32px;
  --r-md: 22px;
  --r-sm: 16px;
  --clay:
    0 22px 44px -22px rgba(201, 71, 95, .38),
    0 8px 18px -10px rgba(59, 42, 51, .16),
    inset 0 2px 0 rgba(255, 255, 255, .95),
    inset 0 -8px 18px rgba(232, 98, 124, .09);
  --clay-sm:
    0 12px 22px -12px rgba(201, 71, 95, .40),
    0 4px 10px -6px rgba(59, 42, 51, .14),
    inset 0 2px 0 rgba(255, 255, 255, .9),
    inset 0 -5px 10px rgba(232, 98, 124, .10);
  --clay-well:
    inset 0 3px 8px rgba(201, 71, 95, .14),
    inset 0 -2px 0 rgba(255, 255, 255, .9);
  --grad-warm: linear-gradient(135deg, #EE7189 0%, #F28A7C 48%, #F7A072 100%);

  
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  
  --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
  --measure: 440px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--cream);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(247, 160, 114, .18), transparent 60%),
    radial-gradient(90% 50% at 0% 40%, rgba(251, 211, 217, .55), transparent 65%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

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

.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible {
  outline: 3px solid rgba(232, 98, 124, .55);
  outline-offset: 3px;
  border-radius: 12px;
}

body.is-locked { overflow: hidden; }
body.is-locked .book { display: none; }
body.is-unlocked .gate { display: none; }

.countdown { display: none; }
body.is-counting .countdown { display: flex; }
body.is-counting .book > section:not(#cover) { display: none; }
body.is-counting .cover__turn,
body.is-counting .cover__age { display: none; }

.glass {
  background: rgba(255, 255, 255, .9);
  border: 2px solid var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--clay);
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .06em;
  line-height: 1.2;
  white-space: nowrap;
}
.capsule--light {
  background: rgba(255, 255, 255, .92);
  border: 2px solid var(--white);
  color: var(--rose-deep);
  box-shadow: var(--clay-sm);
}
.capsule--rose {
  background: var(--blush);
  border: 2px solid var(--white);
  color: var(--rose-deep);
  box-shadow: var(--clay-sm);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border: 2px solid var(--white);
  border-radius: 999px;
  font-size: 17px;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, opacity 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  width: 100%;
  color: var(--white);
  background: var(--grad-warm);
  box-shadow:
    0 18px 30px -14px rgba(201, 71, 95, .6),
    inset 0 2px 0 rgba(255, 255, 255, .45),
    inset 0 -6px 12px rgba(160, 40, 70, .18);
  text-shadow: 0 1px 1px rgba(160, 40, 70, .25);
}
.btn--ghost {
  background: rgba(255, 255, 255, .9);
  color: var(--rose-deep);
  box-shadow: var(--clay-sm);
}
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { box-shadow: 0 22px 34px -14px rgba(201, 71, 95, .7), inset 0 2px 0 rgba(255,255,255,.45), inset 0 -6px 12px rgba(160,40,70,.18); }
  .btn--ghost:hover { color: var(--rose); }
}

.btn__spinner {
  display: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .45);
  border-top-color: var(--white);
  animation: spin 700ms linear infinite;
}

.book { padding-bottom: env(safe-area-inset-bottom); }

.section {
  padding: 72px var(--gutter);
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 32px;
}
.section-title {
  margin-top: 8px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(36px, 10vw, 44px);
  line-height: 1.05;
  letter-spacing: .01em;
  color: var(--ink);
}
.section-lede {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 16px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

.gate {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    var(--gutter)
    max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 20% 15%, rgba(247, 160, 114, .35), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(232, 98, 124, .22), transparent 50%),
    radial-gradient(rgba(232, 98, 124, .10) 1.2px, transparent 1.4px) 0 0 / 14px 14px,
    var(--cream);
}
.gate.is-leaving {
  opacity: 0;
  transform: scale(.98);
  transition: opacity 380ms var(--ease-out), transform 380ms var(--ease-out);
}

.gate__card {
  width: 100%;
  max-width: 380px;
  padding: 40px 24px 28px;
  text-align: center;
  animation: rise 700ms var(--ease-out) both;
}
.gate__seal {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-warm);
  border: 3px solid var(--white);
  color: var(--white);
  font-size: 30px;
  box-shadow:
    0 16px 26px -12px rgba(201, 71, 95, .6),
    inset 0 3px 0 rgba(255, 255, 255, .45),
    inset 0 -8px 14px rgba(160, 40, 70, .2);
  animation: beat 2.6s ease-in-out 1s infinite;
}
.gate__title {
  margin-top: 10px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.08;
}
.gate__hint {
  margin-top: 14px;
  font-size: 16px;
  color: var(--ink-soft);
}

.gate__form { margin-top: 26px; }

.date-input {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.date-input__field { display: block; }
.date-input__box {
  width: 68px;
  height: 62px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 20px;
  background: #FFF3F0;
  box-shadow: var(--clay-well);
  font-family: var(--f-body);
  font-size: 24px;          
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  text-align: center;
  color: var(--ink);
  caret-color: var(--rose);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.date-input__field--year .date-input__box { width: 100px; }
.date-input__box::placeholder { color: rgba(110, 85, 96, .38); letter-spacing: .08em; font-size: 18px; }
.date-input__box:focus {
  outline: none;
  border-color: var(--blush);
  background: var(--white);
  box-shadow: var(--clay-well), 0 0 0 4px rgba(232, 98, 124, .16);
}
.date-input__box[aria-invalid="true"] { border-color: rgba(232, 98, 124, .55); }
.date-input__sep {
  font-family: var(--f-display);
  font-size: 28px;
  color: rgba(232, 98, 124, .55);
}

.gate__error {
  min-height: 24px;
  margin: 12px 0 14px;
  font-size: 15px;
  color: var(--rose-deep);
  opacity: 0;
  transition: opacity 200ms ease;
}
.gate__error:not(:empty) { opacity: 1; }

#gate-form.is-shake .date-input { animation: shake 420ms var(--ease-out); }

#gate-form.is-busy #gate-submit { pointer-events: none; opacity: .88; }
#gate-form.is-busy .btn__spinner { display: inline-block; }

.gate__foot {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(110, 85, 96, .75);
}

.cover {
  padding:
    max(18px, env(safe-area-inset-top))
    var(--gutter)
    12px;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
}
.cover__volume {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - 40px);
  min-height: calc(100svh - 40px - env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  padding: 22px 22px 26px;
  border-radius: 36px;
  border: 3px solid var(--white);
  background: var(--grad-warm);
  color: var(--white);
  box-shadow:
    0 30px 60px -28px rgba(201, 71, 95, .65),
    inset 0 3px 0 rgba(255, 255, 255, .45),
    inset 0 -16px 30px rgba(160, 40, 70, .18);
  animation: rise 900ms var(--ease-out) both;
}

.cover__lines {
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 255, 255, .16) 0deg 1.4deg,
    transparent 1.4deg 7deg
  );
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 18%, #000 52%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 18%, #000 52%);
}

.cover__tone {
  position: absolute;
  right: -30px; bottom: -30px;
  width: 70%; height: 45%;
  z-index: -1;
  background: radial-gradient(rgba(255, 255, 255, .32) 1.6px, transparent 1.8px) 0 0 / 11px 11px;
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 10%, transparent 70%);
  mask-image: radial-gradient(circle at 100% 100%, #000 10%, transparent 70%);
}

.cover__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cover__series {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: .04em;
  text-align: right;
  color: #fff;
  -webkit-text-stroke: .35px rgba(255, 255, 255, .9);
  text-shadow: 0 1px 3px rgba(120, 25, 55, .45), 0 0 12px rgba(120, 25, 55, .25);
}
.cover__series .amp { opacity: .8; }

.cover__center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 32px 0;
}
.cover__kicker {
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .92;
}
.cover__name {
  margin-top: 12px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(58px, 18vw, 84px);
  line-height: .95;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
  text-shadow:
    0 2px 0 rgba(160, 40, 70, .16),
    0 12px 30px rgba(160, 40, 70, .25);
}
.cover__age {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  border: 2px solid var(--white);
  color: var(--rose-deep);
  box-shadow: var(--clay-sm);
}
.cover__age-num {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--grad-warm);
  color: var(--white);
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 400;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -4px 8px rgba(160, 40, 70, .2);
}
.cover__age-word { font-size: 15px; letter-spacing: .04em; }

.cover__turn {
  align-self: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .95;
}
.cover__turn .icon {
  width: 22px; height: 22px;
  animation: nudge 2.2s var(--ease-in-out) 1.4s infinite;
}

.countdown {
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.countdown__note {
  font-size: 15px;
  letter-spacing: .06em;
  opacity: .95;
}
.countdown__units {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px 10px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .92);
  border: 2px solid var(--white);
  color: var(--ink);
  box-shadow: var(--clay-sm);
}
.countdown__num {
  font-family: var(--f-body);   
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--rose-deep);
}
.countdown__label {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

body.is-revealed .cover__age { animation: rise 700ms var(--ease-out) 150ms both; }
body.is-revealed .cover__turn { animation: rise 700ms var(--ease-out) 350ms both; }

.days { padding-top: 40px; }
.days__card {
  position: relative;
  padding: 36px 24px 34px;
  text-align: center;
  overflow: hidden;
}
.days__number {
  margin-top: 10px;
  font-family: var(--f-display);
  font-size: clamp(84px, 26vw, 112px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.days__label {
  margin-top: 4px;
  font-family: var(--f-display);
  font-size: 26px;
}
.days__sub {
  margin: 10px auto 0;
  max-width: 26ch;
  font-size: 15px;
  color: var(--ink-soft);
}
.days__heart {
  position: absolute;
  right: -18px; top: -18px;
  width: 110px; height: 110px;
  color: var(--blush);
  opacity: .55;
  transform: rotate(14deg);
  z-index: 0;
}
.days__card > *:not(.days__heart) { position: relative; z-index: 1; }

.chapters {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.chapter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chapter__date {
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: .03em;
  text-align: right;
}
.chapter__title {
  margin: 14px 2px 16px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.12;
}

.chapter__panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 150px;
  grid-auto-flow: dense;
  gap: 10px;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 3px solid var(--white);
  background:
    radial-gradient(rgba(232, 98, 124, .16) 1.3px, transparent 1.5px) 0 0 / 10px 10px,
    var(--blush);
  box-shadow: var(--clay-sm);
}
.panel--wide { grid-column: span 2; }
.panel--tall { grid-row: span 2; }
.panel:only-child { grid-column: span 2; grid-row: span 2; }

.panel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 450ms var(--ease-out), transform 900ms var(--ease-out);
}
.panel.is-loading .panel__img { opacity: 0; transform: scale(1.03); }
.panel.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%) 0 0 / 250% 100%;
  animation: shimmer 1.4s linear infinite;
}

.chapter:nth-child(even) .chapter__panels { direction: rtl; }
.chapter:nth-child(even) .chapter__panels > * { direction: ltr; }

.bubble {
  position: relative;
  z-index: 1;
  margin: -24px 18px 0 14px;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  border: 2px solid var(--white);
  box-shadow: var(--clay);
  font-size: 16px;
  line-height: 1.55;
}
.bubble::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 30px;
  width: 22px; height: 22px;
  background: inherit;
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-radius: 6px 0 0 0;
  transform: rotate(45deg) skew(8deg, 8deg);
}
.chapter:nth-child(even) .bubble { margin: -24px 14px 0 18px; }
.chapter:nth-child(even) .bubble::before { left: auto; right: 30px; }

.chapter__panels:has(> .panel--video:last-child) + .chapter__caption,
.chapter--favourite .chapter__panels:has(> .panel--video:last-child) + .chapter__caption {
  margin-top: 16px;
}

.panel__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  transition: opacity 450ms var(--ease-out);
}
.panel.is-loading .panel__video { opacity: 0; }

.panel__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;              
  padding: 0 18px 0 14px;
  border: 2px solid var(--white);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: var(--rose-deep);
  font-family: var(--f-body);
  font-size: 14px;
  letter-spacing: .06em;
  white-space: nowrap;
  box-shadow: var(--clay-sm);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transform: translate(-50%, -50%);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), scale 160ms var(--ease-out);
}
.panel__play::before {           
  content: "";
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9.5 7.6v8.8c0 .8.9 1.3 1.6.8l6.6-4.4c.6-.4.6-1.2 0-1.6l-6.6-4.4c-.7-.5-1.6 0-1.6.8z'/%3E%3C/svg%3E") center / 18px no-repeat,
    var(--grad-warm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.panel__play:active { scale: .97; }
.panel--video.is-playing .panel__play,
.panel__video.is-playing ~ .panel__play {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.96);
  pointer-events: none;
}
.panel.is-loading .panel__play { opacity: 0; pointer-events: none; }

.panel--video.is-playing { z-index: 2; }

.panel--video.is-waiting .panel__play { animation: soft-pulse 1.2s ease-in-out infinite; }

.chapter--favourite .chapter__title {
  font-size: 34px;
  color: var(--rose-deep);
}
.chapter--favourite .chapter__panels > .panel:first-child {
  grid-column: 1 / -1;
  grid-row: span 3;              
  margin-inline: calc(-1 * var(--gutter));
  border-radius: 0;
  border-width: 3px 0;
  box-shadow:
    0 30px 50px -30px rgba(201, 71, 95, .55),
    0 10px 20px -14px rgba(59, 42, 51, .18);
}
@media (min-width: 480px) {      
  .chapter--favourite .chapter__panels > .panel:first-child {
    margin-inline: 0;
    border-radius: var(--r-lg);
    border-width: 3px;
  }
}
.chapter--favourite .chapter__panels > .panel:first-child:not(.is-loading) .panel__img {
  animation: drift 16s ease-in-out infinite alternate;
}
.chapter--favourite .chapter__panels > .panel:first-child::before {
  content: "his favourite";
  position: absolute;
  top: 16px;
  left: max(16px, env(safe-area-inset-left));
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  border: 2px solid var(--white);
  border-radius: 999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23E8627C' d='M12 20.6c-.3 0-.6-.1-.8-.3C6.4 16.4 3 13.3 3 9.4 3 6.6 5.2 4.5 7.9 4.5c1.6 0 3.1.8 4.1 2 1-1.2 2.5-2 4.1-2 2.7 0 4.9 2.1 4.9 4.9 0 3.9-3.4 7-8.2 10.9-.2.2-.5.3-.8.3z'/%3E%3C/svg%3E") 10px 50% / 14px no-repeat,
    rgba(255, 255, 255, .92);
  padding-left: 30px;
  color: var(--rose-deep);
  font-family: var(--f-body);
  font-size: 13px;
  letter-spacing: .08em;
  line-height: 1.2;
  box-shadow: var(--clay-sm);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.chapter--favourite .chapter__panels > .panel:first-child::after {
  
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(232, 98, 124, .12), transparent 30%, transparent 70%, rgba(247, 160, 114, .22));
}
.chapter--favourite .chapter__panels > .panel.is-loading:first-child::after {
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%) 0 0 / 250% 100%;
  animation: shimmer 1.4s linear infinite;
}
.chapter--favourite .bubble {
  margin-top: -34px;
  font-size: 17px;
}

.reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reason-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 900px;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out),
    scale 160ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms), calc(var(--i, 0) * 70ms), 0ms;
}
.reason-card:active { scale: .97; }
.reason-card:focus-visible { outline-offset: 4px; border-radius: var(--r-md); }

.reason-card:last-child:nth-child(odd) {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.reason-card__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 560ms var(--ease-in-out);
}
.reason-card.is-flipped .reason-card__inner { transform: rotateY(180deg); }

.reason-card__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: var(--r-md);
  border: 2px solid var(--white);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.reason-card__front {
  background: var(--grad-warm);
  color: var(--white);
  box-shadow:
    0 16px 26px -16px rgba(201, 71, 95, .6),
    inset 0 2px 0 rgba(255, 255, 255, .45),
    inset 0 -8px 14px rgba(160, 40, 70, .16);
}

.reason-card:nth-child(3n+2) .reason-card__front {
  background: linear-gradient(140deg, #F7A072, #F9B98F);
}
.reason-card:nth-child(3n) .reason-card__front {
  background: linear-gradient(140deg, #FBD3D9, #F8BCC6);
  color: var(--rose-deep);
}
.reason-card__num {
  font-family: var(--f-display);
  font-size: 46px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.reason-card__heart {
  margin-top: 10px;
  width: 18px; height: 18px;
  opacity: .85;
}
.reason-card__back {
  transform: rotateY(180deg);
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  box-shadow: var(--clay-sm);
}
.reason-card__text {
  font-size: 15px;
  line-height: 1.45;
}
.reason-card:last-child:nth-child(odd) .reason-card__text { font-size: 17px; max-width: 28ch; }

.map-card { padding: 18px 14px 22px; }
.map-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 400 / 448;
  container-type: inline-size;   
}
.map-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.map-land path {
  fill: url(#landFill);
  stroke: var(--white);
  stroke-width: 3;
  stroke-linejoin: round;
}
.map-land {
  filter: drop-shadow(0 10px 14px rgba(201, 71, 95, .22)) drop-shadow(0 2px 3px rgba(59, 42, 51, .08));
}
.map-label {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: .08em;
  fill: rgba(201, 71, 95, .55);
}
.map-compass circle { fill: rgba(255, 255, 255, .9); stroke: var(--blush); stroke-width: 2; }
.map-compass path { fill: var(--rose); }
.map-compass text { font-family: var(--f-body); font-size: 10px; fill: var(--rose-deep); }

.map-pins {
  position: absolute;
  inset: 0;
}

.map-pin {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  z-index: 1;
  width: 44px;               
  height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}
.map-pin.is-active { z-index: 3; }

.map-pin__dot {
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--grad-warm);
  border: 3px solid var(--white);
  box-shadow: 0 6px 10px -4px rgba(201, 71, 95, .7);
  transition: transform 200ms var(--ease-out);
}
.map-pin__dot::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 2px solid rgba(232, 98, 124, .45);
  animation: ping 2.4s var(--ease-out) infinite;
}
.map-pin:active .map-pin__dot { transform: scale(.9); }
.map-pin.is-active .map-pin__dot { transform: scale(1.25); }

.map-pin__note {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  display: block;
  width: min(200px, 56vw);       
  width: min(200px, 70cqw);      
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  border: 2px solid var(--white);
  box-shadow: var(--clay);
  text-align: left;
  transform-origin: var(--x) 100%;
  transform: translateX(calc(var(--x) * -1)) translateY(6px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out);
}
.map-pin.is-active .map-pin__note {
  opacity: 1;
  transform: translateX(calc(var(--x) * -1)) translateY(0) scale(1);
  pointer-events: auto;
}
.map-pin__name {
  display: block;
  font-family: var(--f-display);
  font-size: 20px;
  line-height: 1.15;
  color: var(--rose-deep);
}
.map-pin__text {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}

.letter {
  position: relative;
  padding: 44px 24px 30px;
  border-radius: var(--r-lg);
  border: 2px solid var(--white);
  background: #FFFCFA;
  box-shadow: var(--clay);
}
.letter__tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 96px; height: 26px;
  margin-left: -48px;
  border-radius: 8px;
  background: rgba(247, 160, 114, .55);
  border: 2px solid rgba(255, 255, 255, .7);
  transform: rotate(-3deg);
  box-shadow: 0 4px 10px -4px rgba(201, 71, 95, .3);
}
.letter .eyebrow { text-align: center; }
.letter__title {
  margin: 14px 0 18px;
  font-family: var(--f-letter);
  font-style: italic;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  color: var(--rose-deep);
}
.letter__body {
  font-family: var(--f-letter);
  font-style: italic;
  font-size: 18px;
  line-height: 32px;
  color: var(--ink);
  
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 27px,
    rgba(232, 98, 124, .14) 27px 28px,
    transparent 28px 32px
  );
}
.letter__body p + p { margin-top: 32px; }
.letter__body p:first-child::first-letter {
  float: left;
  margin: 6px 10px 0 0;
  font-family: var(--f-letter);
  font-style: normal;
  font-weight: 500;
  font-size: 60px;
  line-height: 52px;
  color: var(--rose);
}
.letter__sign {
  margin-top: 36px;
  text-align: right;
  font-family: var(--f-letter);
  font-style: italic;
}
.letter__sign-pre { display: block; font-size: 16px; color: var(--ink-soft); }
.letter__sign-name {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  color: var(--rose-deep);
}
.letter__folio {
  margin-top: 28px;
  text-align: center;
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: .2em;
  color: rgba(110, 85, 96, .6);
}

.end {
  position: relative;
  padding-top: 88px;
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
  text-align: center;
}
.end__sky {
  position: absolute;
  inset: 20px var(--gutter);
  pointer-events: none;
}
.sparkle {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  width: var(--ss);
  height: var(--ss);
  fill: var(--peach);
  opacity: 0;
  animation: twinkle 3.2s ease-in-out var(--sd) infinite;
}
.sparkle:nth-child(even) { fill: var(--rose); }

.sparkle:nth-child(1) { --sx: 12%; --sy: 18%; --ss: 18px; --sd: 0s; }
.sparkle:nth-child(2) { --sx: 82%; --sy: 10%; --ss: 26px; --sd: .7s; }
.sparkle:nth-child(3) { --sx: 70%; --sy: 58%; --ss: 14px; --sd: 1.3s; }
.sparkle:nth-child(4) { --sx: 20%; --sy: 72%; --ss: 22px; --sd: 1.9s; }
.sparkle:nth-child(5) { --sx: 48%; --sy: 6%;  --ss: 12px; --sd: 2.4s; }
.sparkle:nth-child(6) { --sx: 90%; --sy: 82%; --ss: 16px; --sd: .4s; }

.end__inner { position: relative; }
.end__title {
  margin-top: 12px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 12vw, 52px);
  line-height: 1.05;
}
.end__dots { color: var(--rose); }
.end__future {
  margin: 18px auto 26px;
  max-width: 30ch;
  font-size: 17px;
  color: var(--ink-soft);
}
.end__again { display: flex; width: fit-content; margin: 22px auto 0; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
@keyframes beat {
  0%, 60%, 100% { transform: scale(1); }
  12% { transform: scale(1.06); }
  24% { transform: scale(1); }
  36% { transform: scale(1.04); }
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
@keyframes ping {
  0% { transform: scale(.6); opacity: .9; }
  80%, 100% { transform: scale(1.4); opacity: 0; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.6) rotate(0deg); }
  45% { opacity: .95; transform: scale(1) rotate(20deg); }
}
@keyframes shimmer {
  from { background-position: 150% 0; }
  to   { background-position: -100% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes soft-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@keyframes drift {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

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

  .gate__card,
  .cover__volume,
  body.is-revealed .cover__age,
  body.is-revealed .cover__turn { animation: fade 300ms ease both; }
  .gate__seal,
  .cover__turn .icon,
  .map-pin__dot::after { animation: none; }
  .map-pin__dot::after { opacity: 0; }

  .reveal { transform: none; transition: opacity 300ms ease; }

  #gate-form.is-shake .date-input { animation: none; }
  #gate-form.is-shake .date-input__box { border-color: rgba(232, 98, 124, .7); }

  
  .reason-card__inner,
  .reason-card.is-flipped .reason-card__inner { transform: none; transition: none; }
  .reason-card__face { transition: opacity 220ms ease; }
  .reason-card__back { transform: none; opacity: 0; }
  .reason-card.is-flipped .reason-card__front { opacity: 0; }
  .reason-card.is-flipped .reason-card__back { opacity: 1; }

  .map-pin__note,
  .map-pin.is-active .map-pin__note { transform: translateX(calc(var(--x) * -1)); }

  .panel__img { transition: opacity 300ms ease; }
  .panel.is-loading .panel__img { transform: none; }
  .panel.is-loading::after { animation: none; }
  .chapter--favourite .chapter__panels > .panel:first-child:not(.is-loading) .panel__img { animation: none; }
  .chapter--favourite .chapter__panels > .panel.is-loading:first-child::after { animation: none; }
  .panel__play { transition: opacity 200ms ease; }

  .sparkle { animation: none; opacity: .6; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 350px) {
  .date-input__box { width: 58px; height: 56px; font-size: 22px; }
  .date-input__field--year .date-input__box { width: 88px; }
  .reason-card__text { font-size: 14px; }
}
