/* ==========================================================
   Happy Birthday, Chan
   Ivory, blush and champagne gold. Phone first.
   ========================================================== */

:root {
  /* Base: mostly ivory and pearl */
  --ivory: #fffcf8;
  --pearl: #fbf7f4;
  --paper: #fffaf3;

  /* Tints, used lightly */
  --blush: #fbe9ec;
  --pink: #f3cdd5;
  --peach: #fbdccb;
  --lavender: #ebe3f6;
  --lilac: #d6c8ee;

  /* Dusty rose: --rose for decoration, --rose-display for large type,
     --rose-deep for small text (all pass contrast on ivory) */
  --rose: #c98e9c;
  --rose-display: #a8677a;
  --rose-deep: #9c5a6c;

  /* Champagne gold, used sparingly */
  --gold: #c9a46a;
  --gold-soft: #e2c99b;
  --gold-light: #f4e6c8;

  --sea: #d3ebf0;
  --sea-mid: #bcdfe8;
  --sea-deep: #a3d2de;
  --sand: #f8e7d4;

  --ink: #5b4358;
  --ink-soft: #76627a;

  --shadow-soft: 0 12px 32px -14px rgba(122, 82, 104, 0.2), 0 2px 8px -4px rgba(122, 82, 104, 0.06);
  --shadow-lift: 0 26px 60px -22px rgba(122, 82, 104, 0.26), 0 8px 20px -12px rgba(122, 82, 104, 0.1);
  --radius: 24px;

  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-hand: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-type: "Courier New", Courier, monospace;
}

/* ---------- Base ---------- */

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: linear-gradient(
    180deg,
    var(--ivory) 0%,
    #fdf6f4 26%,
    #faf6fb 52%,
    #fff8f2 78%,
    var(--ivory) 100%
  );
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Text kept for screen readers while the animated copy is hidden from them */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.split__word,
.split__char {
  display: inline-block;
}

/* ---------- Page shell ---------- */

.page {
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  overflow-x: clip;
}

/* While the envelope is closed, the page waits quietly behind it */
.js:not(.is-open) .page {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  opacity: 0;
}

.js.is-open .page {
  opacity: 1;
  transition: opacity 1.4s var(--ease-soft);
}

.section {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(64px, 13vw, 116px) 22px;
  text-align: center;
}

/* Looping effects rest while their section is off screen */
.is-offscreen *,
.is-offscreen *::before,
.is-offscreen *::after {
  animation-play-state: paused !important;
}

/* A thin gold divider with a small heart between sections */
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(220px, 60%);
  height: 14px;
  margin-top: -7px;
  transform: translateX(-50%);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23cfae74' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E")
      center / 11px 11px no-repeat,
    linear-gradient(90deg, rgba(201, 164, 106, 0), rgba(201, 164, 106, 0.6)) left center / calc(50% - 15px) 1px no-repeat,
    linear-gradient(90deg, rgba(201, 164, 106, 0.6), rgba(201, 164, 106, 0)) right center / calc(50% - 15px) 1px no-repeat;
}

.section__eyebrow {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--rose-deep);
}

.section__title {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 8vw, 3.1rem);
  line-height: 1.12;
  color: var(--ink);
}

.section__lead {
  max-width: 30em;
  margin: 14px auto 0;
  color: var(--ink-soft);
}

/* Keep short centred lines from leaving a single word on its own */
.section__title,
.section__lead,
.hero__line,
.wish__line {
  text-wrap: balance;
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.2s var(--ease-soft), transform 1.2s var(--ease-soft);
  transition-delay: calc(var(--i, 0) * 130ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Section titles arrive word by word */
.js .section__title.is-split {
  opacity: 1;
  transform: none;
}

.section__title.is-split .split__word {
  opacity: 0;
}

.section__title.is-split.is-visible .split__word {
  opacity: 1;
  animation: word-rise 1.1s var(--ease-out) both;
  animation-delay: calc(0.1s + var(--n, 0) * 0.13s);
}

/* ---------- Photo slots and placeholders ---------- */

.photo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #f6dbe1, var(--lavender));
}

.photo__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: rgba(91, 67, 88, 0.76);
}

.photo__placeholder::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.85);
  border-radius: inherit;
}

.photo__placeholder svg {
  width: 26px;
  height: 26px;
  fill: rgba(255, 255, 255, 0.92);
}

.photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo.has-image .photo__placeholder {
  display: none;
}

/* ==========================================================
   Background: drifting glows, petals, sparkles, taps
   ========================================================== */

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

.glow {
  position: absolute;
  width: 78vmax;
  height: 78vmax;
  border-radius: 50%;
  background: radial-gradient(circle, var(--c) 0%, var(--c0) 68%);
  translate: 0 calc(var(--p, 0) * var(--shift, 0vh));
  animation: glow-drift-a var(--dur, 32s) ease-in-out infinite alternate;
  will-change: transform, translate;
}

.glow--1 {
  --c: rgba(246, 204, 214, 0.6);
  --c0: rgba(246, 204, 214, 0);
  --shift: -30vh;
  --dur: 34s;
  top: -26vmax;
  left: -30vmax;
}

.glow--2 {
  --c: rgba(221, 207, 245, 0.55);
  --c0: rgba(221, 207, 245, 0);
  --shift: -60vh;
  --dur: 40s;
  top: 18vh;
  right: -36vmax;
  animation-name: glow-drift-b;
}

.glow--3 {
  --c: rgba(255, 219, 199, 0.5);
  --c0: rgba(255, 219, 199, 0);
  --shift: -95vh;
  --dur: 30s;
  top: 72vh;
  left: -28vmax;
}

.glow--4 {
  --c: rgba(244, 226, 192, 0.5);
  --c0: rgba(244, 226, 192, 0);
  --shift: -125vh;
  --dur: 38s;
  top: 125vh;
  right: -26vmax;
  animation-name: glow-drift-b;
}

.petals,
.burst,
.confetti,
.taps {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.petals {
  z-index: 0;
}

.burst {
  z-index: 110;
}

.confetti {
  z-index: 120;
}

.taps {
  z-index: 130;
}

.petal {
  position: absolute;
  top: 0;
  width: var(--size, 14px);
  height: var(--size, 14px);
  border-radius: 80% 0 80% 0;
  background: var(--tint, var(--pink));
  color: var(--tint, var(--pink));
  opacity: 0;
  animation: petal-fall var(--dur, 14s) linear var(--delay, 0s) infinite;
  will-change: transform;
}

.petal--heart {
  border-radius: 0;
  background: none;
}

.petal--heart svg,
.sparkle svg,
.tap-heart svg,
.tap-spark svg,
.confetti__heart svg,
.lantern svg,
.reels__float svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.burst .petal {
  animation-iteration-count: 1;
}

.sparkle {
  position: absolute;
  width: var(--size, 10px);
  height: var(--size, 10px);
  color: var(--gold);
  opacity: 0;
  animation: twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite;
}

.tap-heart {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  color: var(--tint, var(--rose));
  animation: tap-heart 0.95s var(--ease-out) forwards;
}

.tap-spark {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  color: var(--gold);
  animation: tap-spark 0.75s var(--ease-out) forwards;
}

.confetti__piece {
  position: absolute;
  top: 0;
  width: var(--w, 8px);
  height: var(--h, 14px);
  border-radius: 2px;
  background: var(--tint, var(--rose));
  color: var(--tint, var(--rose));
  opacity: 0;
  animation: confetti-fall var(--dur, 3s) cubic-bezier(0.25, 0.6, 0.5, 1) var(--delay, 0s) 1 forwards;
  will-change: transform;
}

.confetti__heart {
  height: var(--w, 12px);
  border-radius: 0;
  background: none;
}

/* ==========================================================
   1. The envelope
   ========================================================== */

.intro {
  display: none;
}

.js .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 18% 16%, rgba(246, 204, 214, 0.45), rgba(246, 204, 214, 0) 44%),
    radial-gradient(circle at 86% 84%, rgba(221, 207, 245, 0.5), rgba(221, 207, 245, 0) 46%),
    radial-gradient(circle at 50% 42%, #fffdf9 0%, #fdf5f2 55%, #f6f0f8 100%);
  transition: opacity 1.1s var(--ease-soft), visibility 0s linear 1.1s;
}

