@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Italiana&display=swap");

:root {
  --night: #110c18;
  --night-soft: #1a1122;
  --cream: #fff9f2;
  --paper: #f5e9dc;
  --rose: #ff7f9d;
  --rose-soft: #f2aec0;
  --wine: #8f294b;
  --gold: #e9c98d;
  --lavender: #bda8ef;
  --mint: #a8d7c7;
  --ink: #2a2027;
  --muted: rgba(255, 249, 242, 0.58);
  --line: rgba(255, 255, 255, 0.13);
  --ease: cubic-bezier(0.2, 0.72, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--night);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 76% 22%, rgba(119, 64, 115, 0.2), transparent 32%),
    radial-gradient(circle at 15% 80%, rgba(111, 47, 74, 0.18), transparent 30%),
    var(--night);
  font-family: "DM Sans", sans-serif;
  font-weight: 300;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 5px;
}

.ambient-canvas,
.confetti-canvas,
.grain,
.cursor-light {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ambient-canvas {
  z-index: 0;
  opacity: 0.7;
}

.grain {
  z-index: 50;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-light {
  z-index: 1;
  width: 32rem;
  height: 32rem;
  margin: -16rem 0 0 -16rem;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(232, 118, 157, 0.12), transparent 68%);
  transition: opacity 0.4s ease;
}

body.has-pointer .cursor-light {
  opacity: 1;
}

.sound-toggle {
  position: fixed;
  z-index: 60;
  right: clamp(1rem, 2.6vw, 2.6rem);
  bottom: clamp(1rem, 2.2vw, 2rem);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(255, 249, 242, 0.62);
  background: rgba(18, 12, 24, 0.68);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sound-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 127, 157, 0.48);
  color: var(--cream);
}

.sound-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 12px;
}

.sound-bars i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
}

.sound-toggle[aria-pressed="true"] .sound-bars i {
  animation: sound-wave 0.8s ease-in-out infinite alternate;
}

.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(2) {
  animation-delay: -0.3s;
}

.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(3) {
  animation-delay: -0.55s;
}

.scene {
  position: fixed;
  z-index: 2;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.018);
  transition: opacity 0.8s ease, transform 1s var(--ease), visibility 0.8s;
}

.scene.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.scene:not(.is-active),
.scene:not(.is-active) * {
  pointer-events: none !important;
}

.intro {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.4rem, 3vw, 3rem) clamp(1.4rem, 5vw, 5.4rem);
  overflow: hidden;
}

.intro::before {
  content: "";
  position: absolute;
  top: 8%;
  right: 3%;
  width: min(48vw, 720px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  box-shadow:
    0 0 0 7vw rgba(255, 255, 255, 0.012),
    0 0 0 14vw rgba(255, 255, 255, 0.009);
}

.intro-header,
.journey-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.monogram,
.journey-logo {
  text-decoration: none;
  font-family: "Italiana", Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.monogram span,
.journey-logo span {
  display: inline-block;
  margin: 0 0.15em;
  color: var(--rose);
  animation: soft-beat 2.6s ease-in-out infinite;
}

.made-for,
.journey-side {
  color: rgba(255, 249, 242, 0.43);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 8rem);
  width: min(1380px, 100%);
  margin: auto;
}

.intro-copy {
  position: relative;
  z-index: 2;
}

.kicker {
  margin: 0 0 1.3rem;
  color: var(--rose-soft);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Italiana", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 850px;
  font-size: clamp(3.4rem, 6.5vw, 7.2rem);
  line-height: 0.93;
}

h1 em,
h2 em {
  color: var(--rose);
  font-weight: inherit;
  text-shadow: 0 0 40px rgba(255, 127, 157, 0.12);
}

.intro-lead {
  margin: clamp(1.6rem, 3vw, 2.6rem) 0 0;
  color: var(--muted);
  font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  line-height: 1.8;
}

.intro-reveal {
  opacity: 0;
  transform: translateY(25px);
  animation: intro-reveal 0.9s var(--ease) forwards;
}

.intro-copy .intro-reveal:nth-child(2) { animation-delay: 0.12s; }
.intro-copy .intro-reveal:nth-child(3) { animation-delay: 0.25s; }
.letter-wrap.intro-reveal { animation-delay: 0.35s; }

.letter-wrap {
  position: relative;
  width: min(100%, 520px);
  margin: auto;
  perspective: 1200px;
  transition: transform 0.25s ease-out;
}

.envelope {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.3;
  padding: 0;
  overflow: visible;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 35px 45px rgba(0, 0, 0, 0.35));
}

