:root {
  --bg0: #faf5ff;
  --bg1: #f5f3ff;
  --ink: #16061f;
  --wine: #4c1d95;
  --rose: #a855f7;
  --peach: #d8b4fe;
  --sage: #2f6b5e;
  --violet: #7c3aed;
  --lilac: #c4b5fd;
  --orchid: #f0abfc;
  --night: #140616;
  --card: rgba(255, 255, 255, 0.74);
  --stroke: rgba(124, 58, 237, 0.18);
  --shadow: 0 18px 50px rgba(32, 7, 14, 0.18);
  --shadowTight: 0 12px 26px rgba(32, 7, 14, 0.12);
  --radius: 22px;
  --blur: 18px;

  --fontBody: "Manrope", ui-sans-serif, system-ui, -apple-system, Segoe UI,
    Roboto, Arial, sans-serif;
  --fontTitle: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --fontScript: "Satisfy", ui-cursive, "Comic Sans MS", cursive;
}

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

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--fontBody);
  line-height: 1.55;
  overflow-x: hidden;
  background: radial-gradient(1200px 680px at 10% 10%, #fff, transparent 70%),
    radial-gradient(
      980px 520px at 92% 12%,
      rgba(168, 85, 247, 0.18),
      transparent 60%
    ),
    radial-gradient(
      860px 460px at 86% 62%,
      rgba(124, 58, 237, 0.14),
      transparent 65%
    ),
    radial-gradient(
      1100px 720px at 50% 96%,
      rgba(240, 171, 252, 0.12),
      transparent 70%
    ),
    linear-gradient(160deg, var(--bg0), var(--bg1));
}

body:not(.is-open) {
  overflow-y: hidden;
}

body.is-surprise {
  overflow-y: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(124, 58, 237, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.22;
  transform: translateZ(0);
}

canvas#petals {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
}

.topbar__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: baseline;
  user-select: none;
}

.brand__mark {
  font-family: var(--fontTitle);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--rose);
  filter: drop-shadow(0 10px 16px rgba(124, 58, 237, 0.18));
}

.brand__word {
  font-family: var(--fontTitle);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(36, 10, 18, 0.86);
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chip {
  appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: 999px;
  padding: 10px 12px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--fontBody);
  font-weight: 600;
  color: rgba(36, 10, 18, 0.86);
  box-shadow: var(--shadowTight);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.78);
}

.chip:active {
  transform: translateY(0);
}

.chip__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(36, 10, 18, 0.3);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.chip__dot--petals {
  background: rgba(124, 58, 237, 0.48);
  box-shadow: 0 0 0 3px rgba(255, 176, 137, 0.18);
}

#musicBtn[aria-pressed="true"] .chip__dot--music {
  background: rgba(124, 58, 237, 0.66);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

#petalsBtn[aria-pressed="false"] .chip__dot--petals {
  background: rgba(36, 10, 18, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 176, 137, 0.12);
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
}

.gate__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      800px 600px at 20% 20%,
      rgba(255, 255, 255, 0.86),
      rgba(255, 255, 255, 0.62)
    ),
    linear-gradient(
      160deg,
      rgba(250, 245, 255, 0.92),
      rgba(245, 243, 255, 0.92)
    );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.gate__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  place-items: center;
  padding: 22px;
}

.gate__fineprint {
  font-family: var(--fontTitle);
  font-weight: 700;
  color: rgba(36, 10, 18, 0.68);
  letter-spacing: 0.02em;
}

.script {
  font-family: var(--fontScript);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.envelope {
  width: min(440px, 92vw);
  height: 300px;
  position: relative;
  perspective: 1200px;
}

.envelope__paper {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.7),
    rgba(255, 255, 255, 0.25)
  );
  box-shadow: var(--shadow);
  border: 1px solid rgba(124, 58, 237, 0.14);
}

.envelope__front {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(250, 245, 255, 0.95), rgba(245, 243, 255, 0.95));
  clip-path: polygon(0 32%, 100% 32%, 100% 100%, 0 100%);
  border: 1px solid rgba(124, 58, 237, 0.14);
}