.intro.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.intro__eyebrow {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--rose-deep);
  transition: opacity 0.5s var(--ease-soft);
}

.intro__hint {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  animation: pulse 2.6s ease-in-out infinite;
  transition: opacity 0.5s var(--ease-soft);
}

.intro.is-opening .intro__eyebrow,
.intro.is-opening .intro__hint {
  opacity: 0;
  animation: none;
}

.envelope {
  position: relative;
  display: block;
  width: min(80vw, 340px);
  aspect-ratio: 3 / 2;
  margin-top: 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 1000px;
  animation: float 4s ease-in-out infinite;
}

.envelope.is-open {
  animation: none;
  cursor: default;
  outline: none;
}

.envelope > span {
  position: absolute;
  display: block;
}

.envelope__back {
  inset: 0;
  z-index: 1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f0d8dd, #eed2d8);
  box-shadow: var(--shadow-lift);
}

.envelope__letter {
  z-index: 2;
  top: 8%;
  right: 6%;
  bottom: 8%;
  left: 6%;
  display: grid !important;
  place-items: start center;
  padding-top: 9%;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 4px 14px rgba(91, 67, 88, 0.1), inset 0 0 0 1px rgba(201, 164, 106, 0.22);
  font-family: var(--font-hand);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--rose-deep);
  transition: transform 1.1s var(--ease-out) 0.7s;
}

.envelope__front {
  inset: 0;
  z-index: 3;
  border-radius: 12px;
  background: linear-gradient(180deg, #fdf5f5 0%, #f7e5e9 100%);
  clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
}

.envelope__flap {
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 50%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #f1d6dc 0%, #f6e3e7 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  transition: transform 0.8s var(--ease-soft) 0.25s, z-index 0s linear 0.65s;
}

/* The wax seal: two halves that break apart */
.envelope__seal {
  z-index: 5;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  animation: seal-pulse 2.6s ease-in-out infinite;
}

.envelope__seal::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1.5px solid rgba(201, 164, 106, 0.6);
  border-radius: 50%;
  opacity: 0;
  animation: seal-ring 2.6s var(--ease-soft) infinite;
}

.envelope__half {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #f9edd2 0%, #e2c792 46%, #c49d5f 100%);
  box-shadow: 0 3px 10px rgba(140, 100, 50, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.75s var(--ease-out), opacity 0.6s var(--ease-soft) 0.12s;
}

.envelope__half--left {
  clip-path: inset(0 50% 0 0);
}

.envelope__half--right {
  clip-path: inset(0 0 0 50%);
}

.envelope__half svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 252, 246, 0.95);
}

.envelope__label {
  z-index: 5;
  top: 65%;
  right: 0;
  left: 0;
  color: var(--ink);
  line-height: 1.15;
}

.envelope__to {
  display: block;
  font-family: var(--font-hand);
  font-size: 1.7rem;
  font-weight: 700;
}

.envelope__date {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

/* A warm bloom of light that spreads out to reveal the page */
.envelope__bloom {
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fffdf9 0%,
    #fff8ee 38%,
    rgba(255, 241, 224, 0.85) 56%,
    rgba(255, 236, 214, 0) 71%
  );
  opacity: 0;
  pointer-events: none;
}

.envelope.is-open .envelope__seal,
.envelope.is-open .envelope__seal::before {
  animation: none;
}

.envelope.is-open .envelope__half--left {
  opacity: 0;
  transform: translate(-16px, 14px) rotate(-28deg);
}

.envelope.is-open .envelope__half--right {
  opacity: 0;
  transform: translate(16px, 14px) rotate(28deg);
}

.envelope.is-open .envelope__flap {
  z-index: 1;
  transform: rotateX(180deg);
}

.envelope.is-open .envelope__letter {
  transform: translateY(-62%);
}

.envelope.is-open .envelope__bloom {
  animation: bloom 1.7s var(--ease-soft) 1.25s both;
}

/* ==========================================================
   2. Hero
   ========================================================== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 56px;
  padding-bottom: 40px;
}

.hero__date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.hero__title {
  margin-top: 10px;
  outline: none;
}

.js .hero__title.is-split {
  opacity: 1;
  transform: none;
}

.hero__happy {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.3rem, 10vw, 4.2rem);
  line-height: 1.05;
  color: var(--ink);
}

.hero__name {
  display: block;
  width: fit-content;
  margin: -0.1em auto;
  padding: 0.1em 0.16em;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(4.4rem, 22vw, 8rem);
  line-height: 0.95;
  color: var(--rose-display);
  /* Same spacing whether the name is split into letters or not */
  font-kerning: none;
  font-variant-ligatures: none;
  font-feature-settings: "kern" 0, "liga" 0, "calt" 0;
}

.js.is-open .hero__happy .split__word {
  animation: word-rise 1.1s var(--ease-out) both;
  animation-delay: calc(0.35s + var(--n, 0) * 0.24s);
}

.js.is-open .hero__name .split__char {
  animation: letter-in 0.95s var(--ease-out) both;
  animation-delay: calc(0.95s + var(--n, 0) * 0.13s);
}

.hero__portrait {
  position: relative;
  isolation: isolate;
  width: min(62vw, 250px);
  margin-top: 30px;
  padding: 8px;
  border-radius: 999px 999px 30px 30px;
  background: linear-gradient(160deg, #fff, #fbf1f2);
  box-shadow: var(--shadow-lift);
}

/* A softly glowing ring that breathes */
.hero__portrait::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border: 1px solid rgba(201, 164, 106, 0.45);
  border-radius: 999px 999px 40px 40px;
  box-shadow: 0 0 28px 4px rgba(240, 210, 170, 0.45), 0 0 60px 12px rgba(243, 198, 210, 0.35);
  animation: breathe 5.5s ease-in-out infinite;
}

.hero__portrait .photo {
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 24px 24px;
}

.hero__portrait .photo__placeholder {
  padding-top: 30%;
}

.hero__portrait .photo__placeholder::before {
  border-radius: 999px 999px 16px 16px;
}

.hero__line {
  max-width: 15em;
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.3rem, 5.2vw, 1.7rem);
  line-height: 1.35;
  color: var(--ink);
}

.hero__cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: 26px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

.hero__cue svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--rose);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: nudge 2.2s ease-in-out infinite;
}

/* The rose-gold shimmer on her name (hero and finale) */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .shimmer {
    --shimmer-base: var(--rose-display);
    background-image: linear-gradient(
      105deg,
      var(--shimmer-base) 0%,
      var(--shimmer-base) 38%,
      #e9c79a 45%,
      #fff6e4 50%,
      #e9c79a 55%,
      var(--shimmer-base) 62%,
      var(--shimmer-base) 100%
    );
    background-size: 300% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: shimmer 7s var(--ease-soft) 0.2s infinite;
  }
}

/* ==========================================================
   3. Those eyes, that smile
   ========================================================== */

.duo {
  display: grid;
  gap: 52px;
  margin-top: 44px;
}

.duo__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.polaroid {
  --rot: -3deg;
  width: min(70vw, 270px);
  padding: 12px 12px 10px;
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow-lift);
  transform: rotate(calc(var(--rot) + var(--tilt, 0deg)));
}

.polaroid--right {
  --rot: 3deg;
}

.polaroid__photo {
  aspect-ratio: 1 / 1;
  border-radius: 3px;
}