.envelope-back,
.envelope-front,
.envelope-flap {
  position: absolute;
  inset: 14% 2% 3%;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.envelope-back {
  border-radius: 5px;
  background: linear-gradient(145deg, #e6cbbc, #cfa7a2);
}

.envelope-front {
  z-index: 4;
  overflow: hidden;
  border-radius: 0 0 5px 5px;
  border-top: 0;
  background:
    linear-gradient(32deg, transparent 49.5%, rgba(110, 61, 72, 0.18) 50%, transparent 50.8%) left / 50% 100% no-repeat,
    linear-gradient(-32deg, transparent 49.5%, rgba(110, 61, 72, 0.16) 50%, transparent 50.8%) right / 50% 100% no-repeat,
    linear-gradient(135deg, transparent 50%, #dfbdb2 50.4%) left / 50.3% 100% no-repeat,
    linear-gradient(225deg, transparent 50%, #d5aea8 50.4%) right / 50.3% 100% no-repeat;
  pointer-events: none;
}

.envelope-flap {
  z-index: 5;
  bottom: auto;
  height: 58%;
  transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border: 0;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(165deg, #edcfc0, #d2aaa5);
  transition: transform 0.8s var(--ease), z-index 0s 0.35s;
}

.letter-paper {
  position: absolute;
  z-index: 3;
  top: 19%;
  right: 7%;
  left: 7%;
  display: flex;
  height: 72%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background:
    linear-gradient(rgba(124, 75, 89, 0.06) 1px, transparent 1px) 0 0 / 100% 2rem,
    #f8eee3;
  box-shadow: 0 8px 18px rgba(62, 28, 40, 0.22);
  transition: transform 1s 0.2s var(--ease), box-shadow 1s ease;
}

.paper-kicker {
  margin-bottom: 1.4rem;
  color: var(--wine);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.letter-paper strong {
  font-family: "Italiana", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  font-weight: 400;
  line-height: 1.02;
}

.paper-sign {
  margin-top: 1.3rem;
  color: var(--wine);
  font-family: Georgia, serif;
  font-size: 0.84rem;
  font-style: italic;
}

.wax-seal {
  position: absolute;
  z-index: 7;
  top: 52%;
  left: 50%;
  display: grid;
  width: clamp(4rem, 6vw, 5.3rem);
  height: clamp(4rem, 6vw, 5.3rem);
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.2), transparent 24%),
    radial-gradient(circle, #b94163 0 56%, #8f294b 58% 64%, transparent 65%),
    #a83356;
  box-shadow: 0 8px 18px rgba(70, 17, 36, 0.38);
  transition: opacity 0.35s ease, transform 0.45s var(--ease);
}

.wax-seal::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 226, 218, 0.45);
  border-radius: 50%;
}

.wax-seal i {
  font-family: Georgia, serif;
  font-size: 1.65rem;
  font-style: normal;
}

.envelope:hover .wax-seal {
  transform: translate(-50%, -50%) scale(1.08) rotate(-5deg);
}

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

.envelope.is-open .letter-paper {
  z-index: 6;
  transform: translateY(-35%);
  box-shadow: 0 24px 35px rgba(62, 28, 40, 0.25);
}

.envelope.is-open .wax-seal {
  opacity: 0;
  transform: translate(-50%, -80%) scale(0.55);
}

.open-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.5rem 0 0;
  color: rgba(255, 249, 242, 0.42);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.open-hint span {
  width: 2rem;
  height: 1px;
  background: var(--line);
}

.scroll-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 249, 242, 0.32);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scroll-note i {
  width: 4rem;
  height: 1px;
  background: var(--line);
}

.journey {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: clamp(1.2rem, 2.8vw, 2.6rem) clamp(1.2rem, 4vw, 4.5rem);
  overflow: hidden;
}

.journey-header {
  display: grid;
  grid-template-columns: 8rem minmax(260px, 510px) 8rem;
  gap: 2rem;
}

.journey-logo {
  justify-self: start;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.chapter-progress {
  width: 100%;
}

.chapter-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  color: rgba(255, 249, 242, 0.48);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.chapter-meta b {
  color: var(--rose-soft);
  font-weight: 500;
}

.progress-line {
  height: 2px;
  overflow: hidden;
  background: var(--line);
}

.progress-line i {
  display: block;
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, var(--wine), var(--rose));
  transition: width 0.8s var(--ease);
}

.journey-side {
  justify-self: end;
}

.chapters {
  position: relative;
  min-height: 0;
}

.chapter {
  position: absolute;
  inset: 0;
  display: grid;
  width: min(1380px, 100%);
  margin: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(70px);
  transition: opacity 0.55s ease, transform 0.8s var(--ease), visibility 0.55s;
}

.chapter.is-current {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.chapter.is-past {
  transform: translateX(-70px);
}

.chapter h2 {
  font-size: clamp(2.8rem, 5.3vw, 6rem);
  line-height: 0.95;
}

.chapter-copy > p:not(.kicker),
.stars-intro > p:not(.kicker),
.invite-copy > p:not(.kicker) {
  max-width: 560px;
  margin: 1.5rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.bloom-chapter {
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 2rem 6vw;
  padding: 2rem 2vw 1rem;
}

.discovery-count {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
  color: rgba(255, 249, 242, 0.42);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.discovery-count span {
  color: var(--rose);
  font-family: "Italiana", Georgia, serif;
  font-size: 1.5rem;
}

.bloom-stage {
  position: relative;
  display: grid;
  width: min(62vh, 620px);
  max-width: 100%;
  aspect-ratio: 1;
  place-items: center;
  justify-self: center;
  transition: transform 0.25s ease-out;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
}

.orbit-one {
  inset: 11%;
  animation: orbit-spin 20s linear infinite;
}

.orbit-one::before,
.orbit-two::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 18px var(--rose);
}

.orbit-two {
  inset: 22%;
  border-style: dashed;
  opacity: 0.65;
  animation: orbit-spin 14s linear infinite reverse;
}

.pulse-heart {
  position: relative;
  z-index: 4;
  display: grid;
  width: 9.5rem;
  height: 9.5rem;
  place-items: center;
  border: 1px solid rgba(255, 127, 157, 0.35);
  border-radius: 50%;
  color: var(--cream);
  background: radial-gradient(circle, rgba(143, 41, 75, 0.75), rgba(73, 28, 56, 0.45));
  box-shadow: 0 0 0 1.2rem rgba(255, 127, 157, 0.025), 0 0 70px rgba(255, 85, 139, 0.14);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}

.pulse-heart::after {
  content: "";
  position: absolute;
  inset: -1.2rem;
  border: 1px solid rgba(255, 127, 157, 0.16);
  border-radius: 50%;
  animation: pulse-ring 2.2s ease-out infinite;
}

.pulse-heart:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 1.2rem rgba(255, 127, 157, 0.045), 0 0 85px rgba(255, 85, 139, 0.24);
}

.pulse-heart span {
  align-self: end;
  font-family: Georgia, serif;
  font-size: 4rem;
  line-height: 1;
}

.pulse-heart small {
  align-self: start;
  color: rgba(255, 249, 242, 0.55);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pulse-heart.is-complete span {
  color: var(--rose);
  animation: soft-beat 1.4s ease-in-out infinite;
}

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

.reason-petal {
  position: absolute;
  display: grid;
  width: clamp(5.4rem, 8vw, 7rem);
  aspect-ratio: 1.6;
  place-items: center;
  padding: 0.7rem;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3) rotate(var(--rotation));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 62% 38% 62% 38% / 62% 38% 62% 38%;
  color: rgba(255, 249, 242, 0.8);
  background: rgba(78, 34, 62, 0.72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  text-align: center;
  font-family: Georgia, serif;
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
  font-style: italic;
  animation: petal-pop 0.7s var(--ease) forwards;
}

.bloom-caption {
  position: absolute;
  right: 10%;
  bottom: 4%;
  left: 10%;
  color: rgba(255, 249, 242, 0.48);
  text-align: center;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-style: italic;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

.bloom-caption.is-changing {
  opacity: 0;
  transform: translateY(6px);
}

.next-chapter {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: end;
}

.magnetic-button {
  display: inline-flex;
  align-items: center;
  gap: 1.3rem;
  padding: 0.6rem 0.65rem 0.6rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  transition: opacity 0.3s ease, transform 0.3s var(--ease), background 0.3s ease, border-color 0.3s ease;
}

.magnetic-button i {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 50%;
  color: var(--night);
  background: var(--cream);
  font-style: normal;
  font-size: 1rem;
}

.magnetic-button:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: rgba(255, 127, 157, 0.48);
  background: rgba(143, 41, 75, 0.3);
}

.magnetic-button:disabled {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.stars-chapter {
  grid-template-columns: minmax(320px, 0.65fr) minmax(520px, 1.35fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 3rem;
  padding: 2rem 2vw 1rem;
}

.stars-intro h2 {
  font-size: clamp(2.6rem, 4.5vw, 5.2rem);
}

.constellation {
  position: relative;
  width: 100%;
  min-height: min(60vh, 590px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50% 44% 48% 46%;
  background:
    radial-gradient(circle at 30% 30%, rgba(189, 168, 239, 0.1), transparent 24%),
    radial-gradient(circle at 72% 66%, rgba(255, 127, 157, 0.09), transparent 28%);
}

.constellation svg {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  overflow: visible;
}

.constellation path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.11);
  stroke-width: 1;
  stroke-dasharray: 5 9;
}

.star-node {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 0.35rem;
  padding: 0;
  color: rgba(255, 249, 242, 0.5);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 0.3s ease, transform 0.3s var(--ease);
}

.star-node i {
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(233, 201, 141, 0.45));
  font-style: normal;
  font-size: 2rem;
  animation: twinkle 2.5s ease-in-out infinite;
}

.star-node span {
  font-size: 0.57rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.star-node:hover,
.star-node.is-lit {
  transform: scale(1.08);
  color: var(--cream);
}

.star-node.is-lit i {
  color: white;
  filter: drop-shadow(0 0 13px var(--gold));
}

.star-a { top: 19%; left: 16%; }
.star-b { top: 15%; right: 18%; }
.star-c { right: 12%; bottom: 19%; }
.star-d { bottom: 16%; left: 16%; }
.star-b i { animation-delay: -0.8s; }
.star-c i { animation-delay: -1.5s; }
.star-d i { animation-delay: -2.1s; }

.star-message {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: min(58%, 430px);
  transform: translate(-50%, -50%);
  text-align: center;
}

.star-message span {
  color: var(--rose-soft);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.star-message p {
  margin: 0.9rem 0 0;
  font-family: "Italiana", Georgia, serif;
  font-size: clamp(1.3rem, 2.4vw, 2.2rem);
  line-height: 1.25;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

.star-message.is-changing p {
  opacity: 0;
  transform: translateY(8px);
}

.quiz-chapter {
  grid-template-columns: minmax(380px, 0.85fr) minmax(440px, 1.15fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 9rem);
  padding: 2rem 6vw;
}

.quiz-visual {
  position: relative;
  display: grid;
  min-height: min(68vh, 650px);
  place-items: center;
  transition: transform 0.25s ease-out;
}

.quiz-halo {
  position: absolute;
  width: 90%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(255,255,255,.008), 0 0 0 8rem rgba(255,255,255,.005);
}

.polaroid-stack {
  position: relative;
  width: min(360px, 70%);
  aspect-ratio: 0.78;
}

.polaroid-stack > div {
  position: absolute;
  inset: 0;
  transform: rotate(-8deg) translate(-10%, 2%);
  background: rgba(255,255,255,.09);
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.28);
}

.polaroid-stack > div:nth-child(2) {
  transform: rotate(7deg) translate(10%, 0);
  background: rgba(166, 125, 156, 0.18);
}

.polaroid-stack .main-polaroid {
  display: grid;
  padding: 1rem 1rem 1.6rem;
  place-items: center;
  transform: rotate(-1.5deg);
  color: var(--ink);
  background: #f6eae0;
}

.main-polaroid::before {
  content: "";
  position: absolute;
  inset: 1rem 1rem 25%;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.75), transparent 8%),
    linear-gradient(145deg, #c7b1e8, #efb0bd 55%, #e8c49d);
}

.main-polaroid span {
  position: relative;
  z-index: 1;
  align-self: center;
  color: white;
  font-family: Georgia, serif;
  font-size: 7rem;
  filter: drop-shadow(0 10px 16px rgba(94, 45, 67, .17));
}

.main-polaroid p {
  position: relative;
  z-index: 1;
  align-self: end;
  margin: 0;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.4;
}

.quiz-panel {
  max-width: 610px;
}

.quiz-dots {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.quiz-dots i {
  display: block;
  width: 2.4rem;
  height: 2px;
  background: rgba(255,255,255,.13);
}

.quiz-dots i.is-done,
.quiz-dots i.is-current {
  background: var(--rose);
}

.quiz-question {
  transition: opacity 0.25s ease, transform 0.35s var(--ease);
}

.quiz-question.is-changing {
  opacity: 0;
  transform: translateY(12px);
}

.quiz-question > span {
  color: rgba(255,249,242,.42);
  font-size: .56rem;
  font-weight: 500;
  letter-spacing: .16em;
}

.quiz-question h2 {
  margin-top: 1rem;
  font-size: clamp(2.7rem, 4.6vw, 5.2rem);
}

.quiz-question p {
  margin: 1.2rem 0 1.8rem;
  color: var(--muted);
  line-height: 1.7;
}

.quiz-answers {
  display: grid;
  gap: .7rem;
}

.quiz-answers button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: rgba(255,249,242,.78);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  text-align: left;
  font-size: .76rem;
  letter-spacing: .04em;
  transition: border-color .3s ease, color .3s ease, transform .3s var(--ease);
}

.quiz-answers button::after {
  content: "♡";
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: var(--night);
  background: var(--cream);
}

.quiz-answers button::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-102%);
  background: linear-gradient(90deg, rgba(143,41,75,.55), rgba(255,127,157,.18));
  transition: transform .4s var(--ease);
}

.quiz-answers button:hover {
  transform: translateX(5px);
  border-color: rgba(255,127,157,.42);
  color: white;
}

.quiz-answers button:hover::before { transform: translateX(0); }
.quiz-answers button span { position: relative; z-index: 1; }

.no-option {
  margin-top: 1rem;
  color: rgba(255,249,242,.3);
  font-family: Georgia, serif;
  font-size: .7rem;
  font-style: italic;
}

.invite-chapter {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .7fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  padding: 2rem 5vw;
}

.invite-copy h2 {
  font-size: clamp(2.8rem, 4.8vw, 5.5rem);
}

.date-options {
  display: grid;
  margin-top: 2.2rem;
  border-top: 1px solid var(--line);
}

.date-options button {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem .5rem;
  border-bottom: 1px solid var(--line);
  color: rgba(255,249,242,.6);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color .25s ease, padding .3s var(--ease), background .25s ease;
}

.date-options button:hover,
.date-options button.is-selected {
  padding-right: 1rem;
  padding-left: 1rem;
  color: white;
  background: rgba(255,255,255,.045);
}

.date-options button > span {
  color: var(--rose);
  font-family: "Italiana", Georgia, serif;
}

.date-options button b {
  font-family: "Italiana", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
}

.date-options button small {
  color: rgba(255,249,242,.38);
  font-size: .63rem;
}

.date-ticket {
  position: relative;
  width: min(420px, 100%);
  justify-self: center;
  transform: rotate(2deg);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 35px 70px rgba(0,0,0,.35);
  transition: transform .6s var(--ease), box-shadow .4s ease;
}

.date-ticket::before,
.date-ticket::after {
  content: "";
  position: absolute;
  top: 68%;
  width: 1.6rem;
  height: 1.6rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--night);
}

.date-ticket::before { left: -.8rem; }
.date-ticket::after { right: -.8rem; }

.date-ticket.has-choice {
  transform: rotate(-1deg) translateY(-5px);
  box-shadow: 0 42px 80px rgba(0,0,0,.42);
}

.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  color: white;
  background: var(--wine);
  font-size: .57rem;
  font-weight: 600;
  letter-spacing: .18em;
}

.ticket-top i {
  font-family: Georgia, serif;
  font-size: 1.2rem;
  font-style: normal;
}

.ticket-body {
  padding: 2rem 2rem 1.6rem;
}

.ticket-body > small {
  color: rgba(42,32,39,.5);
  font-size: .5rem;
  font-weight: 600;
  letter-spacing: .16em;
}

.ticket-body > strong {
  display: block;
  min-height: 5.5rem;
  margin: .8rem 0 1.5rem;
  font-family: "Italiana", Georgia, serif;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 400;
  line-height: 1.08;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  padding: .7rem 0;
  border-top: 1px dashed rgba(42,32,39,.25);
  font-size: .61rem;
}

.ticket-row span { color: rgba(42,32,39,.5); text-transform: uppercase; letter-spacing: .1em; }
.ticket-row b { font-weight: 500; }

.final-button {
  width: 100%;
  padding: 1rem;
  color: white;
  background: var(--ink);
  cursor: pointer;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .05em;
  transition: background .3s ease, opacity .3s ease;
}

.final-button span { margin-left: .5rem; color: var(--rose); }
.final-button:hover:not(:disabled) { background: var(--wine); }
.final-button:disabled { opacity: .34; cursor: not-allowed; }

.finale {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 3rem 1.5rem;
  text-align: center;
}

.finale::before {
  content: "";
  position: absolute;
  width: min(68vw, 900px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143,41,75,.26), rgba(100,52,95,.08) 42%, transparent 68%);
  animation: final-glow 4s ease-in-out infinite alternate;
}