.envelope__flap {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(
    180deg,
    rgba(196, 181, 253, 0.34),
    rgba(168, 85, 247, 0.16)
  );
  clip-path: polygon(0 32%, 100% 32%, 50% 0);
  transform-origin: 50% 32%;
  transform: rotateX(0deg);
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(124, 58, 237, 0.14);
}

.letter {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 270px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(124, 58, 237, 0.16);
  box-shadow: var(--shadowTight);
  transform: translateY(42%);
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.letter__inner {
  padding: 18px 18px 16px;
  height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
}

.letter__kicker {
  font-size: 1.1rem;
  color: rgba(36, 10, 18, 0.68);
}

.letter__to {
  font-family: var(--fontTitle);
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 2.35rem);
  color: var(--wine);
  line-height: 1.05;
  word-break: break-word;
}

.letter__line {
  margin: 0;
  color: rgba(36, 10, 18, 0.74);
}

.toggle {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(250, 245, 255, 0.55);
  font-weight: 600;
  color: rgba(36, 10, 18, 0.78);
  width: fit-content;
  user-select: none;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--rose);
}

.hint {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(36, 10, 18, 0.62);
}

.hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.92em;
  color: rgba(76, 29, 149, 0.92);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 12px 16px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  font-family: var(--fontBody);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease,
    border-color 160ms ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--rose), var(--peach));
  color: rgba(36, 10, 18, 0.94);
  box-shadow: 0 18px 46px rgba(124, 58, 237, 0.22);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 64px rgba(124, 58, 237, 0.26);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(124, 58, 237, 0.18);
  color: rgba(36, 10, 18, 0.88);
  box-shadow: var(--shadowTight);
}

.btn--ghost:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.82);
}

.btn--openUp {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--violet), var(--orchid), var(--lilac));
  color: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 90px rgba(124, 58, 237, 0.28), 0 18px 56px rgba(240, 171, 252, 0.16);
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  padding: 14px 22px;
  font-size: 1.06rem;
}

.btn--openUp::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 22%,
    rgba(255, 255, 255, 0.26) 40%,
    rgba(255, 255, 255, 0.06) 58%,
    transparent 72%
  );
  transform: translateX(-70%) rotate(6deg);
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.btn--openUp:hover {
  transform: translateY(-1px);
  box-shadow: 0 36px 120px rgba(124, 58, 237, 0.3), 0 22px 70px rgba(240, 171, 252, 0.18);
}

.btn--openUp:hover::before {
  transform: translateX(70%) rotate(6deg);
}

.page {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 70px 18px 70px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms ease;
}

body.is-open .page {
  opacity: 1;
  transform: translateY(0);
}

body.is-open .gate {
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms ease;
}

body.is-opening .envelope__flap {
  transform: rotateX(-165deg);
}

body.is-opening .letter {
  transform: translateY(-32%);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

.hero {
  padding: 36px 0 6px;
}

.hero__grid {
  display: grid;
  gap: 22px;
  align-items: start;
}

.hero__copy {
  min-width: 0;
}

.hero__media {
  min-width: 0;
}

@media (min-width: 860px) {
  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: start;
  }

  .hero__frame {
    margin-top: 0;
    justify-self: end;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadowTight);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.hero__badgeMark {
  color: var(--rose);
  font-size: 1.2rem;
}

.hero__title {
  font-family: var(--fontTitle);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.06;
  margin: 18px 0 10px;
  color: rgba(36, 10, 18, 0.94);
  letter-spacing: -0.01em;
}

.hero__titleName {
  color: var(--wine);
  text-shadow: 0 26px 70px rgba(124, 58, 237, 0.18);
}

.hero__subtitle {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(36, 10, 18, 0.76);
  max-width: 64ch;
}

.hero__subtitle .dot {
  display: inline-block;
  margin: 0 10px;
  color: rgba(124, 58, 237, 0.38);
}

.hero__frame {
  margin: 20px 0 0;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadowTight);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  max-width: 560px;
}

.hero__frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.14),
    rgba(240, 171, 252, 0.12)
  );
}

.hero__frameCap {
  margin-top: 10px;
  font-family: var(--fontScript);
  font-size: 1.12rem;
  color: rgba(36, 10, 18, 0.72);
  letter-spacing: 0.01em;
}

