/* Design tokens (from Figma) */
:root {
  --ink-on-dark: #f8fafc;
  --ink-slate: #536779;
  --ink-soft: #687a8d;
  --accent-deep-powder: #6e8cad;
  --line-soft: #dce8f2;
  --surface-base: #f8fafc;
  --surface-white: #ffffff;
  --surface-mist: #eef4f9;
  --accent-powder: #a8c0d8;
  --film-bg: #2e3b48;
  --accent-sand: #d9c9b8;
  --shadow-soft: 0 12px 36px rgba(83, 103, 121, 0.07);
  --shadow-polaroid: 0 10px 24px rgba(83, 103, 121, 0.145);

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-script: "Pinyon Script", cursive;
  --font-body: "Jost", system-ui, sans-serif;

  --dissolve: 1200ms;
}

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

/* Components set their own display, so make the hidden attribute always win */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  overflow-x: clip;
  background: var(--surface-base);
  color: var(--ink-slate);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; }

p, h1, h2, h3, dl, dd { margin: 0; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

/* ---------- Shared type ---------- */

/* Label/Eyebrow: Jost Medium 11 / 1.4 / 26% */
.eyebrow,
.btn {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: nowrap;
}

.eyebrow--on-dark { color: var(--ink-on-dark); opacity: 0.8; }
.eyebrow--accent  { color: var(--accent-deep-powder); }

/* Display/Italic */
.caption {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.35;
  text-align: center;
}

.caption--on-dark { color: var(--ink-on-dark); }
.caption--faded   { color: var(--ink-slate); opacity: 0.22; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.btn:focus-visible,
.sound-toggle:focus-visible {
  outline: 2px solid var(--accent-deep-powder);
  outline-offset: 3px;
}

.btn--light {
  background: var(--surface-base);
  color: var(--ink-slate);
  padding: 13px 24px;
}

.btn--primary {
  background: var(--ink-slate);
  color: var(--ink-on-dark);
  padding: 19px 34px;
}

.btn--primary:hover { background: #475a6b; box-shadow: 0 8px 20px rgba(83, 103, 121, 0.22); }
.btn:active { transform: scale(0.98); }

/* ---------- Chapters ---------- */

/* Chapters 1–2 are full-screen overlays; 3 onwards scroll as one page */
.chapter-1,
.chapter-2 {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.chapter-3,
.chapter-4,
.chapter-5,
.chapter-6,
.chapter-7 {
  position: relative;
  display: flow-root;
  overflow: clip;
}

.chapter[hidden],
.chapter-bar[hidden] { display: none; }

html.is-intro body { overflow: hidden; }
html.is-intro .chapter-bar { display: none; }

/* Chapter 1 · Intro film */

.chapter-1 {
  background: var(--film-bg);
  z-index: 1;
}

.film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-ui {
  position: relative;
  height: 100%;
  max-width: 402px;
  margin: 0 auto;
  padding: max(47px, env(safe-area-inset-top)) 38px max(72px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Soft scrim so the type stays readable over any footage */
.chapter-1::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(46, 59, 72, 0.55), rgba(46, 59, 72, 0) 22%, rgba(46, 59, 72, 0) 55%, rgba(46, 59, 72, 0.75));
}
.film-ui { z-index: 2; }

.top-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.sound-toggle {
  position: relative;
  width: 24px;
  height: 24px;
}

.sound-toggle img {
  position: absolute;
  left: 3.3px;
  top: 5.3px;
}

/* Muted state: a slash across the speaker */
.sound-toggle[aria-pressed="false"]::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 21px;
  height: 1.4px;
  border-radius: 1px;
  background: var(--ink-on-dark);
  transform: rotate(-40deg);
}

.film-footer { display: flex; flex-direction: column; }

.film-footer .caption { margin-bottom: 58px; }

.progress {
  position: relative;
  height: 2px;
}

.progress__track,
.progress__bar {
  position: absolute;
  inset: 0;
}

.progress__track { background: var(--ink-on-dark); opacity: 0.2; }

.progress__bar {
  background: var(--accent-deep-powder);
  transform-origin: left;
  transform: scaleX(0);
}

/* Body/S: Jost Regular 12 / 1.5 / 2% */
.timecode,
.hosts {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.timecode {
  margin-top: 12px;
  color: var(--ink-on-dark);
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* Chapter 2 · Dissolve */

.chapter-2 {
  background: var(--surface-base);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dissolve) ease;
}

.chapter-2.is-visible { opacity: 1; }

/* Bloom sits slightly up and left of centre, as in the frame */
.light-bloom {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: calc(-50% - 6px) calc(-50% - 15px);
  scale: 0.85;
  transition: scale 2400ms ease-out;
}

.chapter-2.is-visible .light-bloom { scale: 1; }

.chapter-2 .caption {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 326px;
  translate: -50% -50%;
}

/* Chapter 3 · Invitation */

.chapter-3 {
  background: var(--surface-base);
  z-index: 3;
  min-height: 100svh;
  opacity: 0;
  transition: opacity var(--dissolve) ease;
}

.chapter-3.is-visible { opacity: 1; }

/* Each chapter is a fixed 402px-wide artboard, scaled to the phone's width (see script.js) */
.stage {
  position: relative;
  width: 402px;
  margin: 0 auto;
  transform-origin: top left;
}

.stage--ch3 { height: 874px; }
.stage--ch4 { height: 1707px; }
.stage--ch5 { height: 2466px; }
.stage--ch6 { height: 2059px; }
.stage--ch7 { display: flow-root; padding-bottom: 110px; } /* height follows the wishing wall */

.border {
  position: absolute;
  border-style: solid;
  border-width: 1px;
}

.border--outer {
  left: 26px; top: 36px; width: 350px; height: 804px;
  border-color: var(--line-soft);
  border-radius: 20px;
}

.border--inner {
  left: 34px; top: 44px; width: 334px; height: 788px;
  border-color: var(--accent-deep-powder);
  border-radius: 14px;
  opacity: 0.45;
}

.twinkles img,
.nursery-window,
.animal,
.paw,
.invite,
.hosts { position: absolute; }

.twinkles__top    { left: 46.39px; top: 72.02px; }
.twinkles__bottom { left: 69.99px; top: 557.79px; }

.nursery-window   { left: 67px;  top: 80px; }
.animal--bear     { left: 113px; top: 246px; object-fit: cover; }
.animal--elephant { left: 22px;  top: 290px; }
.animal--bunny    { left: 268px; top: 290px; }

.invite {
  left: 0;
  right: 0;
  top: 432px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.chapter-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.script-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 62px;
  line-height: 1.1;
  color: var(--ink-slate);
  white-space: nowrap;
}

.lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink-soft);
  text-align: center;
}

.spacer { width: 10px; height: 18px; }

.hosts {
  left: 51px;
  top: 764px;
  width: 300px;
  color: var(--ink-soft);
  text-align: center;
}

/* Paw-print trail: each 14px paw rotated about its centre */
.paw--1 { left: 147.18px; top: 807.97px; rotate: 20deg; }
.paw--2 { left: 167.18px; top: 795.97px; rotate: 20deg; }
.paw--3 { left: 190.10px; top: 809.49px; rotate: 14deg; }
.paw--4 { left: 210.10px; top: 797.49px; rotate: 14deg; }
.paw--5 { left: 232.96px; top: 808.91px; rotate: 8deg; }

/* Gentle entrance once the invitation appears */
.chapter-3.is-visible .animal,
.chapter-3.is-visible .invite > * {
  animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.chapter-3.is-visible .animal--elephant { animation-delay: 150ms; }
.chapter-3.is-visible .animal--bunny    { animation-delay: 250ms; }
.chapter-3.is-visible .invite > :nth-child(1) { animation-delay: 400ms; }
.chapter-3.is-visible .invite > :nth-child(2) { animation-delay: 500ms; }
.chapter-3.is-visible .invite > :nth-child(3) { animation-delay: 600ms; }
.chapter-3.is-visible .invite > :nth-child(5) { animation-delay: 700ms; }

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

/* Chapter 4 · The Celebration */

.chapter-4 { background: var(--surface-mist); }

.display-l {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink-slate);
}

.display-m {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
  color: var(--ink-slate);
}

.body-m {
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.body-s {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.body-s--slate { color: var(--ink-slate); }
.eyebrow--soft { color: var(--ink-soft); }

.deco,
.details-heading,
.invite-card,
.map-card,
.countdown,
.up-next { position: absolute; }

.twinkles--ch4 .twinkles__top    { left: 12.4px; top: 58px; }
.twinkles--ch4 .twinkles__bottom { left: 22px;   top: 598px; }

.details-heading {
  left: 33px;
  top: 81px;
  width: 324px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.deco--peeking-bunny { left: 283px; top: 217px; }
.deco--bunny-paws    { left: 294px; top: 271px; }

.invite-card {
  left: 33px;
  top: 277px;
  width: 324px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: var(--surface-white);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.invite-card__script {
  font-family: var(--font-script);
  font-size: 30px;
  line-height: 1.2;
  color: var(--ink-soft);
}

.detail-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.detail-row__icon {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-deep-powder);
  border-radius: 22px;
}

/* 24px icon box centred in the 44px ring; glyph offsets come from Figma */
.detail-row__icon img {
  position: absolute;
  margin: 9px;
}

.detail-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dress-colours {
  width: 100%;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-mist);
  border-radius: 16px;
  text-align: center;
}

.swatches {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.swatch__dot {
  position: relative;
  width: 30px;
  height: 30px;
}

.swatch__dot img {
  position: absolute;
  left: -8px;
  top: -6px;
}

.map-card {
  left: 33px;
  top: 879px;
  width: 324px;
  background: var(--surface-white);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
}

.map-card__map {
  position: relative;
  display: block;
  height: 150px;
  overflow: hidden;
  background: var(--surface-base);
  cursor: pointer;
}

.map-card__roads { position: absolute; left: 0; top: 0; }

.map-card__pin {
  position: absolute;
  left: 147px;
  top: 48px;
  width: 32px;
  height: 32px;
}

.map-card__pin img {
  position: absolute;
  left: 6.633px;
  top: 3.967px;
}

.map-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.map-card__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn--outline {
  flex: none;
  padding: 13px 22px;
  border: 1px solid var(--ink-slate);
  color: var(--ink-slate);
  text-decoration: none;
}

.btn--outline:hover { background: var(--ink-slate); color: var(--ink-on-dark); }

.deco--ears-bear   { left: 32px;  top: 1182px; }
.deco--ears-bunny  { left: 116px; top: 1168px; }
.deco--ears-kitten { left: 200px; top: 1182px; }
.deco--ears-mouse  { left: 284px; top: 1178px; }

.countdown {
  left: 33px;
  top: 1163px;
  width: 324px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.countdown__units {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 326px;
  flex: none;
}

.countdown__unit {
  width: 74px;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-white);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
}

.countdown__unit .display-l { font-variant-numeric: lining-nums tabular-nums; }

.sleepy-cloud {
  left: 22px;
  top: 128px;
  width: 64px;
  height: 40px;
}

.sleepy-cloud img,
.splash-bubbles img,
.icon-24 img { position: absolute; }

.deco--hanging-star { left: 338px; top: 0; }
.deco--hanging-moon { left: 300px; top: 0; }

/* Small paws: each 12px paw rotated about its centre */
.paw-sm--1 { left: 65.81px;  top: 994.20px; rotate: 60deg; }
.paw-sm--2 { left: 87.81px;  top: 986.20px; rotate: 60deg; }
.paw-sm--3 { left: 108.41px; top: 981.69px; rotate: 70deg; }
.paw-sm--4 { left: 131.81px; top: 974.20px; rotate: 60deg; }
.paw-sm--5 { left: 152.00px; top: 962.49px; rotate: 45deg; }

.deco--pond-elephant { left: 256px; top: 946px; }

.splash-bubbles {
  left: 248px;
  top: 930px;
  width: 40px;
  height: 22px;
}

.splash-bubbles img { left: 3.6px; top: 1.6px; }

.deco--speech-bubble { left: 184px; top: 898px; }

.follow-me {
  left: 193.5px;
  top: 903px;
  font-weight: 500;
  font-size: 9px;
  line-height: normal;
  letter-spacing: 0.14em;
  color: var(--ink-slate);
  white-space: nowrap;
}

.deco--balloon          { left: 28px;    top: 1290px; }
.deco--balloon-elephant { left: 24px;    top: 1338px; }
.deco--waving-bunny     { left: 302.5px; top: 1342px; }

.up-next {
  left: 31px;
  top: 1458px;
  width: 340px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-white);
  border: 1px dashed var(--accent-powder);
  border-radius: 22px;
  text-decoration: none;
}

.up-next__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.up-next__go {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--ink-slate);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-24 {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
}

/* Chapter 5 · Our Little Journey */

.chapter-5 { background: #fdfefe; }

.display-l--on-dark { color: var(--ink-on-dark); }

.journey-hero,
.journey-heading,
.journey-quote,
.scrapbook,
.polaroid,
.washi-tape,
.milestones,
.swipe-label,
.gallery,
.gallery-dots { position: absolute; }

.journey-hero {
  left: 0;
  top: 0;
  width: 402px;
  height: 564px;
  background: var(--accent-deep-powder);
}

.journey-heading {
  left: 79.5px;
  top: 440px;
  width: 243px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.journey-quote {
  left: 37px;
  top: 635px;
  width: 316px;
  color: var(--ink-slate);
}

.scrapbook {
  left: 0;
  top: 711px;
  width: 390px;
  height: 640px;
}

.polaroid {
  margin: 0;
  width: 256px;
  padding: 12px 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--surface-white);
  box-shadow: var(--shadow-polaroid);
}

/* Rotated about their centres to land on Figma's bounding boxes */
.polaroid--1 { left: 41.94px;  top: 28.22px;  rotate: -5deg; }
.polaroid--2 { left: 108.14px; top: 298.53px; rotate: 4deg; }

.photo-placeholder {
  width: 232px;
  height: 256px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-powder);
}

.polaroid figcaption {
  width: 232px;
  font-family: var(--font-script);
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink-slate);
  text-align: center;
}

.washi-tape {
  width: 80px;
  height: 22px;
  background: var(--accent-sand);
  opacity: 0.55;
}

.washi-tape--1 { left: 92.84px;  top: 30.08px;  rotate: 12deg; }
.washi-tape--2 { left: 231.23px; top: 261.61px; rotate: -9deg; }

.milestones,
.milestones__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.milestones {
  left: 14px;
  top: 1394px;
  width: 388px;
  padding: 24px 36px 40px;
}

.milestones__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.milestone {
  display: flex;
  align-items: center;
  gap: 16px;
}

.milestone > div { flex: 1; min-width: 0; }

.swipe-label {
  left: 62px;
  top: 1778px;
  white-space: pre;
}

.gallery {
  left: 0;
  top: 1809px;
  width: 402px;
  height: 320px;
  padding: 0 91px 0 61px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 61px;
  scrollbar-width: none;
}

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

.gallery:focus-visible {
  outline: 2px solid var(--accent-deep-powder);
  outline-offset: 4px;
}

.gallery__slide {
  flex: none;
  margin: 0;
  width: 250px;
  height: 320px;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-powder);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.gallery__slide:nth-child(even) { background: var(--line-soft); }

.gallery-dots {
  left: 178px;
  top: 2163px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-dots button {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--line-soft);
  transition: width 300ms ease, background-color 300ms ease;
}

/* Larger tap target than the 6px dot */
.gallery-dots button::before {
  content: "";
  position: absolute;
  inset: -10px -3px;
}

.gallery-dots button[aria-current="true"] {
  width: 22px;
  background: var(--accent-deep-powder);
}

.gallery-dots button:focus-visible {
  outline: 2px solid var(--accent-deep-powder);
  outline-offset: 3px;
}

.up-next--ch5 { top: 2217px; }

/* Chapter 6 · Little Gifts */

.chapter-6 { background: var(--line-soft); }

.wishes-heading,
.gift-list { position: absolute; }

.wishes-heading {
  left: 25px;
  top: 81px;
  width: 340px;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.gift-list {
  left: 31px;
  top: 307px;
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gift-list__label { padding-top: 12px; }
.gift-list__note { text-align: center; }

.gift-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface-white);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  transition: opacity 300ms ease;
}

.gift-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gift-card__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gift-icon {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 27px;
  background: var(--surface-mist);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gift-status {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--accent-deep-powder);
  white-space: pre;
}

/* Reserved by this guest / by someone else */
.is-mine .gift-status { color: var(--ink-slate); }
.gift-card.is-taken,
.checklist__item.is-taken .checklist__name { opacity: 0.7; }

.pill {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--ink-slate);
  border-radius: 999px;
  background: var(--ink-slate);
  color: var(--ink-on-dark);
  font-weight: 500;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 200ms ease, color 200ms ease;
}

.pill--row,
.is-mine .pill {
  background: transparent;
  color: var(--ink-slate);
}

.pill--row { padding: 6px 12px; }

.is-taken .pill {
  border-color: var(--line-soft);
  background: var(--line-soft);
  color: var(--ink-soft);
  cursor: default;
}

.pill:focus-visible {
  outline: 2px solid var(--accent-deep-powder);
  outline-offset: 2px;
}

.brand-chips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 6px;
}

.brand-chips li {
  padding: 7px 11px;
  border: 1px solid var(--accent-powder);
  border-radius: 999px;
  background: var(--surface-mist);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-slate);
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist__item {
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist__item + .checklist__item { border-top: 1px solid var(--line-soft); }

.checklist__name {
  flex: 1;
  min-width: 0;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-slate);
}

.surprise-card {
  padding: 28px 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--surface-white);
  border: 1px dashed var(--accent-powder);
  border-radius: 20px;
  text-align: center;
}