.polaroid--right .polaroid__photo {
  background: linear-gradient(140deg, var(--peach), #f6dbe1);
}

/* Developing: washed-out white, then a warm haze, then full colour */
.polaroid__photo::before,
.polaroid__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.polaroid__photo::before {
  z-index: 1;
  background: linear-gradient(160deg, #f6e4c8, #efd9c6);
}

.polaroid__photo::after {
  z-index: 2;
  background: linear-gradient(160deg, #fffdf9, #f8f2ec);
}

.duo__item.is-visible .polaroid__photo::before {
  animation: develop-haze 3.4s ease-out 0.3s both;
}

.duo__item.is-visible .polaroid__photo::after {
  animation: develop-white 2.2s ease-out 0.3s both;
}

.polaroid__caption {
  padding-top: 6px;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--ink);
}

.duo__text {
  max-width: 24em;
}

.duo__text h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--rose-display);
}

.duo__text p {
  margin-top: 8px;
}

/* ==========================================================
   4. Little things I adore
   ========================================================== */

/* A picture board: big photo tiles for the things she loves,
   small note tiles for the things about her. */
.adore {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

/* ---- Photo tiles ---- */
.tile--photo {
  display: flex;
  align-items: flex-end;
  min-height: 300px;
  background: #2b2229;
  color: #fff;
}

.tile--cars,
.tile--spidey {
  min-height: 250px;
}

.tile__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transition: transform 1.8s var(--ease-out);
}

.tile.is-visible .tile__img {
  transform: scale(1);
}

.tile--photo:hover .tile__img {
  transform: scale(1.05);
  transition-duration: 0.9s;
}

.tile--music .tile__img { object-position: 50% 40%; }
.tile--spidey .tile__img { object-position: 50% 30%; }
.tile--dream .tile__img { object-position: 50% 28%; }
.tile--self .tile__img { object-position: 0% 0%; }

.tile--self {
  min-height: 430px;
}

/* A dark wash at the bottom keeps the words readable on any picture */
.tile--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(33, 20, 30, 0) 30%, rgba(33, 20, 30, 0.55) 62%, rgba(33, 20, 30, 0.88) 100%);
}

/* The Spider-Man collage is busy and bright, so it gets a deeper wash */
.tile--spidey::before {
  background: linear-gradient(180deg, rgba(33, 20, 30, 0) 18%, rgba(33, 20, 30, 0.6) 52%, rgba(33, 20, 30, 0.94) 100%);
}

.tile__body {
  padding: 18px 20px 20px;
}

.tile__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tile__chip svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Little equaliser bars on the music chip */
.tile__eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.tile__eq i {
  width: 2.5px;
  height: 40%;
  border-radius: 2px;
  background: currentColor;
  animation: eq 1.1s ease-in-out infinite;
}

.tile__eq i:nth-child(2) { animation-delay: -0.35s; }
.tile__eq i:nth-child(3) { animation-delay: -0.7s; }
.tile__eq i:nth-child(4) { animation-delay: -0.2s; }

.tile--photo .tile__title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.tile--photo .tile__text {
  max-width: 30em;
  margin-top: 6px;
  font-size: 0.93rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

/* The cassette lies on top of the music collage */
.tile__cassette {
  position: absolute;
  top: 16px;
  right: -14px;
  z-index: 0;
  width: min(54%, 230px);
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
  transform: rotate(9deg);
  animation: cassette-float 5s ease-in-out infinite;
}

/* ---- Note tiles ---- */
.tile--note {
  padding: 22px 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, var(--tint, rgba(255, 255, 255, 0.4)) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), var(--shadow-soft);
}

.tile--saree { --tint: rgba(251, 225, 231, 0.7); }
.tile--heart { --tint: rgba(250, 218, 228, 0.7); }
.tile--vibe { --tint: rgba(255, 231, 214, 0.75); }
.tile--cats { --tint: rgba(236, 228, 248, 0.8); }

/* A sheen that sweeps across once when the note appears */
.tile--note::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0) 70%);
  transform: translateX(110%);
  pointer-events: none;
}

.tile--note.is-visible::after {
  animation: sheen 1.5s var(--ease-soft) both;
  animation-delay: calc(0.55s + var(--i, 0) * 110ms);
}

.tile__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(201, 164, 106, 0.32);
  color: var(--rose-deep);
}

.tile__icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Each icon has a little loop of its own */
.tile__icon--saree svg {
  transform-origin: 50% 12%;
  animation: sway 3.6s ease-in-out infinite;
}

.tile__icon--heart svg {
  animation: heartbeat 1.9s ease-in-out infinite;
}

.tile__icon--smile svg {
  animation: bob-tilt 3.4s ease-in-out infinite;
}

.tile__icon--paw svg {
  fill: currentColor;
  stroke: none;
  animation: rock 3.2s ease-in-out infinite;
}

.tile--note .tile__title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.tile--note .tile__text {
  margin-top: 6px;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* The cats note gets one of her cat stickers peeking in */
.tile--cats {
  padding-right: 112px;
}

.tile__sticker {
  position: absolute;
  right: 6px;
  bottom: -8px;
  width: 98px;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(91, 67, 88, 0.25));
  transform: rotate(8deg);
}

/* ==========================================================
   5. Chan's reels
   ========================================================== */

.reels {
  margin-top: 34px;
}

.reels__frame {
  position: relative;
  height: min(66vh, 600px);
  height: min(66svh, 600px);
  aspect-ratio: 9 / 16;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: 34px;
  background: var(--blush);
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(201, 164, 106, 0.22);
}

.reels__track {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  outline-offset: -6px;
}

.reels__track::-webkit-scrollbar {
  display: none;
}