.hero__actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero__note {
  margin-top: 24px;
  display: grid;
}

.hero__noteCard {
  border-radius: var(--radius);
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadowTight);
  padding: 16px;
  max-width: 620px;
}

.hero__noteTop {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}

.hero__noteTiny {
  font-size: 0.95rem;
  color: rgba(36, 10, 18, 0.62);
}

.hero__noteText {
  font-family: var(--fontTitle);
  font-weight: 600;
  font-size: 1.1rem;
  color: rgba(36, 10, 18, 0.88);
}

.hero__spell {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(196, 181, 253, 0.22);
  background: radial-gradient(
      420px 220px at 14% 20%,
      rgba(124, 58, 237, 0.18),
      transparent 62%
    ),
    radial-gradient(420px 220px at 88% 80%, rgba(240, 171, 252, 0.14), transparent 62%),
    rgba(255, 255, 255, 0.46);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero__spellText {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.hero__spellTitle {
  font-family: var(--fontTitle);
  font-weight: 900;
  color: rgba(76, 29, 149, 0.92);
  letter-spacing: -0.01em;
}

.hero__spellSub {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(22, 6, 31, 0.62);
}

.btn--spell {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(240, 171, 252, 0.92));
  color: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 70px rgba(124, 58, 237, 0.24);
  padding: 12px 16px;
  font-size: 1.02rem;
  white-space: nowrap;
}

.btn--spell::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(
      18px 18px at 14% 38%,
      rgba(255, 255, 255, 0.55),
      transparent 70%
    ),
    radial-gradient(16px 16px at 58% 20%, rgba(255, 255, 255, 0.38), transparent 72%),
    radial-gradient(22px 22px at 84% 68%, rgba(255, 255, 255, 0.42), transparent 70%),
    linear-gradient(
      115deg,
      transparent 0%,
      rgba(255, 255, 255, 0.06) 26%,
      rgba(255, 255, 255, 0.2) 40%,
      rgba(255, 255, 255, 0.06) 56%,
      transparent 72%
    );
  transform: translateX(-70%) rotate(10deg);
  opacity: 0.9;
  pointer-events: none;
  animation: spellShine 3200ms cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.btn--spell:hover {
  transform: translateY(-1px);
  box-shadow: 0 34px 98px rgba(124, 58, 237, 0.28);
}

.btn--spell:active {
  transform: translateY(0);
}

@keyframes spellShine {
  0% {
    transform: translateX(-70%) rotate(10deg);
  }
  60% {
    transform: translateX(70%) rotate(10deg);
  }
  100% {
    transform: translateX(70%) rotate(10deg);
  }
}

@media (max-width: 520px) {
  .hero__spell {
    flex-direction: column;
    align-items: stretch;
  }

  .btn--spell {
    width: 100%;
  }
}

.section {
  padding: 52px 0 10px;
}

.section__head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section__title {
  margin: 0;
  font-family: var(--fontTitle);
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  color: rgba(36, 10, 18, 0.94);
  letter-spacing: -0.01em;
}

.section__sub {
  margin: 0;
  max-width: 72ch;
  color: rgba(36, 10, 18, 0.68);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 520px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.scrapbook {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid rgba(196, 181, 253, 0.22);
  background: radial-gradient(
      620px 280px at 14% 26%,
      rgba(124, 58, 237, 0.14),
      transparent 66%
    ),
    radial-gradient(620px 280px at 86% 70%, rgba(240, 171, 252, 0.12), transparent 64%),
    rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadowTight);
  padding: 14px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0px,
    #000 28px,
    #000 calc(100% - 28px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0px,
    #000 28px,
    #000 calc(100% - 28px),
    transparent 100%
  );
}

.scrapbook::-webkit-scrollbar {
  height: 10px;
}

.scrapbook::-webkit-scrollbar-track {
  background: rgba(196, 181, 253, 0.12);
  border-radius: 999px;
}

.scrapbook::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.26);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.scrapbook__card {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex: 0 0 auto;
  width: min(240px, 70vw);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 180ms ease, filter 180ms ease;
  filter: drop-shadow(0 18px 50px rgba(0, 0, 0, 0.12));
}