.confetti-canvas {
  z-index: 4;
}

.final-orbit {
  position: absolute;
  width: min(73vh, 760px);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  animation: orbit-spin 30s linear infinite;
}

.final-orbit::before {
  content: "✦";
  position: absolute;
  top: 10%;
  left: 11%;
  color: var(--gold);
}

.final-orbit.orbit-b {
  width: min(92vh, 950px);
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 42s;
}

.final-content {
  position: relative;
  z-index: 3;
  max-width: 960px;
}

.final-heart {
  position: relative;
  display: grid;
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.4rem;
  place-items: center;
  border: 1px solid rgba(255,127,157,.28);
  border-radius: 50%;
  color: var(--rose);
  font-family: Georgia, serif;
  font-size: 3rem;
  animation: final-heart-in .9s var(--ease) both;
}

.final-heart i {
  position: absolute;
  inset: -.7rem;
  border: 1px solid rgba(255,127,157,.14);
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}

.final-content h2 {
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: .92;
}

.final-copy {
  margin: 1.6rem 0;
  color: var(--muted);
  line-height: 1.75;
}

.final-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.share-button {
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.22);
  color: rgba(255,249,242,.62);
  background: transparent;
  cursor: pointer;
  font-size: .67rem;
}

.share-button span { margin-left: .5rem; color: var(--rose); }