.reel {
  position: relative;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.reel__photo {
  position: absolute;
  inset: 0;
}

/* The photo on screen zooms in very slowly */
.reel.is-active .reel__photo {
  animation: slow-zoom 12s ease-out both;
}

.reel__photo .photo__placeholder::before {
  display: none;
}

.reel:nth-child(6n + 2) .reel__photo { background: linear-gradient(160deg, var(--peach), #f6dbe1); }
.reel:nth-child(6n + 3) .reel__photo { background: linear-gradient(160deg, var(--lavender), var(--lilac)); }
.reel:nth-child(6n + 4) .reel__photo { background: linear-gradient(160deg, var(--blush), var(--peach)); }
.reel:nth-child(6n + 5) .reel__photo { background: linear-gradient(160deg, var(--sea), var(--lavender)); }
.reel:nth-child(6n + 6) .reel__photo { background: linear-gradient(160deg, #f6dbe1, var(--gold-light)); }

.reel__meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 70px 70px 20px 16px;
  text-align: left;
  color: #fff;
  background: linear-gradient(180deg, rgba(80, 58, 78, 0) 0%, rgba(80, 58, 78, 0.7) 100%);
  pointer-events: none;
}

.reel__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.reel__avatar {
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--gold-soft));
}

.reel__caption {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.reels__label {
  position: absolute;
  top: 30px;
  left: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(91, 67, 88, 0.45);
  pointer-events: none;
}

/* Story-style progress bars */
.reels__bars {
  position: absolute;
  top: 6px;
  right: 10px;
  left: 10px;
  display: flex;
  gap: 4px;
}

.reels__bar {
  position: relative;
  flex: 1;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.reels__bar::before,
.reels__bar::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}

.reels__bar::before {
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 4px rgba(91, 67, 88, 0.22);
}

.reels__bar::after {
  background: #fff;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.7s var(--ease-soft);
}

.reels__bar.is-done::after,
.reels__bar.is-active::after {
  transform: scaleX(1);
}

.reel__photo video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Clips move on their own, so they skip the slow zoom the stills get. */
.reel.is-active .reel__photo.has-video {
  animation: none;
}

.reel__photo.has-video img {
  display: none;
}

/* Playing: a small pause button at the top. Paused: a big "Play with music" button in the middle. */
.reels__play {
  position: absolute;
  z-index: 3;
  top: 34px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(40, 20, 30, 0.28);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.3s ease;
}

.reels__play svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.reels__play-text,
.reels__icon-play {
  display: none;
}

.reels__frame.is-paused .reels__play {
  top: 50%;
  right: auto;
  left: 50%;
  width: auto;
  height: auto;
  padding: 14px 22px 14px 18px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  color: var(--rose-deep);
  box-shadow: 0 10px 30px -10px rgba(91, 40, 60, 0.55);
}

.reels__frame.is-paused .reels__play:hover {
  background: #fff;
}

.reels__frame.is-paused .reels__icon-pause {
  display: none;
}

.reels__frame.is-paused .reels__icon-play {
  display: block;
  width: 22px;
  height: 22px;
}

.reels__frame.is-paused .reels__play-text {
  display: inline;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .reels__frame.is-paused .reels__play {
    animation: play-pulse 2.4s ease-in-out infinite;
  }
}

@keyframes play-pulse {
  0%, 100% { box-shadow: 0 10px 30px -10px rgba(91, 40, 60, 0.55), 0 0 0 0 rgba(255, 255, 255, 0.55); }
  50% { box-shadow: 0 10px 30px -10px rgba(91, 40, 60, 0.55), 0 0 0 12px rgba(255, 255, 255, 0); }
}

.reels__like {
  position: absolute;
  right: 12px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.reels__like svg {
  width: 26px;
  height: 26px;
  fill: transparent;
  stroke: #fff;
  stroke-width: 2;
  transition: fill 0.25s var(--ease-soft), stroke 0.25s var(--ease-soft);
}

.reels__like[aria-pressed="true"] svg {
  fill: #ff7b9c;
  stroke: #ff7b9c;
  animation: like-pop 0.45s var(--ease-soft);
}

.reels__pop {
  position: absolute;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  pointer-events: none;
  animation: heart-pop 0.9s var(--ease-soft) forwards;
}

.reels__pop svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #fff;
  filter: drop-shadow(0 4px 14px rgba(156, 90, 108, 0.5));
}

/* Small hearts that float up the side after a like */
.reels__float {
  position: absolute;
  right: 22px;
  bottom: 54px;
  width: var(--size, 16px);
  height: var(--size, 16px);
  color: var(--tint, #fff);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(91, 67, 88, 0.25));
  animation: float-up var(--dur, 2s) var(--ease-soft) var(--delay, 0s) forwards;
}

.reels__hint {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ==========================================================
   6. Case file
   ========================================================== */

.casefile {
  position: relative;
  max-width: 520px;
  margin: 52px auto 0;
  padding: 14px;
  border-radius: 4px 18px 18px 18px;
  background: #f3dcc4;
  box-shadow: var(--shadow-lift);
  font-family: var(--font-type);
  text-align: left;
}

.casefile.is-shaken {
  animation: shake 0.5s ease 0.3s;
}

.casefile__tab {
  position: absolute;
  bottom: 100%;
  left: 0;
  padding: 6px 18px 4px;
  border-radius: 12px 12px 0 0;
  background: #f3dcc4;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.casefile__paper {
  position: relative;
  padding: 26px 20px 24px;
  border-radius: 10px;
  background: var(--paper);
}

.casefile__stamp {
  position: absolute;
  top: 14px;
  right: 12px;
  padding: 2px 8px;
  border: 2px solid var(--rose-deep);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose-deep);
  opacity: 0.85;
  transform: rotate(7deg);
}

.casefile__head {
  max-width: 62%;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.casefile__sub {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.clues {
  margin-top: 16px;
}

.clue {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-top: 1px dashed rgba(91, 67, 88, 0.28);
  background: none;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.clue.is-revealed {
  cursor: default;
}

.clue__label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.clue__value {
  position: relative;
  display: block;
  min-height: 1.45em;
}

.clue__text {
  visibility: hidden;
  font-weight: 700;
  color: var(--ink);
}

.clue__value::after {
  content: "tap to reveal";
  position: absolute;
  inset: -3px 0;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--ink);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  transform-origin: 100% 50%;
  transition: transform 0.6s var(--ease-soft), color 0.25s ease;
}

.clue.is-revealed .clue__text {
  visibility: visible;
}

.clue.is-revealed .clue__value::after {
  color: transparent;
  transform: scaleX(0);
}

/* Typewriter: each letter is placed up front and shown in turn,
   so the line never jumps while it types */
.type__word {
  white-space: nowrap;
}

.type__char {
  position: relative;
  visibility: hidden;
}

.clue.is-revealed .type__char {
  visibility: hidden;
}

.clue.is-revealed .type__char.is-typed {
  visibility: visible;
}

.type__char.is-caret::after {
  content: "";
  position: absolute;
  top: 0.12em;
  bottom: 0.06em;
  left: 100%;
  width: 2px;
  margin-left: 1px;
  background: var(--rose-deep);
}

.casefile__closed {
  width: fit-content;
  margin: 18px auto 0;
  padding: 4px 14px;
  border: 3px solid var(--rose-deep);
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-deep);
  transform: rotate(-4deg);
  animation: stamp 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}

/* ==========================================================
   8. The letter
   ========================================================== */

.letter {
  margin-top: 44px;
}

.letter__paper {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 46px 26px 34px;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--shadow-lift), inset 0 0 0 1px rgba(201, 164, 106, 0.14);
  font-family: var(--font-hand);
  font-size: 1.5rem;
  line-height: 1.45;
  text-align: left;
  color: var(--ink);
  transform: rotate(-0.6deg);
}

/* A strip of washi tape holding the letter up */
.letter__paper::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 124px;
  height: 30px;
  background: linear-gradient(90deg, rgba(243, 205, 213, 0.85), rgba(244, 226, 200, 0.85));
  box-shadow: 0 2px 6px rgba(91, 67, 88, 0.08);
  transform: translateX(-50%) rotate(-2.5deg);
}

.letter__paper > p {
  position: relative;
}

/* Each line appears in turn, as if being written */
.letter__paper > p::after {
  content: "";
  position: absolute;
  inset: -0.12em -0.3em;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  pointer-events: none;
}

.letter.is-visible .letter__paper > p {
  animation: ink-in 0.9s var(--ease-soft) both;
  animation-delay: calc(0.35s + var(--n, 0) * 0.3s);
}

.letter.is-visible .letter__paper > p::after {
  animation: write-wipe 1s var(--ease-soft) both;
  animation-delay: calc(0.35s + var(--n, 0) * 0.3s);
}

.letter__paper p + p {
  margin-top: 16px;
}

.letter__sign {
  padding-top: 8px;
  text-align: right;
  color: var(--rose-deep);
}

/* ==========================================================
   9. Make a wish
   ========================================================== */

.wish {
  padding-bottom: clamp(96px, 20vw, 150px);
}

.cake {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
  padding: 40px 18px 12px;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease-soft);
}

.cake:not(.is-blown):hover {
  transform: translateY(-3px);
}

.cake.is-blown {
  cursor: default;
}

.cake > span {
  display: block;
}

.cake__candles {
  display: flex !important;
  gap: 28px;
}

.candle {
  position: relative;
  display: block;
  width: 9px;
  height: 36px;
  border-radius: 4px 4px 0 0;
  background: repeating-linear-gradient(135deg, #fff 0 5px, var(--rose) 5px 10px);
}

.flame {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 13px;
  height: 20px;
  margin-bottom: 3px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 72%, #fff7cf 0 26%, #ffc96e 56%, #ffa06e 100%);
  box-shadow: 0 0 14px 4px rgba(255, 201, 110, 0.55);
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  animation: flicker 1.1s ease-in-out infinite;
  transition: opacity 0.4s var(--ease-soft), transform 0.4s var(--ease-soft);
}

.candle:nth-child(2) .flame {
  animation-delay: -0.4s;
}

.candle:nth-child(3) .flame {
  animation-delay: -0.75s;
}

/* A wisp of smoke once the candles are out */
.candle::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 6px;
  height: 16px;
  margin-left: -3px;
  border-radius: 50%;
  background: rgba(123, 101, 119, 0.35);
  filter: blur(2px);
  opacity: 0;
}

.cake.is-blown .flame {
  opacity: 0;
  transform: translateX(-50%) scale(0.2);
  animation: none;
}

.cake.is-blown .candle::after {
  animation: smoke 1.6s ease-out 0.2s 1;
}

.cake__tier {
  position: relative;
  overflow: hidden;
  border-radius: 14px 14px 6px 6px;
}

.cake__tier::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 24px;
  background: radial-gradient(circle at 50% 0, var(--ivory) 0 66%, transparent 68%) 0 0 / 28px 24px repeat-x;
}

/* A fine gold band near the bottom of each tier */
.cake__tier::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  height: 2px;
  background: rgba(201, 164, 106, 0.55);
}