.scrapbook__card:hover {
  transform: rotate(var(--tilt, 0deg)) translateY(-4px);
}

.scrapbook__frame {
  border-radius: 18px;
  padding: 10px 10px 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(196, 181, 253, 0.3);
  box-shadow: 0 22px 90px rgba(124, 58, 237, 0.12);
  position: relative;
  overflow: hidden;
}

.scrapbook__frame::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 86px;
  height: 32px;
  transform: translateX(-50%) rotate(-2deg);
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(196, 181, 253, 0.66),
    rgba(240, 171, 252, 0.22)
  );
  border: 1px solid rgba(255, 255, 255, 0.22);
  opacity: 0.9;
}

.scrapbook__imgWrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.44);
}

.scrapbook__imgWrap .mediaThumb {
  border: 0;
  border-radius: 0;
}

.scrapbook__play {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(196, 181, 253, 0.4);
  box-shadow: 0 22px 70px rgba(124, 58, 237, 0.2);
  display: grid;
  place-items: center;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.scrapbook__play::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid rgba(124, 58, 237, 0.92);
  transform: translateX(2px);
}

.scrapbook__frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

@media (max-width: 520px) {
  .scrapbook {
    padding: 12px;
  }

  .scrapbook__card {
    width: 76vw;
  }
}

.photoCard {
  text-align: left;
  appearance: none;
  cursor: pointer;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  padding: 12px 12px 14px;
  box-shadow: var(--shadowTight);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  transform: rotate(var(--tilt, 0deg));
}

.photoCard:hover {
  transform: rotate(var(--tilt, 0deg)) translateY(-4px);
  box-shadow: 0 18px 52px rgba(32, 7, 14, 0.16);
  background: rgba(255, 255, 255, 0.86);
}

.photoCard img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.14),
    rgba(240, 171, 252, 0.12)
  );
}

.mediaThumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 58, 237, 0.16);
  overflow: hidden;
  background: radial-gradient(240px 180px at 40% 30%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(240, 171, 252, 0.16));
  position: relative;
}

.mediaThumb--video::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.22;
}

.playBadge {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(196, 181, 253, 0.36);
  box-shadow: 0 18px 50px rgba(124, 58, 237, 0.18);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
}

.playBadge::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid rgba(124, 58, 237, 0.9);
  transform: translateX(2px);
}

.photoCard__cap {
  margin-top: 10px;
  font-family: var(--fontScript);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(36, 10, 18, 0.72);
  font-size: 1.08rem;
}

.reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

@media (max-width: 520px) {
  .reasons {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .photoCard {
    padding: 8px 8px 10px;
    border-radius: 14px;
  }

  .photoCard img {
    border-radius: 10px;
  }

  .photoCard__cap {
    font-size: 0.95rem;
    margin-top: 6px;
  }
}

.reason {
  appearance: none;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadowTight);
  border-radius: 18px;
  padding: 12px 12px 14px;
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 10px;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.reason:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 52px rgba(32, 7, 14, 0.16);
}

.reason__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.reason__num {
  font-family: var(--fontTitle);
  font-weight: 800;
  color: rgba(76, 29, 149, 0.9);
}

.reason__state {
  font-size: 0.92rem;
  color: rgba(36, 10, 18, 0.56);
  font-weight: 700;
}

.reason__text {
  margin: 0;
  color: rgba(36, 10, 18, 0.74);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.reason.is-open {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.18),
    rgba(240, 171, 252, 0.16)
  );
  border-color: rgba(124, 58, 237, 0.24);
}

.loveLetter {
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadowTight);
  padding: 18px 18px 10px;
  max-width: 820px;
}

.loveLetter p {
  margin: 0 0 12px;
  font-size: 1.06rem;
  color: rgba(36, 10, 18, 0.76);
}

.loveLetter p:first-child::first-letter {
  font-family: var(--fontTitle);
  float: left;
  font-size: 3.2rem;
  line-height: 0.9;
  padding-right: 10px;
  padding-top: 6px;
  color: rgba(76, 29, 149, 0.92);
}

