:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --paper: #ffffff;
  --paper-deep: #f8fafc;
  --accent: #50c878;
  --accent-dark: #3ba864;
  --shadow: rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter Tight", "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  background: var(--paper);
}

body.is-journey-locked {
  overflow: hidden;
  height: 100%;
  touch-action: none;
}

body.is-locked {
  overflow: hidden;
}

body.is-locked main,
body.is-locked .footer {
  display: none;
}

.music-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 11;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: opacity 0.3s ease, background 0.3s ease;
  opacity: 0.6;
}

.music-toggle:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.95);
}

body.is-locked .music-toggle {
  display: none;
}

.device-alert {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  padding: 2rem;
  text-align: center;
}

.device-alert-card {
  background: #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 20px;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.2);
  font-size: 1.1rem;
  color: var(--ink);
}

body.is-mobile-blocked {
  overflow: hidden;
}

body.is-mobile-blocked .device-alert {
  display: flex;
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: none;
  pointer-events: none;
}

.confetti.is-active {
  display: block;
}

.confetti img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.journey-intro {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  gap: 2.5rem;
  padding: 2rem;
}

body.is-journey-intro {
  overflow: hidden;
}

body.is-journey-intro .journey-intro {
  display: flex;
}

.journey-map-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
  background: #ffffff;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  align-items: center;
  width: min(900px, 94vw);
}

.journey-map {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  background: linear-gradient(140deg, #f8fafc 0%, #ecfdf5 65%, #ffffff 100%);
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.journey-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.journey-route path {
  fill: none;
  stroke: rgba(15, 23, 42, 0.2);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 10 10;
}

.journey-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  font-size: 0.75rem;
  color: var(--ink);
}

.journey-marker-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(15, 23, 42, 0.4);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.journey-marker-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.55rem;
  color: var(--ink-soft);
}

.journey-marker.is-reached .journey-marker-dot {
  border-color: rgba(80, 200, 120, 0.9);
  background: rgba(80, 200, 120, 0.25);
}

.journey-marker.is-active .journey-marker-dot {
  border-color: rgba(225, 29, 72, 0.9);
  box-shadow: 0 0 20px rgba(225, 29, 72, 0.35);
}

.journey-car-map {
  position: absolute;
  left: 0;
  top: 0;
  width: 74px;
  height: 30px;
  transform: translate(24px, 200px);
  z-index: 2;
  pointer-events: none;
}

.journey-car-map.is-resetting {
  transition: transform 0.45s ease;
}

.journey-car-map svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: #0f172a;
  filter: drop-shadow(0 10px 16px rgba(15, 23, 42, 0.25));
}

.journey-car-avatar {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  overflow: hidden;
  background: #f1f5f9;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.2);
}

.journey-car-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.journey-map-panel {
  max-width: 600px;
  text-align: center;
  margin: 0 auto;
}

.journey-intro-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.journey-intro-title {
  margin: 0 0 0.8rem;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
}

.journey-intro-copy {
  margin: 0 0 1.6rem;
  color: var(--ink-soft);
}

.journey-slider {
  margin-top: 1.6rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  --slider-progress: 0%;
}

.journey-slider-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.journey-slider-track {
  position: relative;
  width: min(320px, 80vw);
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.journey-slider-fill {
  position: absolute;
  inset: 0;
  width: var(--slider-progress);
  background: linear-gradient(90deg, rgba(80, 200, 120, 0.4), rgba(80, 200, 120, 0.9));
  transition: width 0.1s ease;
}

.journey-slider-input {
  appearance: none;
  width: min(320px, 80vw);
  height: 26px;
  background: transparent;
  cursor: pointer;
}

.journey-slider-input:focus {
  outline: none;
}

.journey-slider-input::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(80, 200, 120, 0.9);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.journey-slider-input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(80, 200, 120, 0.9);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.journey-slider-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chapter-continue:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chapter-continue {
  margin-top: 2rem;
  border: none;
  background: var(--accent);
  color: #ffffff;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.chapter-continue:hover {
  background: var(--accent-dark);
}


.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(140deg, #ecfdf5 0%, #f8fafc 45%, #d1fae5 100%);
  background-size: 180% 180%;
  animation: authGlow 18s ease infinite;
}

.auth-gate.is-hidden {
  display: none;
}

.auth-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(300px, 1fr);
  background: #ffffff;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.16);
}