.cake__tier--top {
  width: 140px;
  height: 58px;
  background: #f4cfd7;
}

.cake__tier--bottom {
  width: 196px;
  height: 70px;
  background: #dfd3f1;
}

.cake__plate {
  width: 240px;
  max-width: 76vw;
  height: 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(201, 164, 106, 0.35), 0 12px 24px -6px rgba(122, 82, 104, 0.22);
}

.wish__after {
  margin-top: 30px;
  animation: rise 1.1s var(--ease-soft);
}

.wish__big {
  width: fit-content;
  max-width: 100%;
  margin: -0.08em auto;
  padding: 0.08em 0.14em;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(2.8rem, 13vw, 4.6rem);
  line-height: 1.05;
  color: var(--rose-display);
}

.wish__big.shimmer {
  animation-delay: 0.5s;
}

.wish__line {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.25rem, 5vw, 1.6rem);
  line-height: 1.35;
}

.wish__sign {
  margin-top: 26px;
  font-family: var(--font-hand);
  font-size: 1.7rem;
  line-height: 1.3;
  color: var(--ink);
}

/* The page dims to a soft dusk for a moment */
.dusk {
  position: fixed;
  inset: 0;
  z-index: 115;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, rgba(74, 54, 98, 0.32) 0%, rgba(44, 32, 70, 0.6) 100%);
}

.dusk.is-on {
  animation: dusk 3.4s var(--ease-soft) both;
}

/* Glowing hearts that rise like lanterns */
.lantern {
  position: absolute;
  bottom: -60px;
  width: var(--size, 24px);
  height: var(--size, 24px);
  color: var(--tint, #ffe7c2);
  opacity: 0;
  animation: lantern var(--dur, 7s) var(--ease-soft) var(--delay, 0s) forwards;
}

.lantern svg {
  filter: drop-shadow(0 0 6px rgba(255, 216, 168, 0.95)) drop-shadow(0 0 14px rgba(255, 190, 178, 0.6));
}

/* ==========================================================
   5b. A little sketchbook (vintage collage)
   ========================================================== */

.sketchbook {
  margin-top: 40px;
}

.book {
  --book-w: min(84vw, 380px);
  --u: calc(var(--book-w) / 100);
  position: relative;
  width: var(--book-w);
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  perspective: 2200px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  outline-offset: 10px;
  transition: transform 1s var(--ease-soft);
}

/* A few sheets peeking out underneath, so it feels like a real book */
.book__base {
  position: absolute;
  inset: 0;
  border-radius: 0 10px 10px 0;
  background: #efe6d3;
  box-shadow:
    1px 1px 0 #f7f1e5, 2px 2px 0 #e3d8c2, 3px 3px 0 #f5eee0, 4px 4px 0 #ddd1b8,
    5px 5px 0 #f2eadb, 6px 6px 0 #d6c9ad, var(--shadow-lift);
}

.book__base--left {
  right: 100%;
  left: auto;
  width: 100%;
  border-radius: 10px 0 0 10px;
  box-shadow:
    -1px 1px 0 #f7f1e5, -2px 2px 0 #e3d8c2, -3px 3px 0 #f5eee0, -4px 4px 0 #ddd1b8,
    -5px 5px 0 #f2eadb, -6px 6px 0 #d6c9ad, var(--shadow-lift);
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft) 0.5s;
}

.book.is-open .book__base--left {
  opacity: 1;
}

.leaf {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  transition: transform 1.05s cubic-bezier(0.45, 0.05, 0.2, 1), visibility 0s linear 0s;
}

.leaf.is-flipped {
  transform: rotateY(-180deg);
}

.leaf__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: inline-size;
  border-radius: 0 10px 10px 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.27 0 0 0 0 0.18 0 0 0 0.11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%),
    linear-gradient(90deg, rgba(90, 60, 40, 0.16), rgba(90, 60, 40, 0.04) 5%, rgba(90, 60, 40, 0) 12%),
    #f8f2e6;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  color: #3d3236;
}

.leaf__back {
  border-radius: 10px 0 0 10px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.27 0 0 0 0 0.18 0 0 0 0.11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 60%),
    linear-gradient(270deg, rgba(90, 60, 40, 0.16), rgba(90, 60, 40, 0.04) 5%, rgba(90, 60, 40, 0) 12%),
    #f5efe3;
  transform: rotateY(180deg);
}

/* Punched holes along the spine */
.leaf__face::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 3%;
  bottom: 3%;
  left: 1.6%;
  width: 6cqw;
  background: radial-gradient(circle, #4a4048 0 32%, rgba(74, 64, 72, 0) 36%) 50% 0 / 6cqw 6cqw repeat-y;
}

.leaf__back::before {
  right: 1.6%;
  left: auto;
}

/* Light and shadow while a page turns: it darkens as it lifts away
   and brightens again as it lands */
.leaf__face::after {
  content: "";
  position: absolute;
  z-index: 40;
  inset: 0;
  background: linear-gradient(90deg, rgba(40, 22, 30, 0.5), rgba(40, 22, 30, 0.12) 60%, rgba(255, 255, 255, 0.08));
  opacity: 0;
  pointer-events: none;
}

.leaf__back::after {
  background: linear-gradient(270deg, rgba(40, 22, 30, 0.5), rgba(40, 22, 30, 0.12) 60%, rgba(255, 255, 255, 0.08));
}

.leaf.turn-fwd .leaf__front::after,
.leaf.turn-back .leaf__back::after {
  animation: shade-away 1.05s linear both;
}

.leaf.turn-fwd .leaf__back::after,
.leaf.turn-back .leaf__front::after {
  animation: shade-arrive 1.05s linear both;
}

.sk-dark {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 60%),
    #24202b;
  color: #f4ecd8;
}