.signoff {
  margin-top: 12px;
  display: grid;
  gap: 4px;
  color: rgba(36, 10, 18, 0.84);
}

.signoff__name {
  font-family: var(--fontTitle);
  font-weight: 800;
  font-size: 1.4rem;
  color: rgba(76, 29, 149, 0.92);
}

.footer {
  padding: 56px 0 24px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.footer__card {
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: var(--radius);
  background: radial-gradient(
      520px 260px at 12% 18%,
      rgba(124, 58, 237, 0.16),
      transparent 60%
    ),
    radial-gradient(520px 260px at 86% 78%, rgba(240, 171, 252, 0.14), transparent 60%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.5));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadowTight);
  padding: 18px;
  max-width: 820px;
}

.footer__title {
  font-family: var(--fontTitle);
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.footer__text {
  margin: 0 0 14px;
  color: rgba(36, 10, 18, 0.72);
}

.footer__fine {
  color: rgba(36, 10, 18, 0.56);
}

.surprise {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 18px;
}

.surprise.is-active {
  display: grid;
}

.surprise__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 620px at 50% 40%, rgba(124, 58, 237, 0.28), transparent 62%),
    radial-gradient(860px 620px at 34% 70%, rgba(240, 171, 252, 0.2), transparent 64%),
    rgba(20, 6, 22, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.surprise__stage {
  position: relative;
  width: min(980px, 92vw);
  height: min(720px, 90vh);
  border-radius: 28px;
  border: 1px solid rgba(196, 181, 253, 0.22);
  background: radial-gradient(
      1200px 700px at 30% 30%,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.04) 42%,
      rgba(255, 255, 255, 0.02) 60%,
      transparent 72%
    ),
    linear-gradient(160deg, rgba(124, 58, 237, 0.18), rgba(240, 171, 252, 0.12));
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* When the letter is showing, allow scrolling so it isn't cut off on mobile. */
.surprise.is-letter .surprise__stage {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.surprise__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  border-color: rgba(196, 181, 253, 0.26);
  background: rgba(255, 255, 255, 0.76);
}

.gift {
  position: absolute;
  left: 50%;
  top: 58%;
  width: min(260px, 70vw);
  height: 190px;
  transform: translate(-50%, -50%);
  perspective: 900px;
  z-index: 1;
}

.surprise.is-active .gift {
  animation: giftPop 1100ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes giftPop {
  0% {
    transform: translate(-50%, -50%) scale(0.94);
  }
  56% {
    transform: translate(-50%, -50%) scale(1.03);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.gift__box {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64%;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(240, 171, 252, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 70px rgba(124, 58, 237, 0.22);
}

.gift__box::before {
  content: "";
  position: absolute;
  inset: 10px 14px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent);
  opacity: 0.8;
}

.gift__lid {
  position: absolute;
  left: -2%;
  right: -2%;
  top: 10%;
  height: 42%;
  border-radius: 20px;
  transform-origin: 50% 100%;
  transform: rotateX(0deg) translateY(0);
  background: linear-gradient(135deg, rgba(240, 171, 252, 0.95), rgba(124, 58, 237, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 26px 70px rgba(240, 171, 252, 0.18);
}

.gift__lid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  opacity: 0.9;
}

.gift__shine {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 560px;
  height: 560px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 50%, rgba(196, 181, 253, 0.22), transparent 62%);
  filter: blur(2px);
  opacity: 0;
  z-index: 0;
}

.surprise__burst {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

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

.polaroid {
  position: absolute;
  left: 50%;
  top: 58%;
  width: min(var(--w, 180px), 52vw);
  max-width: 230px;
  border-radius: 20px;
  padding: 10px 10px 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(196, 181, 253, 0.34);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, -50%) scale(0.18) rotate(0deg);
  opacity: 0;
  filter: saturate(1.06) contrast(1.03);
}

.polaroid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 86px;
  height: 34px;
  transform: translateX(-50%) rotate(-2deg);
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(196, 181, 253, 0.62),
    rgba(240, 171, 252, 0.22)
  );
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 40px rgba(124, 58, 237, 0.12);
  opacity: 0.85;
}

.polaroid__inner {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.14);
  background: rgba(255, 255, 255, 0.44);
}

.polaroid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

.surprise.is-active .polaroid {
  animation: polaroidFly 2800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.surprise.is-active .polaroid__inner {
  animation: polaroidFloat 6500ms ease-in-out infinite;
  animation-delay: calc(var(--delay, 0ms) + 2600ms);
}

.surprise.is-letter .polaroid {
  opacity: 0.22;
  filter: blur(0.25px) saturate(0.95);
}

@keyframes polaroidFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.14) rotate(-8deg);
  }
  12% {
    opacity: 1;
  }
  70% {
    transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px)))
      scale(var(--scalePop, 1.05)) rotate(var(--rot, 0deg));
  }
  100% {
    opacity: 1;
    transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px)))
      scale(var(--scale, 1)) rotate(var(--rot, 0deg));
  }
}