.auth-media {
  position: relative;
  background: #0f172a;
  align-self: stretch;
  min-height: 0;
}

.auth-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: saturate(0.85) contrast(1.05);
}

.auth-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.75) 0%,
    rgba(15, 23, 42, 0.15) 60%,
    rgba(80, 200, 120, 0.35) 100%
  );
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 2.4rem;
}

.auth-media-title {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 500;
}

.auth-media-copy {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

@keyframes authGlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.auth-card {
  width: 100%;
  background: #ffffff;
  padding: 2rem 2.2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.auth-title {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
}

.auth-subtitle {
  margin: 0 0 1.8rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}

.auth-field input {
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
}

.auth-field input:focus {
  outline: 2px solid rgba(16, 185, 129, 0.35);
  border-color: rgba(16, 185, 129, 0.6);
}

.auth-error {
  min-height: 1.2rem;
  color: #b91c1c;
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
}

.auth-submit {
  width: 100%;
  border: none;
  background: var(--accent);
  color: #ffffff;
  padding: 0.85rem 1.2rem;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-submit:hover {
  transform: translateY(-2px);
  background: var(--accent-dark);
  box-shadow: 0 18px 40px rgba(225, 29, 72, 0.25);
}

.auth-hint {
  margin: 1.4rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.auth-hint code {
  font-family: "Inter Tight", "Inter", system-ui, sans-serif;
  font-weight: 600;
}

.veil {
  display: none;
}

main {
  position: relative;
  z-index: 1;
}

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
}

.landing-inner {
  max-width: 680px;
}

.whisper {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

h1 {
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin: 0 0 1rem;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}

.begin {
  border: none;
  background: var(--accent);
  color: #ffffff;
  padding: 0.9rem 2.6rem;
  font-size: 1rem;
  font-family: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.3s ease, box-shadow 0.3s ease,
    background 0.3s ease;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.25);
  border-radius: 999px;
}

.begin:hover {
  transform: translateY(-2px);
  background: var(--accent-dark);
  box-shadow: 0 22px 50px rgba(5, 150, 105, 0.28);
}

.hero-photos {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  isolation: isolate;
}

.hero-photo {
  position: relative;
  width: 220px;
  transform-origin: top center;
}

.hero-photo-right {
  margin-left: -32px;
  z-index: 1;
}

.hero-photo-frame {
  background: #ffffff;
  padding: 0.8rem 0.8rem 1.8rem;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(15, 23, 42, 0.12);
  transform: rotate(-4deg);
  transform-origin: 50% -8px;
  animation: swingLeftLoop 6s ease-in-out infinite;
}

.hero-photo-right .hero-photo-frame {
  transform: rotate(4deg) translateY(10px);
  animation: swingRightLoop 6s ease-in-out infinite;
}

.hero-photo-frame img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: #f1f5f9;
  filter: saturate(30%);
}

.love-bubbles {
  position: absolute;
  left: 50%;
  top: 120px;
  width: 200px;
  height: 120px;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.love-bubbles span {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: var(--size, 18px);
  line-height: 1;
  transform: translate(var(--x0), var(--y0)) scale(0);
  opacity: 0;
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.25));
  animation: heartBurst 6s ease-in-out infinite;
}

@keyframes swingLeftLoop {
  0% {
    transform: rotate(-18deg);
  }
  35% {
    transform: rotate(6deg);
  }
  50% {
    transform: rotate(-4deg);
  }
  100% {
    transform: rotate(-18deg);
  }
}

@keyframes swingRightLoop {
  0% {
    transform: rotate(18deg) translateY(10px);
  }
  35% {
    transform: rotate(-6deg) translateY(10px);
  }
  50% {
    transform: rotate(4deg) translateY(10px);
  }
  100% {
    transform: rotate(18deg) translateY(10px);
  }
}

@keyframes heartBurst {
  0%,
  40% {
    transform: translate(var(--x0), var(--y0)) scale(0);
    opacity: 0;
  }
  48% {
    opacity: 1;
  }
  70% {
    transform: translate(var(--x1), var(--y1)) scale(1.4);
    opacity: 0.7;
  }
  85% {
    transform: translate(var(--x2), var(--y2)) scale(1.05);
    opacity: 0.2;
  }
  100% {
    transform: translate(var(--x2), var(--y2)) scale(0.7);
    opacity: 0;
  }
}

@keyframes pinPulse {
  0% {
    transform: scale(0.7);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes heartFloat {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  60% {
    transform: translateY(-60px) scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-110px) scale(0.9);
    opacity: 0;
  }
}

@keyframes closurePulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes balloonFloat {
  0% {
    transform: translateY(0) scale(0.95);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  60% {
    transform: translateY(-120px) scale(1.02);
    opacity: 0.95;
  }
  100% {
    transform: translateY(-200px) scale(0.9);
    opacity: 0;
  }
}


.hero-photo .pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #cbd5f5 35%, #8b9acf 100%);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.25);
  z-index: 2;
}

.chapters {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  display: grid;
  gap: 3.5rem;
  position: relative;
  --journey-progress: 0%;
  --journey-position: 0px;
}

.chapters::before {
  content: "";
  position: absolute;
  left: clamp(10px, 3vw, 28px);
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.1) 0%,
    rgba(15, 23, 42, 0.05) 100%
  );
  border-radius: 999px;
}