.sk-dark::before {
  background-image: radial-gradient(circle, #efe6d3 0 32%, rgba(239, 230, 211, 0) 36%);
}

.sk-kraft {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.27 0 0 0 0 0.18 0 0 0 0.11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(270deg, rgba(60, 40, 20, 0.16), rgba(60, 40, 20, 0) 10%),
    #d9c4a0;
}

/* The wire coil through the holes */
.book__spiral {
  position: absolute;
  z-index: 60;
  top: 3%;
  bottom: 3%;
  left: calc(var(--u) * -3.2);
  width: calc(var(--u) * 8.4);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 30'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fbfbfd'/%3E%3Cstop offset='0.45' stop-color='%23a19fa9'/%3E%3Cstop offset='0.6' stop-color='%2366646e'/%3E%3Cstop offset='1' stop-color='%23d6d5db'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5 18C5 9 14 8 22 8.5S36 11 38 16' fill='none' stroke='%23000' stroke-opacity='0.28' stroke-width='4.4' stroke-linecap='round' transform='translate(0.6 1.6)'/%3E%3Cpath d='M5 17C5 8 14 7 22 7.5S36 10 38 15' fill='none' stroke='url(%23g)' stroke-width='3.6' stroke-linecap='round'/%3E%3Cpath d='M8 13C10 9.5 15 9 21 9.2' fill='none' stroke='%23fff' stroke-opacity='0.8' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% calc(var(--u) * 6) repeat-y;
}

/* On phones one page shows at a time; the view glides across the spread
   so both sides of every page can be seen */
@media (max-width: 819px) {
  /* One page at a time: clip away the strip of the facing page that would
     otherwise peek in at the screen edge. The clip glides with the book, and
     lifts while a page turns so the page can swing across. */
  .book {
    clip-path: inset(-40px -30px -60px -18px);
    transition: transform 1s var(--ease-soft), clip-path 1s var(--ease-soft);
  }

  .book.show-left {
    transform: translateX(100%);
    clip-path: inset(-40px calc(100% - 18px) -60px calc(-100% - 30px));
  }

  .book.is-turning {
    clip-path: none;
  }
}

/* On wider screens the open book shows a two-page spread */
@media (min-width: 820px) {
  .book {
    --book-w: 360px;
  }

  .book.is-open {
    transform: translateX(50%);
  }
}

/* ---------- Collage pieces ---------- */

.sk {
  position: absolute;
  z-index: 1;
  left: var(--x, 0);
  top: var(--y, 0);
  width: var(--w, auto);
  margin: 0;
  font-size: 13px;
  font-size: 3.6cqw;
  transform: rotate(var(--r, 0deg));
}

svg.sk {
  height: auto;
  fill: currentColor;
  aspect-ratio: 1;
  overflow: visible;
}

svg.sk-wide {
  aspect-ratio: 4 / 3;
}

/* Your own cut-out stickers (transparent PNGs) work too:
   <img class="sk sk-die" src="assets/stickers/cat.png" alt="" style="--x: 10%; --y: 50%; --w: 30%"> */
img.sk {
  height: auto;
  pointer-events: none;
}

/* Photo stickers and torn scraps: the white die-cut edge and the torn
   paper rim are baked into the WebP files, so they only need a shadow. */
img.sk-cut {
  filter: drop-shadow(0 1px 1px rgba(40, 20, 30, 0.32)) drop-shadow(0 4px 6px rgba(40, 20, 30, 0.18));
}

img.sk-scrap {
  filter: drop-shadow(0 1px 1.5px rgba(40, 20, 30, 0.22)) drop-shadow(0 5px 9px rgba(40, 20, 30, 0.14));
}

/* Die-cut stickers: a thin white edge and a small shadow */
.sk-die {
  filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff)
    drop-shadow(0 -1.5px 0 #fff) drop-shadow(0 3px 3px rgba(40, 20, 30, 0.25));
}

.sk-torn-1 {
  clip-path: polygon(0% 6%, 8% 0%, 17% 5%, 26% 1%, 35% 6%, 46% 2%, 55% 7%, 66% 1%, 76% 5%, 86% 0%, 95% 6%, 100% 3%, 98% 18%, 100% 34%, 97% 50%, 100% 66%, 97% 82%, 100% 97%, 90% 100%, 79% 95%, 68% 100%, 57% 96%, 46% 100%, 35% 95%, 24% 100%, 13% 96%, 3% 100%, 0% 88%, 3% 72%, 0% 56%, 3% 40%, 0% 24%);
}

.sk-torn-2 {
  clip-path: polygon(2% 3%, 12% 0%, 22% 4%, 31% 0%, 42% 5%, 52% 1%, 61% 4%, 72% 0%, 83% 5%, 92% 1%, 100% 4%, 97% 21%, 100% 38%, 96% 55%, 100% 72%, 97% 90%, 99% 100%, 88% 96%, 77% 100%, 66% 95%, 55% 99%, 44% 95%, 33% 100%, 22% 96%, 11% 100%, 0% 97%, 3% 80%, 0% 63%, 4% 46%, 0% 29%, 3% 13%);
}

.sk-torn-3 {
  clip-path: polygon(0% 10%, 10% 2%, 19% 8%, 30% 0%, 41% 7%, 50% 2%, 61% 8%, 72% 1%, 82% 7%, 92% 0%, 100% 6%, 100% 100%, 0% 100%, 3% 78%, 0% 58%, 4% 38%, 0% 22%);
}

/* Newspaper scraps */
.sk-news {
  padding: 5% 7% 7%;
  background: #ece5d3;
  color: #4b443d;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
  text-align: left;
  box-shadow: 0 2px 4px rgba(40, 20, 30, 0.15);
}

.sk-dark .sk-news {
  background: #efe2bf;
}

.sk-news__mast {
  padding-bottom: 2%;
  border-bottom: 1px solid rgba(75, 68, 61, 0.5);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sk-news__date {
  margin-top: 2%;
  font-size: 0.6em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sk-news__head {
  margin-top: 3%;
  font-weight: 700;
  font-size: 0.95em;
  line-height: 1.15;
}

.sk-news__body {
  margin-top: 3%;
  font-size: 0.62em;
  line-height: 1.3;
}

/* Ransom-note letters cut from different papers */
.sk-ransom {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2cqw 0.8cqw;
  font-size: calc(3.6cqw * 2.05);
  line-height: 1;
}

.sk-ransom--small {
  font-size: calc(3.6cqw * 1.55);
}

.sk-word {
  display: inline-flex;
  gap: 0.6cqw;
  margin: 0 1cqw;
}

.sk-word span {
  display: inline-block;
  padding: 0.12em 0.16em 0.08em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.sk-word span:nth-child(5n + 1) { background: #f4ecd8; color: #222; font-family: var(--font-display); font-weight: 600; transform: rotate(-4deg); }
.sk-word span:nth-child(5n + 2) { background: #111; color: #f4ecd8; font-family: var(--font-type); font-weight: 700; transform: rotate(3deg); }
.sk-word span:nth-child(5n + 3) { background: #c8323c; color: #fff; font-family: var(--font-body); font-weight: 700; transform: rotate(-2deg) translateY(4%); }
.sk-word span:nth-child(5n + 4) { background: #e8d4a8; color: #3a2a20; font-family: Georgia, serif; font-style: italic; transform: rotate(5deg); }
.sk-word span:nth-child(5n + 5) { background: #fff; color: #c8323c; font-family: var(--font-hand); font-weight: 700; transform: rotate(-6deg) translateY(-4%); }

/* Cream labels and the hint tag */
.sk-label {
  padding: 3% 4%;
  background: #f4ecd8;
  color: #9c3a4a;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: calc(3.6cqw * 2);
  line-height: 1;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
}

.sk-label--big {
  font-size: calc(3.6cqw * 2.3);
  line-height: 1.05;
}

.sk-hint {
  padding: 2% 3%;
  border: 1px dashed rgba(244, 236, 216, 0.6);
  border-radius: 4px;
  color: rgba(244, 236, 216, 0.85);
  font-family: var(--font-type);
  font-size: calc(3.6cqw * 0.68);
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  animation: pulse 2.6s ease-in-out infinite;
}

.book.is-open .sk-hint {
  visibility: hidden;
}

/* Lines of writing on a highlighter strip */
.sk-line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: calc(3.6cqw * 1.32);
  line-height: 1.55;
  text-align: left;
  color: #3d3236;
}

.sk-line span {
  padding: 0.04em 0.3em;
  background: rgba(240, 214, 160, 0.6);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Photo pieces, with a faint gloss like a real print */
.book .photo {
  background: linear-gradient(150deg, #e9d9c6, #d8c3c9);
}

.book .photo::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.06) 100%);
  pointer-events: none;
}

/* Vintage floral paper */
.sk-floral {
  aspect-ratio: 1.15;
  background:
    radial-gradient(circle at 30% 30%, #ef9fae 0 1.3cqw, rgba(239, 159, 174, 0) 1.45cqw) 0 0 / 8cqw 8cqw,
    radial-gradient(circle at 30% 30%, #f7cdd5 0 2.3cqw, rgba(247, 205, 213, 0) 2.45cqw) 0 0 / 8cqw 8cqw,
    radial-gradient(ellipse 1.6cqw 0.8cqw at 75% 72%, #9fbe8e 0 98%, rgba(159, 190, 142, 0) 100%) 0 0 / 8cqw 8cqw,
    #f6ecd9;
  box-shadow: 0 2px 4px rgba(40, 20, 30, 0.15);
}

.book .photo__placeholder {
  gap: 3%;
  padding: 6%;
  font-size: 0.72em;
  letter-spacing: 0.02em;
  color: rgba(70, 50, 60, 0.7);
}

.book .photo__placeholder::before {
  inset: 5%;
  border-width: 1px;
}

.book .photo__placeholder svg {
  width: 1.6em;
  height: 1.6em;
}

.sk-strip {
  display: grid;
  gap: 1.3cqw;
  padding: 1.8cqw 1.8cqw 5.5cqw;
  background: #fff;
  box-shadow: 0 4px 10px rgba(40, 20, 30, 0.22);
}

.sk-strip .photo {
  aspect-ratio: 1;
}

.sk-print {
  padding: 1.7cqw;
  background: #fff;
  box-shadow: 0 4px 10px rgba(40, 20, 30, 0.22);
}

.sk-print .photo {
  aspect-ratio: 4 / 5;
}

/* A print of a picture that is not one of her photo slots */
.sk-print--img img {
  display: block;
  width: 100%;
  height: auto;
}

.sk-print--wide .photo {
  aspect-ratio: 4 / 3;
}

.sk-polaroid {
  padding: 2.8cqw 2.8cqw 0;
  background: #fff;
  box-shadow: 0 6px 14px rgba(40, 20, 30, 0.25);
}

.sk-polaroid .photo {
  aspect-ratio: 1;
}

.sk-polaroid figcaption {
  padding: 3% 0 5%;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.7em;
  line-height: 1.1;
  text-align: center;
  color: #3d3236;
}

/* A strip of washi tape across the top */
.sk-taped::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -5%;
  left: 50%;
  width: 46%;
  height: 11%;
  max-height: 6cqw;
  background: repeating-linear-gradient(45deg, rgba(243, 181, 196, 0.85) 0 6px, rgba(250, 210, 220, 0.85) 6px 12px);
  transform: translateX(-50%) rotate(-3deg);
  clip-path: polygon(0 0, 100% 0, 97% 25%, 100% 50%, 97% 75%, 100% 100%, 0 100%, 3% 75%, 0 50%, 3% 25%);
}

/* A postage stamp with perforated edges */
.sk-stamp {
  padding: 4px;
  background: #fff;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle, transparent 0 2.3px, #000 2.7px) -4px -4px / 8px 8px;
  mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle, transparent 0 2.3px, #000 2.7px) -4px -4px / 8px 8px;
  filter: drop-shadow(0 2px 3px rgba(40, 20, 30, 0.25));
}

.sk-stamp .photo {
  aspect-ratio: 4 / 5;
  border: 5px solid #fff;
}

/* Gingham paper */
.sk-gingham {
  aspect-ratio: 1;
  background:
    repeating-linear-gradient(0deg, rgba(200, 40, 50, 0.5) 0 3cqw, rgba(200, 40, 50, 0) 3cqw 6cqw),
    repeating-linear-gradient(90deg, rgba(200, 40, 50, 0.5) 0 3cqw, rgba(200, 40, 50, 0) 3cqw 6cqw),
    #fff;
}

/* Kraft note card */
.sk-card {
  padding: 7% 8% 9%;
  background: repeating-linear-gradient(180deg, #e3cfab 0 1.45em, rgba(140, 100, 60, 0.25) 1.45em calc(1.45em + 1px)), #e3cfab;
  color: #3d3236;
  font-family: var(--font-hand);
  font-size: calc(3.6cqw * 1.3);
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 4px 8px rgba(40, 20, 30, 0.22);
}

/* Sheet music scrap */
.sk-music {
  aspect-ratio: 3.4 / 1;
  background:
    repeating-linear-gradient(180deg, #7e7466 0 0.25cqw, rgba(0, 0, 0, 0) 0.25cqw 1.4cqw) 0 16% / 100% 5.85cqw no-repeat,
    repeating-linear-gradient(180deg, #7e7466 0 0.25cqw, rgba(0, 0, 0, 0) 0.25cqw 1.4cqw) 0 78% / 100% 5.85cqw no-repeat,
    #f4eedf;
  box-shadow: 0 2px 4px rgba(40, 20, 30, 0.15);
}

.sk-music__note {
  position: absolute;
  width: 9%;
  height: auto;
  aspect-ratio: 1;
  color: #3d3236;
}

/* Admit-one ticket */
.sk-ticket {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5% 6%;
  background: #e46a7e;
  color: #fff;
  font-family: var(--font-type);
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 0.6cqw #e46a7e, inset 0 0 0 0.9cqw rgba(255, 255, 255, 0.7), 0 3px 6px rgba(40, 20, 30, 0.25);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 0 4cqw, #000 4.2cqw) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent 0 4cqw, #000 4.2cqw) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 50%, transparent 0 4cqw, #000 4.2cqw) left / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, transparent 0 4cqw, #000 4.2cqw) right / 51% 100% no-repeat;
}

.sk-ticket__big {
  font-weight: 700;
  font-size: 1.2em;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.sk-ticket__small {
  margin-top: 2%;
  white-space: nowrap;
  font-size: 0.6em;
  letter-spacing: 0.06em;
}

/* Inside cover */
.sk-belongs {
  color: #5a4632;
  font-family: var(--font-type);
  font-size: calc(3.6cqw * 0.85);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.sk-belongs__name {
  color: #9c3a4a;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: calc(3.6cqw * 4);
  line-height: 1;
  text-align: center;
}

.sk-pageno {
  right: 10%;
  bottom: 4%;
  left: auto;
  top: auto;
  color: rgba(61, 50, 54, 0.55);
  font-family: var(--font-type);
  font-size: calc(3.6cqw * 0.75);
}

/* Page controls */
.book__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}

.book__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(201, 164, 106, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: opacity 0.3s var(--ease-soft), transform 0.3s var(--ease-soft);
}

.book__btn:not(:disabled):hover {
  transform: translateY(-2px);
}

.book__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.book__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--rose-deep);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.book__count {
  min-width: 8em;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ==========================================================
   Larger screens
   ========================================================== */

@media (min-width: 720px) {
  .duo {
    gap: 64px;
    margin-top: 60px;
  }

  .duo__item {
    flex-direction: row;
    justify-content: center;
    gap: 56px;
    text-align: left;
  }

  .duo__item--flip {
    flex-direction: row-reverse;
    text-align: right;
  }

  .polaroid {
    flex: none;
    width: 290px;
  }

  .casefile__paper {
    padding: 32px 30px 28px;
  }

  .clue {
    grid-template-columns: 110px 1fr;
    font-size: 1rem;
  }

  .letter__paper {
    padding: 56px 52px 44px;
    font-size: 1.65rem;
  }
}

/* ==========================================================
   Animations
   ========================================================== */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes glow-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(7vmax, 5vmax, 0) scale(1.08); }
}

@keyframes glow-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.04); }
  to { transform: translate3d(-6vmax, 7vmax, 0) scale(0.94); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  50% { opacity: 0.9; transform: scale(1) rotate(45deg); }
}

@keyframes tap-heart {
  0% { opacity: 0; transform: scale(0.3); }
  20% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -42px) scale(0.85); }
}

@keyframes tap-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(0.2) rotate(0deg); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(1) rotate(90deg); }
}

@keyframes seal-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes seal-ring {
  0% { opacity: 0.8; transform: scale(0.85); }
  70%, 100% { opacity: 0; transform: scale(1.5); }
}

@keyframes bloom {
  0% { opacity: 0; transform: scale(0.2); }
  20% { opacity: 1; }
  100% { opacity: 1; transform: scale(var(--bloom-scale, 30)); }
}

@keyframes shade-away {
  0% { opacity: 0; }
  50%, 100% { opacity: 0.6; }
}

@keyframes shade-arrive {
  0%, 50% { opacity: 0.6; }
  100% { opacity: 0; }
}

@keyframes word-rise {
  from { opacity: 0; transform: translateY(0.45em); }
  to { opacity: 1; transform: none; }
}

@keyframes letter-in {
  from { opacity: 0; transform: translateY(0.3em) scale(0.82) rotate(-6deg); }
  to { opacity: 1; transform: none; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.985); }
  50% { opacity: 1; transform: scale(1.02); }
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  28%, 100% { background-position: 0% 0; }
}

@keyframes develop-white {
  0% { opacity: 0.96; }
  100% { opacity: 0; }
}

@keyframes develop-haze {
  0% { opacity: 0; }
  30% { opacity: 0.55; }
  100% { opacity: 0; }
}

@keyframes eq {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

@keyframes cassette-float {
  0%, 100% { transform: translateY(0) rotate(9deg); }
  50% { transform: translateY(-6px) rotate(7deg); }
}

@keyframes sheen {
  from { transform: translateX(-110%); }
  to { transform: translateX(110%); }
}

@keyframes sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

@keyframes rock {
  0%, 100% { transform: rotate(-16deg); }
  50% { transform: rotate(16deg); }
}

@keyframes heartbeat {
  0%, 40%, 100% { transform: scale(1); }
  10% { transform: scale(1.16); }
  20% { transform: scale(1); }
  30% { transform: scale(1.1); }
}

@keyframes bob-tilt {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(8deg); }
}

@keyframes slow-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}

@keyframes float-up {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  15% { opacity: 1; transform: translate(var(--sway, 0px), -24px) scale(1); }
  55% { transform: translate(calc(var(--sway, 0px) * -1), calc(var(--rise, -260px) * 0.55)) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--rise, -260px)) scale(0.8); }
}

@keyframes petal-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -12vh, 0) rotate(0deg);
  }
  12% {
    opacity: 0.7;
  }
  85% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 40px), 112vh, 0) rotate(var(--spin, 240deg));
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translate3d(0, -8vh, 0) rotate(0deg);
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 0px), 108vh, 0) rotate(var(--spin, 540deg));
  }
}