.signature {
  margin: 1.6rem 0 0;
  color: var(--rose-soft);
  font-family: Georgia, serif;
  font-size: .78rem;
  font-style: italic;
}

.toast {
  position: fixed;
  z-index: 80;
  bottom: 1.5rem;
  left: 50%;
  max-width: calc(100vw - 2rem);
  padding: .8rem 1.1rem;
  opacity: 0;
  transform: translate(-50%, 18px);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(28,18,33,.9);
  box-shadow: 0 15px 40px rgba(0,0,0,.28);
  backdrop-filter: blur(14px);
  pointer-events: none;
  text-align: center;
  font-size: .67rem;
  transition: opacity .3s ease, transform .3s var(--ease);
}

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

@keyframes intro-reveal {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes soft-beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.15); }
  24% { transform: scale(1); }
}

@keyframes sound-wave {
  to { height: 12px; }
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
  0% { opacity: .8; transform: scale(.88); }
  80%, 100% { opacity: 0; transform: scale(1.22); }
}

@keyframes petal-pop {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(var(--rotation)); }
}

@keyframes twinkle {
  0%, 100% { opacity: .45; transform: scale(.86) rotate(0); }
  50% { opacity: 1; transform: scale(1.15) rotate(12deg); }
}

@keyframes final-glow {
  to { transform: scale(1.15); opacity: .7; }
}