.surprise-card__title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.2;
  color: var(--ink-slate);
}

.btn--small {
  padding: 13px 22px;
  border: 1px solid var(--ink-slate);
  background: var(--ink-slate);
  color: var(--ink-on-dark);
}

.surprise-card.is-mine .btn--small {
  background: transparent;
  color: var(--ink-slate);
}

.deco--elephant-gift { left: 279px; top: 1361px; }
.up-next--ch6 { top: 1810px; }

/* Chapter 7 · Leave a Little Love */

.chapter-7 { background: var(--surface-base); }

.love-heading {
  position: absolute;
  left: 31px;
  top: 76px;
  width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.deco--love-star  { left: 342px; top: 0; }
.deco--love-moon  { left: 304px; top: 0; }
.deco--love-cloud { left: 20px;  top: 40px; }
.deco--love-bunny { left: 43px;  top: 237.2px; }
.deco--love-paws  { left: 50.05px; top: 266.16px; z-index: 2; }

.wish-panel {
  position: relative;
  z-index: 1;
  width: 340px;
  margin: 270px 0 0 31px;
}

.wish-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface-white);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
}

.wish-form .field__input { padding: 13px 15px; }

.wish-form__message {
  height: 120px;
  resize: none;
}

.wish-form__count { text-align: right; }
.wish-form__error { color: var(--ink-slate); text-align: center; }
.wish-form__error[hidden] { display: none; }