@keyframes like-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

@keyframes heart-pop {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-12deg);
  }
  25% {
    opacity: 1;
    transform: scale(1.15) rotate(-6deg);
  }
  45% {
    transform: scale(1) rotate(-6deg);
  }
  75% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(-6deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.05) translateY(-46px) rotate(-6deg);
  }
}

@keyframes stamp {
  0% {
    opacity: 0;
    transform: rotate(-4deg) scale(2);
  }
  100% {
    opacity: 1;
    transform: rotate(-4deg) scale(1);
  }
}

@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(-3px, 1px) rotate(-0.4deg); }
  40% { transform: translate(3px, -1px) rotate(0.4deg); }
  60% { transform: translate(-2px, 0) rotate(-0.2deg); }
  80% { transform: translate(1px, 0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ink-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes write-wipe {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes flicker {
  0%, 100% { transform: translateX(-50%) scale(1) rotate(-2deg); }
  50% { transform: translateX(-50%) scale(1.08, 0.93) rotate(3deg); }
}

@keyframes smoke {
  0% {
    opacity: 0.7;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px) scale(1.8);
  }
}

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

@keyframes dusk {
  0% { opacity: 0; }
  28%, 52% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes lantern {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.6); }
  12% { opacity: 1; }
  50% { transform: translate3d(var(--sway, 20px), -55vh, 0) scale(1); }
  85% { opacity: 0.9; }
  100% { opacity: 0; transform: translate3d(calc(var(--sway, 20px) * -0.5), -118vh, 0) scale(0.9); }
}

/* ==========================================================
   Reduced motion: everything stays still
   ========================================================== */

/* ---------- Little things: board layouts ---------- */
@media (min-width: 600px) {
  .adore {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "cars   cars"
      "music  self"
      "dream  spidey"
      "saree  heart"
      "vibe   cats";
  }

  .tile--music,
  .tile--self {
    min-height: 480px;
  }

  .tile--cars { grid-area: cars; min-height: 320px; }
  .tile--music { grid-area: music; }
  .tile--spidey { grid-area: spidey; }
  .tile--dream { grid-area: dream; }
  .tile--self { grid-area: self; }
  .tile--saree { grid-area: saree; }
  .tile--heart { grid-area: heart; }
  .tile--vibe { grid-area: vibe; }
  .tile--cats { grid-area: cats; }
}

@media (min-width: 900px) {
  .adore {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(190px, auto);
    gap: 16px;
    grid-template-areas:
      "cars   cars   cars   music"
      "cars   cars   cars   music"
      "spidey spidey dream  dream"
      "spidey spidey dream  dream"
      "saree  heart  vibe   self"
      "cats   cats   cats   self";
  }

  .tile--photo,
  .tile--cars,
  .tile--spidey,
  .tile--music,
  .tile--self {
    min-height: 0;
  }

  .tile--spidey .tile__title,
  .tile--dream .tile__title {
    font-size: 1.9rem;
  }

  .tile--cars .tile__title {
    font-size: 2.3rem;
  }

  .tile--cars .tile__body {
    padding: 26px 28px 28px;
  }
}

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

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .glow {
    translate: none;
  }
}