@keyframes final-heart-in {
  from { opacity: 0; transform: scale(.25) rotate(-20deg); }
}

@media (max-width: 980px) {
  .intro-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); gap: 2rem; }
  h1 { font-size: clamp(3.2rem, 7.4vw, 5.3rem); }
  .journey-side { display: none; }
  .journey-header { grid-template-columns: 5rem 1fr 5rem; }
  .chapter { overflow-y: auto; }
  .bloom-chapter,
  .stars-chapter,
  .quiz-chapter,
  .invite-chapter { gap: 2.5rem; padding-right: 1rem; padding-left: 1rem; }
  .bloom-chapter { grid-template-columns: .8fr 1.2fr; }
  .stars-chapter { grid-template-columns: .7fr 1.3fr; }
  .quiz-chapter { grid-template-columns: .8fr 1.2fr; }
  .invite-chapter { grid-template-columns: 1fr .72fr; }
  .date-options button { grid-template-columns: 2rem 1fr; }
  .date-options button small { display: none; }
}

@media (max-width: 720px) {
  body { overflow-y: auto; }
  .cursor-light { display: none; }
  .sound-toggle { right: 1rem; bottom: 1rem; }
  .sound-toggle [data-sound-label] { display: none; }
  .intro { min-height: 100dvh; overflow-y: auto; padding: 1.3rem 1.15rem 2.5rem; }
  .made-for { max-width: 180px; text-align: right; font-size: .48rem; }
  .intro-layout { grid-template-columns: minmax(0, 1fr); gap: 2.6rem; padding: 4rem 0 2rem; text-align: center; }
  .intro-copy { min-width: 0; }
  .kicker { font-size: .55rem; }
  h1 { font-size: clamp(2.65rem, 12.6vw, 4rem); line-height: .97; }
  .intro-lead { font-size: .88rem; }
  .desktop { display: none; }
  .letter-wrap { width: min(90vw, 420px); }
  .letter-paper strong { font-size: clamp(1.5rem, 7vw, 2.3rem); }
  .scroll-note { justify-content: center; }
  .journey { min-height: 100dvh; overflow: hidden; padding: 1.1rem 1rem 1.4rem; }
  .journey-header { grid-template-columns: 3.5rem 1fr 3.5rem; gap: .7rem; }
  .chapter-meta span:first-child { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chapter { display: block; overflow-y: auto; padding: 3.2rem .2rem 5rem; text-align: center; }
  .chapter h2 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .chapter-copy > p:not(.kicker),
  .stars-intro > p:not(.kicker),
  .invite-copy > p:not(.kicker) { margin-right: auto; margin-left: auto; font-size: .88rem; }
  .discovery-count { margin-top: 1.4rem; }
  .bloom-stage { width: min(92vw, 480px); margin: 1.2rem auto; }
  .pulse-heart { width: 7.7rem; height: 7.7rem; }
  .pulse-heart span { font-size: 3.2rem; }
  .reason-petal { width: 5.4rem; font-size: .64rem; }
  .bloom-caption { bottom: 1%; }
  .next-chapter { margin: 1.2rem auto 0; }
  .stars-intro h2 { font-size: clamp(2.5rem, 11vw, 3.8rem); }
  .constellation { min-height: 440px; margin-top: 1.8rem; border-radius: 46% 54% 48% 52%; }
  .star-node span { display: none; }
  .star-node i { font-size: 2.2rem; }
  .star-message { width: 64%; }
  .star-message p { font-size: clamp(1.15rem, 5.3vw, 1.55rem); }
  .quiz-visual { min-height: 390px; margin-bottom: 1rem; }
  .polaroid-stack { width: min(250px, 65%); }
  .main-polaroid span { font-size: 5rem; }
  .quiz-panel { margin: auto; text-align: left; }
  .quiz-panel .kicker { text-align: center; }
  .quiz-dots { justify-content: center; }
  .quiz-question h2 { font-size: clamp(2.65rem, 11.5vw, 3.7rem); text-align: center; }
  .quiz-question > span { display: block; text-align: center; }
  .quiz-question p,
  .no-option { text-align: center; }
  .invite-copy h2 { font-size: clamp(2.55rem, 11vw, 3.8rem); }
  .date-options { text-align: left; }
  .date-ticket { margin: 3rem auto 1rem; text-align: left; }
  .finale { min-height: 100dvh; overflow-y: auto; padding: 4rem 1rem; }
  .final-content h2 { font-size: clamp(2.7rem, 11.5vw, 4.2rem); }
  .final-actions { flex-direction: column; }
  .signature { max-width: 280px; margin-right: auto; margin-left: auto; }
}

@media (max-height: 720px) and (min-width: 721px) {
  h1 { font-size: clamp(3rem, 5.7vw, 5rem); }
  .intro-lead { margin-top: 1.3rem; }
  .letter-wrap { width: min(43vh, 420px); }
  .chapter h2 { font-size: clamp(2.6rem, 4.6vw, 4.6rem); }
  .bloom-stage { width: min(54vh, 500px); }
  .constellation { min-height: 54vh; }
  .quiz-visual { min-height: 54vh; }
  .polaroid-stack { width: min(280px, 64%); }
}

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