@keyframes polaroidFloat {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.6deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.ring {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  border: 2px solid rgba(196, 181, 253, 0.42);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.surprise.is-active .ring {
  animation: ringPulse 1800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes ringPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(var(--end, 12));
  }
}

.sparkle {
  position: absolute;
  left: 50%;
  top: 58%;
  width: var(--size, 6px);
  height: var(--size, 6px);
  border-radius: 999px;
  opacity: 0;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.96),
    rgba(240, 171, 252, 0.46),
    transparent 68%
  );
  filter: drop-shadow(0 18px 30px rgba(124, 58, 237, 0.22));
}

.surprise.is-active .sparkle {
  animation: sparkleFly 1600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes sparkleFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px)))
      scale(var(--scale, 1.4));
  }
}

.bloom {
  position: absolute;
  left: 50%;
  top: 58%;
  width: var(--size, 18px);
  height: var(--size, 18px);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.82), transparent 46%),
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, 0.18), transparent 58%),
    linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(240, 171, 252, 0.9));
  filter: drop-shadow(0 20px 28px rgba(124, 58, 237, 0.22));
}

.bloom::before,
.bloom::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: inherit;
  opacity: 0.9;
}

.bloom::before {
  transform: rotate(60deg);
}

.bloom::after {
  transform: rotate(-60deg);
}

.butterfly {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 118px;
  height: auto;
  fill: rgba(240, 171, 252, 0.88);
  opacity: 0;
  filter: drop-shadow(0 24px 34px rgba(196, 181, 253, 0.22));
  z-index: 4;
  transform: translate(-50%, -50%) scale(0.2) rotate(-8deg);
}

.surprise.is-active .butterfly path {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: flap 260ms ease-in-out infinite;
}

.finalLetter {
  position: relative;
  z-index: 5;
  width: min(760px, 92vw);
  border-radius: 26px;
  border: 1px solid rgba(196, 181, 253, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62));
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.28);
  padding: 18px 18px 12px;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.finalLetter p {
  margin: 0 0 12px;
  font-size: 1.06rem;
  color: rgba(36, 10, 18, 0.78);
}

.finalLetter p:first-child::first-letter {
  font-family: var(--fontTitle);
  float: left;
  font-size: 3.2rem;
  line-height: 0.9;
  padding-right: 10px;
  padding-top: 6px;
  color: rgba(124, 58, 237, 0.9);
}

.finalLetter__sig {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  color: rgba(36, 10, 18, 0.84);
}

.finalLetter__sigName {
  font-family: var(--fontTitle);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--wine);
}

.surprise.is-active .gift__shine {
  animation: shineIn 1600ms ease forwards;
}

.surprise.is-active .gift__lid {
  animation: lidOpen 1100ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.surprise.is-active .bloom {
  animation: bloomFly 2200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

.surprise.is-active .butterfly--1 {
  animation: fly1 2600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.surprise.is-active .butterfly--2 {
  animation: fly2 3000ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 200ms;
}

.surprise.is-letter .finalLetter {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes lidOpen {
  0% {
    transform: rotateX(0deg) translateY(0);
  }
  60% {
    transform: rotateX(55deg) translateY(-6px);
  }
  100% {
    transform: rotateX(140deg) translateY(-10px);
  }
}

@keyframes shineIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes bloomFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px)))
      scale(var(--scale, 1.1)) rotate(var(--rot, 220deg));
  }
}