/* ---------- 5c. Across the universes ---------- */

.verse {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 16px;
  width: min(100%, 1040px);
  margin: 0 auto;
}

/* Tilt with rotate/translate/scale so it never fights the reveal's transform. */
.verse .verse__item {
  --tilt: -1.6deg;
  margin: 0;
  rotate: var(--tilt);
  transition: opacity 1.2s var(--ease-soft), transform 1.2s var(--ease-soft), rotate 0.5s var(--ease-out),
    translate 0.5s var(--ease-out), scale 0.5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 130ms), calc(var(--i, 0) * 130ms), 0s, 0s, 0s;
}

.verse__item:nth-child(even) {
  --tilt: 1.4deg;
}

.verse__item:nth-child(3n) {
  --tilt: -0.6deg;
}

.verse__frame {
  position: relative;
  padding: 7px;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(201, 164, 106, 0.28);
}

/* The art gets a thin gold inner line, like a print in a gallery mat. */
.verse__item--art .verse__frame::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(201, 164, 106, 0.55);
  border-radius: 4px;
  pointer-events: none;
}

.verse__frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
}

.verse__card {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: fit-content;
  max-width: 100%;
  margin: -14px auto 0;
  padding: 7px 12px 8px;
  position: relative;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: 0 6px 14px -8px rgba(122, 82, 104, 0.35);
  text-align: center;
}

.verse__tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

@media (max-width: 819px) {
  .verse__tag {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }
}

.verse__item--real .verse__tag {
  color: #b23a48;
}

.verse__cap {
  font-family: var(--font-hand);
  font-size: 1.12rem;
  line-height: 1.15;
  color: var(--ink);
}

@media (hover: hover) {
  .verse .verse__item:hover {
    rotate: 0deg;
    translate: 0 -6px;
    scale: 1.02;
  }
}

/* Each real photo sits next to its art: side by side on phones,
   and on wide screens the photo on top with its art underneath. */
@media (min-width: 820px) {
  .verse {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    gap: 40px 34px;
  }

  .verse__cap {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .verse .verse__item {
    transition: none;
  }
}