.chapters::after {
  content: "";
  position: absolute;
  left: clamp(10px, 3vw, 28px);
  top: 0;
  width: 2px;
  height: var(--journey-progress);
  background: linear-gradient(
    180deg,
    rgba(80, 200, 120, 0.3) 0%,
    rgba(80, 200, 120, 0.85) 60%,
    rgba(225, 29, 72, 0.85) 100%
  );
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(80, 200, 120, 0.35);
}

.journey-pin {
  position: absolute;
  left: clamp(10px, 3vw, 28px);
  top: var(--journey-position);
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  border: 2px solid rgba(80, 200, 120, 0.8);
  z-index: 3;
  display: grid;
  place-items: center;
}

.journey-car {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 24px;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.25));
  z-index: 1;
}

.journey-car svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: #0f172a;
}

.journey-pin img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #f1f5f9;
}

.journey-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(80, 200, 120, 0.5);
  animation: pinPulse 2.8s ease-out infinite;
}

.journey-ring.delay {
  animation-delay: 1.4s;
}

.chapter {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 2.5rem;
  box-shadow: 0 20px 50px var(--shadow);
  border-radius: 24px;
  filter: grayscale(30%) saturate(80%);
  transition: filter 1.2s ease, box-shadow 1.2s ease;
}

.chapter-locked {
  display: none;
}

.chapter-sentinel {
  width: 100%;
  height: 1px;
}

.chapter.final {
  border-color: rgba(16, 185, 129, 0.35);
}

.closure-overlay {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
}

.closure-overlay.is-visible {
  display: flex;
}

.closure-card {
  position: relative;
  padding: 3rem 2.5rem;
  border-radius: 28px;
  background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 100%);
  border: 1px solid rgba(80, 200, 120, 0.25);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.16);
  text-align: center;
  overflow: hidden;
  max-width: 680px;
}

.closure-video {
  width: 100%;
  max-height: 360px;
  border-radius: 18px;
  background: #0f172a;
  display: block;
  margin-bottom: 1.5rem;
  width: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

.closure-text {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 500;
  color: var(--ink);
  position: relative;
  z-index: 2;
}

.closure-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(
    circle at center,
    rgba(80, 200, 120, 0.35) 0%,
    rgba(80, 200, 120, 0.1) 35%,
    rgba(80, 200, 120, 0) 70%
  );
  opacity: 0.6;
  animation: closurePulse 6s ease-in-out infinite;
  z-index: 0;
}

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