.wish-sent {
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--surface-white);
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  box-shadow: 0 12px 36px rgba(83, 103, 121, 0.08);
  text-align: center;
  outline: none;
}

.wish-sent[hidden] { display: none; }

.wish-sent__art {
  position: relative;
  width: 160px;
  height: 84px;
  overflow: hidden;
}

.wish-sent__art img { position: absolute; }
.wish-sent__bunny  { left: 42px; top: 6px; }
.wish-sent__hearts { left: 0; top: 0; }

.wish-sent__eyebrow {
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent-deep-powder);
}

.wish-sent__title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  color: var(--ink-slate);
}

.wish-sent__lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 21px;
  line-height: 1.3;
  color: var(--ink-soft);
}

.wish-sent__note {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.wish-sent__preview {
  width: 100%;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface-mist);
  border-radius: 16px;
  text-align: left;
}

.wish-sent__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  line-height: 1.35;
  color: var(--ink-slate);
  overflow-wrap: anywhere;
}

.wish-sent__from {
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.wish-sent .btn--primary { width: 100%; }

.wall-header {
  width: 340px;
  margin: 29px 0 0 31px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.wish-wall {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

/* Cards repeat Figma's four-card rhythm: offset, tilt and animal pin (positions in the card's own frame) */
.wish {
  position: relative;
  width: 286px;
  margin-left: var(--wish-left);
}

.wish--a { --wish-left: 34.6px;  --wish-tilt: 2.5deg;  --pin-x: 206.8px;  --pin-y: -27.02px; --wish-gap: 20px; }
.wish--b { --wish-left: 99.88px; --wish-tilt: -2deg;   --pin-x: 209.41px; --pin-y: -40.75px; --wish-gap: 22.8px; }
.wish--c { --wish-left: 39.79px; --wish-tilt: 1.5deg;  --pin-x: 203.26px; --pin-y: -27.31px; --wish-gap: 17.8px; }
.wish--d { --wish-left: 92.05px; --wish-tilt: -2.5deg; --pin-x: 209.33px; --pin-y: -30.93px; --wish-gap: 4px; }
.wish--new { --wish-left: 52.23px; --wish-tilt: -1.5deg; }

.wish + .wish { margin-top: var(--wish-gap); }
.wish--new + .wish:not(.wish--new) { margin-top: 42px; }
.wish--new:first-child { margin-top: -6px; }

.wish-card {
  position: relative;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-white);
  border-radius: 18px;
  box-shadow: 0 12px 18px rgba(83, 103, 121, 0.07);
  rotate: var(--wish-tilt);
}

.wish--new .wish-card { border: 1.5px solid var(--accent-deep-powder); }

.wish-card__message {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink-slate);
  overflow-wrap: anywhere;
}

.wish-card__from {
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.wish-card__pin {
  position: absolute;
  left: var(--pin-x);
  top: var(--pin-y);
}

.wish-card__chip {
  position: absolute;
  left: 182.25px;
  top: -7.33px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ink-slate);
  color: var(--ink-on-dark);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wish--new .wish-card { animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* Footer offsets are measured from the top of the "Read all wishes" button */
.love-footer {
  position: relative;
  margin-top: 85.3px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.love-footer__more[aria-hidden="true"] { visibility: hidden; }

.deco--love-balloon  { left: 25px;  top: -57px; }
.deco--love-elephant { left: 18px;  top: -12px; }
.deco--love-letter   { left: 303px; top: -14px; }

.up-next--ch7 {
  position: relative;
  left: auto;
  top: auto;
  margin-top: 64.6px;
  cursor: pointer;
}

/* Bottom sheets — 402px wide like the artboards, scaled with --k */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(46, 59, 72, 0.45);
  opacity: 0;
  transition: opacity 300ms ease;
}

.sheet-backdrop.is-open { opacity: 1; }

.sheet {
  position: fixed;
  z-index: 21;
  left: calc(50% - 201px * var(--k, 1));
  bottom: 0;
  width: 402px;
  max-height: calc(100dvh / var(--k, 1) - 24px);
  overflow-y: auto;
  --sheet-pad-bottom: 36px;
  padding: 12px 28px calc(var(--sheet-pad-bottom) + env(safe-area-inset-bottom, 0px) / var(--k, 1));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: var(--surface-white);
  border-radius: 28px 28px 0 0;
  transform-origin: left bottom;
  scale: var(--k, 1);
  translate: 0 100%;
  transition: translate 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sheet.is-open { translate: 0 0; }
.sheet[hidden],
.sheet-backdrop[hidden] { display: none; }

.sheet__handle {
  flex: none;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-soft);
}

.sheet__heading {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.sheet__italic {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.sheet__item {
  width: 100%;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-mist);
  border-radius: 16px;
}

.sheet__item-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 23px;
  background: var(--surface-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet__item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sheet__item-name {
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-slate);
}

.field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field[hidden] { display: none; }

/* Figma draws the 1px border inside the 13px padding */
.field__input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface-mist);
  font: inherit;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-slate);
  outline: none;
  transition: border-color 200ms ease;
}

.field__input::placeholder { color: var(--ink-soft); opacity: 1; }
.field__input:focus { border-color: var(--accent-deep-powder); }
.field__input[aria-invalid="true"] { border-color: var(--accent-deep-powder); }

.field__hint {
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.field__input[aria-invalid="true"] + .field__hint { color: var(--ink-slate); }

.sheet__primary { width: 100%; }

.sheet__link {
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.sheet__link:focus-visible {
  outline: 2px solid var(--accent-deep-powder);
  outline-offset: 3px;
}

.confetti {
  position: absolute;
  left: 51px;
  top: 20px;
  width: 300px;
  height: 60px;
  overflow: hidden;
  pointer-events: none;
}

.confetti img { position: absolute; }

.sheet__friends {
  display: flex;
  align-items: flex-end;
}

.sheet__friends img:first-child { margin-right: -6px; }

.sheet__script {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  color: var(--ink-slate);
  text-align: center;
}

.sheet__thanks-message { text-align: center; }

/* Figma's thank-you sheet starts 376px down an 874px screen */
.sheet--thanks { min-height: 498px; }

.sheet__summary {
  width: 100%;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-mist);
  border-radius: 16px;
}

.sheet__summary div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet__summary dd {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-slate);
  text-align: right;
}

.sheet--thanks.is-open .sheet__friends img {
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sheet--thanks.is-open .sheet__friends img + img { animation-delay: 120ms; }

/* Chapter menu sheet */

.sheet--menu {
  --sheet-pad-bottom: 30px;
  padding-inline: 24px;
  gap: 6px;
}

.chapter-menu__heading {
  padding: 12px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chapter-menu__title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  color: var(--ink-slate);
}

.chapter-menu__list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Upcoming chapters are slate; ones already passed fade to soft ink */
.chapter-menu__row {
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  color: var(--ink-slate);
  text-decoration: none;
  transition: background-color 200ms ease;
}

.chapter-menu__row:hover { background: var(--surface-base); }

.chapter-menu__row:focus-visible {
  outline: 2px solid var(--accent-deep-powder);
  outline-offset: -2px;
}

.chapter-menu__row.is-past { color: var(--ink-soft); }

.chapter-menu__icon {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: var(--surface-mist);
}

.chapter-menu__row[aria-current="true"] .chapter-menu__icon { background: var(--surface-white); }

/* The glyph's own SVG used as a mask, filled with the row's colour */
.glyph {
  position: absolute;
  margin: 8px;
  background: currentColor;
  -webkit-mask: var(--glyph) no-repeat 0 0 / 100% 100%;
  mask: var(--glyph) no-repeat 0 0 / 100% 100%;
}

.chapter-menu__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.chapter-menu__eyebrow {
  font-weight: 500;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: pre-wrap;
  color: var(--accent-deep-powder);
}

.is-past .chapter-menu__eyebrow { color: inherit; }

.chapter-menu__name {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.25;
}

.chapter-menu__spacer {
  flex: none;
  height: 8px;
}

.sheet--menu .sheet__primary { text-decoration: none; }

/* Floating chapter bar — centred on the artboard, 27px above the bottom,
   scaled with the artboard via --k (set in script.js) */
.chapter-bar {
  position: fixed;
  z-index: 10;
  left: calc(50% - 170px * var(--k, 1));
  bottom: calc(27px * var(--k, 1) + env(safe-area-inset-bottom, 0px));
  width: 340px;
  height: 56px;
  padding: 8px 8px 8px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-white);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transform-origin: left bottom;
  scale: var(--k, 1);
  opacity: 0;
  translate: 0 16px;
  pointer-events: none;
  transition: opacity 400ms ease, translate 400ms ease;
}

.chapter-bar.is-visible { opacity: 1; translate: 0 0; pointer-events: auto; }

.chapter-bar__number {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: var(--surface-mist);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
  color: var(--accent-deep-powder);
}

.chapter-bar__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chapter-bar__title {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-slate);
  white-space: nowrap;
}

.chapter-bar__progress { display: flex; gap: 4px; }

html.is-sheet-open body { overflow: hidden; }

.chapter-bar__progress span {
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-soft);
}

.chapter-bar__progress .is-done,
.chapter-bar__progress .is-current { background: var(--accent-deep-powder); }
.chapter-bar__progress .is-current { width: 22px; }

.chapter-bar__next,
.chapter-bar__menu {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chapter-bar__next { border: 1px solid var(--line-soft); }
.chapter-bar__menu { background: var(--ink-slate); }

.chapter-bar__next:focus-visible,
.chapter-bar__menu:focus-visible,
.map-card__map:focus-visible {
  outline: 2px solid var(--accent-deep-powder);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dissolve: 1ms; }
  .light-bloom { transition: none; }
  .chapter-bar,
  .gallery-dots button,
  .sheet,
  .sheet-backdrop { transition: none; }
  .sheet--thanks.is-open .sheet__friends img,
  .wish--new .wish-card { animation: none; }
  .chapter-3.is-visible .animal,
  .chapter-3.is-visible .invite > * { animation: none; }
}