@keyframes fly1 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.18) rotate(-10deg);
  }
  14% {
    opacity: 1;
  }
  60% {
    opacity: 1;
    transform: translate(calc(-50% + 90px), calc(-50% - 180px)) scale(0.78) rotate(12deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + 250px), calc(-50% - 260px)) scale(1) rotate(24deg);
  }
}

@keyframes fly2 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.16) rotate(8deg);
  }
  14% {
    opacity: 1;
  }
  60% {
    opacity: 1;
    transform: translate(calc(-50% - 70px), calc(-50% - 200px)) scale(0.72) rotate(-16deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% - 240px), calc(-50% - 280px)) scale(0.98) rotate(-26deg);
  }
}

@keyframes flap {
  0% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.78);
  }
  100% {
    transform: scaleX(1);
  }
}

.lightbox {
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 18px;
  padding: 0;
  width: min(980px, 92vw);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
}

.lightbox::backdrop {
  background: rgba(36, 10, 18, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.lightbox__chrome {
  display: flex;
  justify-content: flex-end;
  padding: 12px;
}

.iconBtn {
  appearance: none;
  cursor: pointer;
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 800;
  font-family: var(--fontBody);
}

.lightbox__body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px 14px;
}

.lightbox__figure {
  margin: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.lightbox__figure img {
  width: min(720px, 74vw);
  max-height: 72vh;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.64);
}

.lightbox__figure video {
  width: min(720px, 74vw);
  max-height: 72vh;
  border-radius: 16px;
  border: 1px solid rgba(124, 58, 237, 0.16);
  background: rgba(255, 255, 255, 0.64);
}

.lightbox__figure figcaption {
  text-align: center;
  color: rgba(36, 10, 18, 0.7);
  font-weight: 800;
}

.navBtn {
  appearance: none;
  cursor: pointer;
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 900;
  font-family: var(--fontBody);
  color: rgba(36, 10, 18, 0.84);
  box-shadow: var(--shadowTight);
  transition: transform 160ms ease, background 160ms ease;
}

.navBtn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.78);
}

.hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 7;
}

.heartPop {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--rose);
  border-radius: 4px;
  transform: translate(-50%, -50%) rotate(45deg) scale(1);
  animation: heartPop 880ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: drop-shadow(0 18px 30px rgba(124, 58, 237, 0.2));
}

.heartPop::before,
.heartPop::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--rose);
  border-radius: 999px;
}

.heartPop::before {
  top: -8px;
  left: 0;
}

.heartPop::after {
  top: 0;
  left: -8px;
}

@keyframes heartPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(8px) rotate(35deg) scale(0.6);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-68px) rotate(55deg) scale(1.2);
  }
}

@media (max-width: 540px) {
  .topbar__inner {
    padding: 12px 14px;
  }

  .brand__word {
    display: none;
  }

  .chip {
    padding: 10px 10px;
  }

  .lightbox {
    width: 96vw;
    border-radius: 14px;
  }

  .lightbox__body {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
  }

  .lightbox__figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .lightbox__figure img,
  .lightbox__figure video {
    width: 100%;
    max-height: 58vh;
  }

  #prevPhoto {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  #nextPhoto {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
  }
}

/* ─── Fix: iOS Safari "hold to see image" bug in transformed buttons ─── */
/* Ensure images in cards are always rendered, not deferred by iOS.          */
.photoCard,
.scrapbook__card {
  -webkit-transform: rotate(var(--tilt, 0deg));
  transform: rotate(var(--tilt, 0deg));
  isolation: isolate;
}

.photoCard img,
.scrapbook__frame img {
  display: block;
  position: relative;
  z-index: 1;
}

/* ─── Mobile performance: reduce expensive blur/filter effects ─── */
@media (max-width: 768px) {
  :root {
    --blur: 6px;
  }

  /* Remove backdrop-filter from decorative/secondary elements on mobile */
  .hero__badge,
  .hero__noteCard,
  .chip {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  /* Lighten the gate blur */
  .gate__bg {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }

  /* Scrapbook play button blur is costly on mobile */
  .scrapbook__play {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