.balloon {
  position: absolute;
  bottom: -40px;
  width: 44px;
  height: 58px;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(160deg, rgba(80, 200, 120, 0.9), #ffffff);
  animation: balloonFloat 6.5s ease-in-out infinite;
  opacity: 0.9;
}

.balloon::after {
  content: "";
  position: absolute;
  bottom: -26px;
  left: 50%;
  width: 2px;
  height: 26px;
  background: rgba(15, 23, 42, 0.15);
}

.balloon-1 {
  left: 12%;
  animation-delay: 0s;
}

.balloon-2 {
  left: 28%;
  width: 36px;
  height: 48px;
  animation-delay: 1.2s;
}

.balloon-3 {
  right: 24%;
  background: linear-gradient(160deg, rgba(225, 29, 72, 0.9), #ffffff);
  animation-delay: 2.4s;
}

.balloon-4 {
  right: 10%;
  width: 40px;
  height: 52px;
  background: linear-gradient(160deg, rgba(225, 29, 72, 0.85), #ffffff);
  animation-delay: 3.2s;
}

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

.closure-hearts span {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0;
  animation: heartFloat 6s ease-in-out infinite;
}

.closure-hearts span:nth-child(1) {
  left: 12%;
  bottom: 10%;
  animation-delay: 0s;
}

.closure-hearts span:nth-child(2) {
  left: 22%;
  bottom: 20%;
  animation-delay: 0.6s;
}

.closure-hearts span:nth-child(3) {
  left: 35%;
  bottom: 12%;
  animation-delay: 1.2s;
}

.closure-hearts span:nth-child(4) {
  left: 48%;
  bottom: 18%;
  animation-delay: 1.8s;
}

.closure-hearts span:nth-child(5) {
  left: 62%;
  bottom: 8%;
  animation-delay: 2.4s;
}

.closure-hearts span:nth-child(6) {
  left: 70%;
  bottom: 22%;
  animation-delay: 3s;
}

.closure-hearts span:nth-child(7) {
  left: 82%;
  bottom: 14%;
  animation-delay: 3.6s;
}

.closure-hearts span:nth-child(8) {
  left: 90%;
  bottom: 20%;
  animation-delay: 4.2s;
}

.closure-hearts span:nth-child(9) {
  left: 8%;
  bottom: 18%;
  animation-delay: 4.8s;
}

.closure-hearts span:nth-child(10) {
  left: 58%;
  bottom: 14%;
  animation-delay: 5.4s;
}

.chapter-header {
  margin-bottom: 1rem;
}

.chapter-number {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 0.4rem;
}

h2 {
  font-weight: 500;
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.story {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 1.2rem 0 2rem;
}

.story p {
  margin: 0 0 1rem;
}

.story p:last-child {
  margin-bottom: 0;
}

.media-row {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.chapter-snapshots {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(364px, 1fr));
  gap: 1.2rem;
}

.snapshot {
  position: relative;
  background: #ffffff;
  padding: 0.7rem 0.7rem 1.4rem;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(15, 23, 42, 0.1);
  transform: rotate(-2deg);
}

.snapshot:nth-child(2) {
  transform: rotate(2deg) translateY(6px);
}

.snapshot:nth-child(3) {
  transform: rotate(-1deg) translateY(10px);
}

.snapshot img,
.snapshot video {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  background: #f1f5f9;
}

.photo {
  min-height: 220px;
  background: var(--paper-deep);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 18px;
}

.letter {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1.4rem;
  min-height: 220px;
  box-shadow: inset 0 0 30px rgba(15, 23, 42, 0.02);
  border-radius: 18px;
}

.letter-title {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--accent);
  margin: 0 0 0.8rem;
}

.handwritten {
  font-family: "Cormorant Garamond", "Inter Tight", system-ui, sans-serif;
  font-size: 1.35rem;
  font-style: normal;
  color: var(--ink);
  margin: 0;
}

.audio-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

audio {
  display: none;
}

.audio-button {
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--accent);
  background: transparent;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--accent);
  border-radius: 999px;
}

.audio-button.is-playing {
  background: var(--accent);
  color: #ffffff;
}

.qr {
  min-height: 120px;
  border-radius: 14px;
}

.placeholder {
  border: 1px dashed rgba(15, 23, 42, 0.18);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.logout {
  margin-top: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: #ffffff;
  color: var(--ink);
  padding: 0.6rem 1.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

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

.chapter.is-visible {
  filter: grayscale(0%) saturate(100%);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.15);
}

@media (max-width: 700px) {
  .chapter {
    padding: 2rem 1.5rem;
  }

  .handwritten {
    font-size: 1.25rem;
  }

  .hero-photos {
    gap: 0;
  }

  .hero-photo {
    width: 170px;
  }

  .hero-photo-right {
    margin-left: -24px;
  }

  .hero-photo-frame img {
    height: 210px;
  }

  .snapshot img {
    height: 300px;
  }
}

@media (max-width: 900px) {
  .journey-map-shell {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .journey-map-panel {
    text-align: center;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-media {
    min-height: auto;
  }

  .auth-card {
    padding: 1.8rem;
  }
}

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

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

  .hero-photo-frame,
  .love-bubbles span,
  .journey-ring,
  .journey-intro,
  .journey-car-map,
  .closure-glow,
  .closure-hearts span,
  .balloon {
    animation: none;
  }
}
