    :root {
  --plum: #5B2A4A;
  --plum-mid: #6E3A5C;
  --plum-deep: #4A1F3D;
  --olive-green: #5E6B3A;
  --dusty: #8E5F72;
  --celadon: #9DB5A0;
  --celadon-soft: #DCE5DB;
  --champagne: #D8C8AE;
  --ivory: #F3EEE6;
  --cream: #EAE1D3;
  --gold: #C4A35A;
  --gold-deep: #9C7B43;
  --ink: #2B2227;
  --muted: #6E6169;
  --paper: #FFFBF7;
  --nav-h: 68px;
  --shadow: 0 10px 30px rgba(74, 31, 61, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--plum-deep); }
button, input, select, textarea { font: inherit; }

.eyebrow {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold-deep);
  font-weight: 500;
}
.script {
  font-family: "Great Vibes", "Palatino Linotype", cursive;
  font-weight: 400;
  line-height: 1.15;
}
.section {
  padding: 3.4rem 1.4rem 3.6rem;
  max-width: 720px;
  margin: 0 auto;
}
.section-title {
  font-size: clamp(2.1rem, 8vw, 2.8rem);
  font-weight: 500;
  text-align: center;
  margin: 0.35rem 0 0.4rem;
  color: var(--plum-deep);
}
.center { text-align: center; }
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0.8rem auto 0;
}
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin: 1rem auto 1.6rem;
  color: var(--gold);
}
.divider span { width: 42px; height: 1px; background: var(--gold); display: block; opacity: 0.85; }

/* Hero */
#home {
  position: relative;
  min-height: 100svh;
  color: var(--ivory);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
#home .hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
#home .hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(48, 24, 40, 0.18) 0%, rgba(48, 24, 40, 0.08) 38%, rgba(42, 18, 36, 0.58) 68%, rgba(30, 12, 26, 0.9) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 2rem 1.4rem calc(var(--nav-h) + 2rem);
  text-align: center;
}
.hero-kicker {
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--celadon-soft);
}
.hero-names {
  font-size: clamp(3.4rem, 16vw, 5.4rem);
  margin: 0.35rem 0 0.15rem;
  color: var(--paper);
}
.hero-date {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--cream);
}
.hero-place {
  font-style: italic;
  color: var(--celadon-soft);
  margin-top: 0.15rem;
}
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  max-width: 360px;
  margin: 1.4rem auto 0;
}
.count-cell {
  background: rgba(243, 238, 230, 0.12);
  border: 1px solid rgba(196, 163, 90, 0.35);
  backdrop-filter: blur(6px);
  padding: 0.7rem 0.2rem 0.55rem;
}
.count-cell strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: 0.04em;
}
.count-cell span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--celadon);
}

/* Invite */
#invite { background: var(--ivory); }
.invite-card {
  background: var(--paper);
  border: 1px solid var(--celadon-soft);
  padding: 2.2rem 1.5rem 2.3rem;
  box-shadow: var(--shadow);
}
.invite-card p {
  font-size: 1.18rem;
  color: var(--ink);
}
.invite-card .formal {
  font-style: italic;
  font-size: 1.28rem;
  color: var(--plum-deep);
  margin-top: 1rem;
}

/* Story */
#story { background: linear-gradient(180deg, var(--cream) 0%, var(--ivory) 100%); }
.timeline {
  list-style: none;
  position: relative;
  margin: 0.5rem auto 0;
  padding-left: 1.6rem;
  max-width: 440px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--celadon);
}
.timeline li {
  position: relative;
  padding: 0 0 1.7rem 1.15rem;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.45rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ivory);
  border: 2px solid var(--gold);
}
.when {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.timeline h3 {
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--plum-deep);
  margin: 0.1rem 0 0.25rem;
}
.timeline p { color: var(--muted); font-size: 1.08rem; }
.timeline figure {
  margin: 0.75rem 0 0;
}
.timeline figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 72%;
  border: 1px solid var(--celadon-soft);
}
.timeline figcaption {
  font-style: italic;
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 0.4rem;
}

.quotes {
  max-width: 440px;
  margin: 2.4rem auto 0;
  padding-top: 0.4rem;
}
.quote-block {
  text-align: center;
  padding: 1.35rem 0.4rem;
}
.quote-block + .quote-block {
  border-top: 1px solid var(--celadon-soft);
}
.quote-block blockquote {
  font-style: italic;
  font-size: 1.18rem;
  color: var(--plum-deep);
  line-height: 1.55;
}
.quote-block cite {
  display: block;
  margin-top: 0.7rem;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.ring-accent {
  width: 148px;
  height: 148px;
  object-fit: cover;
  object-position: center 55%;
  border-radius: 50%;
  margin: 0.4rem auto 0.6rem;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow);
}

/* Gallery */
#gallery { background: var(--ivory); padding-bottom: 2.2rem; }
.carousel-wrap { position: relative; }
.carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0.7rem;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel figure {
  flex: 0 0 88%;
  scroll-snap-align: center;
  margin: 0;
}
.carousel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
}
.carousel .is-landscape img { object-position: center 45%; }
.carousel figcaption {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  padding-top: 0.45rem;
}
.carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.9rem;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: var(--celadon);
  cursor: pointer;
}
.dot.is-on { background: var(--plum); transform: scale(1.15); }
.arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--celadon);
  background: var(--paper);
  color: var(--plum-deep);
  cursor: pointer;
}

#imagined { background: var(--ivory); padding-top: 1.2rem; }
.ai-note {
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  max-width: 28rem;
  margin: -0.3rem auto 1.15rem;
}
.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.55rem;
}
.ai-grid figure { margin: 0; }
.ai-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.ai-grid figcaption {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.35rem 0.1rem 0.15rem;
}

/* Details */
#details { background: var(--cream); }
.detail-grid {
  display: grid;
  gap: 1rem;
}
.detail-card {
  background: var(--paper);
  border: 1px solid var(--celadon-soft);
  padding: 1.5rem 1.25rem 1.6rem;
  text-align: center;
}
.detail-card h3 {
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--plum-deep);
  margin: 0.2rem 0 0.35rem;
}
.detail-card .time {
  font-size: 1.35rem;
  color: var(--ink);
}
.note {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* Venue */
#venue { background: var(--ivory); }
.map-wrap {
  border: 1px solid var(--celadon-soft);
  overflow: hidden;
  background: var(--celadon-soft);
  margin-top: 0.4rem;
}
.map-wrap iframe {
  width: 100%;
  height: 240px;
  border: 0;
  display: block;
}
.map-actions {
  text-align: center;
  margin-top: 1rem;
}
.btn {
  display: inline-block;
  background: var(--plum);
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 0.75rem 1.3rem;
  border: 0;
  cursor: pointer;
}
.btn:hover { background: var(--plum-deep); }
.btn-ghost {
  background: transparent;
  color: var(--plum-deep);
  border: 1px solid var(--plum-mid);
}
.btn-ghost:hover { background: var(--cream); }

/* Dress */
#dress { background: var(--cream); }
.swatches {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  margin: 1.3rem 0 0.4rem;
}
.swatch { text-align: center; width: 64px; }
.swatch i {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin: 0 auto 0.35rem;
  border: 1px solid rgba(44, 42, 36, 0.12);
}
.swatch span {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Gifts */
#gifts { background: var(--ivory); }
.gift-list {
  list-style: none;
  max-width: 440px;
  margin: 0 auto;
}
.gift-list li {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--celadon-soft);
  font-size: 1.12rem;
}
.gift-list li:last-child { border-bottom: 0; }
.gift-list strong { color: var(--plum-deep); font-weight: 600; }

/* FAQ */
#faq { background: var(--cream); }
details {
  background: var(--paper);
  border: 1px solid var(--celadon-soft);
  padding: 0.9rem 1rem;
  margin-bottom: 0.7rem;
}
details summary {
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--plum-deep);
  font-weight: 500;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+";
  float: right;
  color: var(--gold-deep);
  font-weight: 400;
}
details[open] summary::after { content: "–"; }
details p {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* RSVP */
#rsvp { background: var(--ivory); padding-bottom: 5.5rem; }
form, .thanks {
  background: var(--paper);
  border: 1px solid var(--celadon-soft);
  padding: 1.5rem 1.2rem 1.7rem;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1rem; }
label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 0.35rem;
}
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid var(--celadon);
  background: var(--ivory);
  color: var(--ink);
  padding: 0.65rem 0.7rem;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--plum); }
textarea { min-height: 96px; resize: vertical; }
.radios { display: flex; gap: 1.2rem; padding-top: 0.2rem; }
.radios label {
  letter-spacing: 0;
  text-transform: none;
  font-size: 1.1rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.form-note {
  font-size: 0.92rem;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 1rem;
}
.thanks { text-align: center; padding: 2.2rem 1.2rem; }
.thanks h3 {
  font-size: 2rem;
  font-weight: 500;
  color: var(--plum-deep);
  margin-bottom: 0.4rem;
}
.hidden { display: none; }

#invite, #story, #gallery, #imagined, #details, #venue, #dress, #gifts, #faq, #rsvp {
  scroll-margin-top: 0.8rem;
}

footer {
  background: var(--plum-deep);
  color: var(--celadon-soft);
  text-align: center;
  padding: 2.4rem 1.4rem calc(var(--nav-h) + 1.8rem);
}
footer .script {
  color: var(--ivory);
  font-size: 2.4rem;
  display: block;
  margin-bottom: 0.2rem;
}
footer p { font-size: 0.98rem; }
footer .tiny {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--celadon);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--paper);
  border-top: 1px solid var(--celadon-soft);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 50;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bottom-nav a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.bottom-nav a.is-active, .bottom-nav a:hover { color: var(--plum); }

@media (min-width: 720px) {
  .carousel figure { flex-basis: 48%; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .invite-card, form, .thanks { padding: 2.4rem 2.2rem; }
  .section { padding-left: 2rem; padding-right: 2rem; }
  .ai-grid { gap: 0.8rem; }
}

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

/* ===== Plum & olive refinements ===== */
footer { color: var(--champagne); }
footer .tiny { color: var(--celadon); }
.hero-mono { width: 108px; height: auto; margin: 0 auto 0.5rem; display: block; opacity: 0.96; }
.footer-mono { width: 70px; height: auto; margin: 0 auto 0.6rem; display: block; opacity: 0.9; }
.sans { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }

/* RSVP call-to-action on the homepage */
.pill {
  display: inline-block;
  background: var(--plum-deep);
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 2.8rem;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(74, 31, 61, 0.28);
  transition: background .2s, transform .2s;
}
.pill:hover { background: var(--plum); transform: translateY(-1px); }
.home-link {
  display: inline-block;
  margin-top: 1.2rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--celadon);
  padding-bottom: 2px;
}
#rsvp.cta { text-align: center; }

/* Attire */
.attire { display: grid; gap: 0.8rem; margin: 1.6rem 0 0.4rem; }
.attire-card {
  background: var(--paper);
  border: 1px solid var(--celadon-soft);
  border-left: 3px solid var(--dusty);
  padding: 1rem 1.2rem;
  text-align: left;
}
.attire-card .eyebrow { margin-bottom: 0.2rem; color: var(--dusty); }
.attire-card p:last-child { font-size: 1.12rem; }
.dress-guests { margin: 0.9rem 0 0.5rem; }
.dress-guests .guests-invite { font-size: 1.18rem; color: var(--plum-deep); max-width: 32rem; margin: 0 auto 1rem; line-height: 1.45; }
#dress .swatches { margin: 0.15rem auto 0.85rem; gap: 0.85rem 0.85rem; max-width: 268px; }
#dress .swatch { width: 76px; }
#dress .swatch i { width: 70px; height: 70px; box-shadow: 0 1px 4px rgba(58, 23, 48, .12); }
#dress .swatch span { font-size: 0.78rem; letter-spacing: 0.04em; color: var(--plum-deep); font-weight: 500; }
.dress-guests .guests-white { margin-top: 0.15rem; font-size: 1.05rem; }
#dress .attire-looks { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.55rem; padding-bottom: 0.6rem; }
#dress .look-group { width: calc(50% - 0.4rem); max-width: 168px; }
#dress .look-group .sample-pol { width: 100%; max-width: none; }

/* RSVP page */
body.rsvp-body { background: var(--ivory); }
.rsvp-head {
  background: radial-gradient(ellipse at 50% 0%, #6a3558 0%, var(--plum-deep) 70%);
  color: var(--ivory);
  text-align: center;
  padding: 2.2rem 1.2rem 2.6rem;
}
.rsvp-mono { width: 92px; margin: 0 auto 0.3rem; display: block; }
.rsvp-names { font-size: clamp(2.8rem, 12vw, 4rem); color: var(--paper); line-height: 1.1; }
.rsvp-date { letter-spacing: 0.08em; color: var(--champagne); font-size: 1.1rem; }
.rsvp-page .section { padding-top: 2.2rem; padding-bottom: 3rem; max-width: 560px; }
.rsvp-intro { text-align: center; color: var(--muted); font-size: 1.15rem; margin: 0.2rem auto 1.4rem; }
.rsvp-page .btn-send { width: 100%; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.9rem; letter-spacing: 0.2em; border-radius: 999px; padding: 1rem 1.4rem; }
.back-btn { display: inline-block; margin-top: 1.2rem; text-decoration: none; }
.rsvp-home-wrap { text-align: center; padding-bottom: 3rem; }
.radios { flex-direction: column; gap: 0.6rem; }
.radios label { padding: 0.6rem 0.8rem; border: 1px solid var(--celadon); background: var(--ivory); cursor: pointer; }
.radios input { accent-color: var(--plum); width: 18px; height: 18px; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 2px var(--celadon-soft); }

/* ===== Envelope intro ===== */
html.env-on, html.env-on body { overflow: hidden; height: 100%; }
#envelope {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  height: 100vh; height: 100dvh;
  flex-direction: column; align-items: center; justify-content: center; gap: 2.2rem;
  padding: 1rem; text-align: center; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 40%, #FBF7F1 0%, #F3EEE6 55%, #E6DACB 100%);
  transition: opacity .9s ease, transform .9s ease, visibility .9s;
}
html.env-on #envelope { display: flex; }
#envelope.is-leaving { opacity: 0; visibility: hidden; transform: scale(1.05); }
.env-above, .env-below {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-transform: uppercase; color: var(--plum-deep); position: relative; z-index: 2;
}
.env-above { letter-spacing: 0.34em; font-size: 0.95rem; }
.env-below { letter-spacing: 0.3em; font-size: 0.78rem; color: var(--dusty); animation: envPulse 2.4s ease-in-out infinite; }
@keyframes envPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

.env-stage { width: min(86vw, 400px); aspect-ratio: 1.45 / 1; position: relative; perspective: 1400px; margin: 1.2rem 0; }
.env { position: absolute; inset: 0; cursor: pointer; overflow: visible; }
.env-back { position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(160deg, #6c3559, #4A1F3D 70%); box-shadow: 0 26px 50px rgba(58, 23, 48, 0.38); }
.env-card {
  position: absolute; left: 7%; right: 7%; top: 14%; bottom: 7%;
  background: var(--paper); border: 1px solid var(--champagne); border-radius: 3px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
  padding: 0.4rem; z-index: 2; box-shadow: 0 2px 10px rgba(58, 23, 48, 0.18);
  transition: transform 1.2s cubic-bezier(.2,.8,.2,1) .95s;
}
.env-card.c2 { background: var(--champagne); left: 11%; right: 3%; top: 18%; transform: rotate(-3deg); z-index: 1; transition-delay: 1.05s; }
.env-mono-light { width: 24%; height: auto; }
.env-kicker { font-size: 0.7rem !important; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-deep); }
.env-names { font-size: 1.9rem; color: var(--plum-deep); line-height: 1.1; }
.env-date { font-size: 0.8rem; letter-spacing: 0.1em; color: var(--muted); }
.env-card p { margin: 0; }
#envelope.is-open .env-card.c1 { transform: translateY(-64%); }
#envelope.is-open .env-card.c2 { transform: translateY(-46%) rotate(-3deg); }
.env-front { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.env-front svg { width: 100%; height: 100%; display: block; }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 56%; z-index: 4; transform-origin: 50% 0;
  background: linear-gradient(180deg, #7b4068, #5B2A4A);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform .95s ease .3s, z-index 0s .65s;
}
.env-flap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.12)); }
#envelope.is-open .env-flap { transform: rotateX(180deg); z-index: 1; filter: brightness(.82); }
.env-seal {
  position: absolute; left: 50%; top: 56%; width: 68px; height: 68px; z-index: 6;
  transform: translate(-50%, -50%); border: 0; cursor: pointer; padding: 0;
  border-radius: 53% 47% 51% 49% / 49% 52% 48% 51%;
  background: radial-gradient(circle at 35% 30%, #9a5a84, #6a3358 45%, #3f1833 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,.4), inset 0 2px 4px rgba(255,255,255,.25), inset 0 -3px 5px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  animation: sealBeat 2.2s ease-in-out infinite;
  transition: opacity .45s ease, transform .5s ease;
}
.env-seal::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px solid rgba(216, 200, 174, .55); }
.env-seal img { width: 62%; height: 62%; object-fit: contain; position: relative; z-index: 1; }
@keyframes sealBeat { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.07); } }
#envelope.is-open .env-seal { animation: none; opacity: 0; transform: translate(-50%, -50%) scale(.4); pointer-events: none; }
.flora { position: absolute; z-index: 7; pointer-events: none; overflow: visible; }
.flora.tl { left: -17%; top: -34%; width: 58%; height: auto; aspect-ratio: 1; }
.flora.br { right: -15%; bottom: -30%; width: 52%; height: auto; aspect-ratio: 1; transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  #envelope, #envelope * { transition: none !important; animation: none !important; }
}

/* ===== Inline editing (/admin) ===== */
.admin-mode body, html.admin-mode body { visibility: visible !important; }
.admin-mode #envelope { display: flex !important; position: relative; inset: auto; height: auto; min-height: 560px; z-index: 1; border-bottom: 3px dashed var(--dusty); }
.admin-mode #envelope .env { cursor: default; }
.admin-mode .env-seal { animation: none; }
.admin-mode [data-c]:hover, .admin-mode [data-cpick]:hover { outline: 1.5px dashed var(--dusty); outline-offset: 3px; cursor: text; }
.admin-mode [data-c]:focus { outline: 2px solid var(--plum); outline-offset: 3px; background: rgba(157, 181, 160, 0.18); }
.admin-mode [data-c]:empty::before { content: "Click to add text"; opacity: .55; font-style: italic; }
.admin-mode [data-cpick]:hover, .admin-mode i[data-ccolor]:hover { cursor: pointer; }
.admin-mode img[data-ci] { cursor: pointer; }
.admin-mode img[data-ci]:hover { outline: 3px dashed var(--dusty); outline-offset: -3px; }
.admin-mode .bottom-nav a { pointer-events: auto; }
.admin-mode .env-above, .admin-mode .env-below { animation: none; }

/* ===== Animated monogram ===== */
.mono-anim { position: relative; display: block; aspect-ratio: 1; --d: 0.1s; }
.mono-anim img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mono-anim[data-v="champagne"] { --mono-mask: url("/images/vm-mono-champagne.png"); }
.mono-anim[data-v="mauve"] { --mono-mask: url("/images/vm-mono-mauve.png"); }
.m-sprig { pointer-events: none; }
.mono-anim .sp { display: none; }
.hero-mono { width: 112px; margin: 0 auto 0.5rem; }
.env-mono-light { width: 26%; --d: 1.15s; }
.rsvp-mono { width: 104px; margin: 0 auto 0.3rem; }
@property --p { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --q { syntax: "<percentage>"; inherits: false; initial-value: 0%; }

html.anim:not(.admin-mode) .m-letters {
  --p: -25%;
  -webkit-mask-image: linear-gradient(100deg, #000 var(--p), transparent calc(var(--p) + 22%));
  mask-image: linear-gradient(100deg, #000 var(--p), transparent calc(var(--p) + 22%));
}
html.anim:not(.admin-mode) .m-sprig {
  --q: -30%; transform: scale(0.88); transform-origin: 30% 88%;
  -webkit-mask-image: linear-gradient(35deg, #000 var(--q), transparent calc(var(--q) + 30%));
  mask-image: linear-gradient(35deg, #000 var(--q), transparent calc(var(--q) + 30%));
}
html.anim:not(.admin-mode) .mono-anim.play .m-letters,
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant):not(.is-ready) .mono-anim .m-letters { animation: mWipe 1.6s cubic-bezier(.45,.05,.3,1) .85s forwards; }
html.anim:not(.admin-mode) .mono-anim.play .m-sprig,
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant):not(.is-ready) .mono-anim .m-sprig {
  animation: mGrow 1.2s ease-out 1.4s forwards, mBloom 1s ease-in-out 2.6s;
}
/* Resting opened state: the full V&M monogram is always visible */
html.anim:not(.admin-mode) #envelope.is-instant.is-open .letter .m-letters,
html.anim:not(.admin-mode) #envelope.is-ready .letter .m-letters {
  animation: none;
  --p: 105%;
  -webkit-mask-image: none;
  mask-image: none;
}
html.anim:not(.admin-mode) #envelope.is-instant.is-open .letter .m-sprig,
html.anim:not(.admin-mode) #envelope.is-ready .letter .m-sprig {
  animation: none;
  --q: 110%;
  transform: scale(1);
  transform-origin: 30% 88%;
  -webkit-mask-image: none;
  mask-image: none;
}
@keyframes mWipe { to { --p: 105%; } }
@keyframes mGrow { to { --q: 110%; transform: scale(1); } }
@keyframes mBloom { 0%, 100% { transform: scale(1); filter: none; } 50% { transform: scale(1.045); filter: brightness(1.18); } }

/* soft shimmer sweeping over the letters */
html.anim:not(.admin-mode) .mono-anim.is-default::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.9) 50%, transparent 62%);
  background-size: 260% 100%; background-position: 150% 0;
  -webkit-mask-image: var(--mono-mask); mask-image: var(--mono-mask);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
html.anim:not(.admin-mode) .mono-anim.is-default.play::after,
html.anim:not(.admin-mode) #envelope.is-open .mono-anim.is-default::after { animation: mShimmer 1.5s ease-in-out calc(var(--d) + 2.4s) both; }
@keyframes mShimmer { 0% { opacity: 1; background-position: 150% 0; } 100% { opacity: 1; background-position: -50% 0; } }

/* champagne sparkles */
html.anim:not(.admin-mode) .mono-anim.play .sp,
html.anim:not(.admin-mode) #envelope.is-open .mono-anim .sp { display: block; }
.mono-anim .sp {
  position: absolute; width: 7%; aspect-ratio: 1; background: #F2E0A8; opacity: 0; transform: scale(0);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: mSpark 1.3s ease-in-out calc(var(--d) + var(--sd, 2s)) 1 both;
}
.mono-anim .sp.s1 { left: 78%; top: 8%; --sd: 2.6s; }
.mono-anim .sp.s2 { left: 12%; top: 30%; --sd: 1.5s; width: 5%; }
.mono-anim .sp.s3 { left: 66%; top: 74%; --sd: 2.1s; }
.mono-anim .sp.s4 { left: 40%; top: 14%; --sd: 3s; width: 5%; }
.mono-anim .sp.s5 { left: 88%; top: 40%; --sd: 3.3s; width: 6%; }
@keyframes mSpark { 0% { opacity: 0; transform: scale(0) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } 100% { opacity: 0; transform: scale(0) rotate(90deg); } }

/* hashtag */
.hashtag-label { font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-deep); margin-top: 1.2rem; }
.hashtag { font-size: 1.5rem; color: var(--plum-deep); letter-spacing: 0.04em; font-weight: 600; }
.rsvp-head .rsvp-hashtag-label { color: var(--champagne); opacity: .85; margin-top: 0.9rem; }
.rsvp-head .rsvp-hashtag { color: var(--paper); font-size: 1.3rem; font-weight: 500; letter-spacing: .06em; }
.thanks-hashtag { color: var(--plum); font-weight: 600; margin-top: 0.6rem; }

/* ===== RSVP page: florals + beauty touches ===== */
.rsvp-page { overflow-x: clip; position: relative; }
.rsvp-title-wrap { position: relative; text-align: center; }
.blush { position: absolute; left: 50%; top: 50%; width: min(320px, 90%); height: auto; transform: translate(-50%, -50%); z-index: 0; pointer-events: none; }
.rsvp-title-wrap .section-title { position: relative; z-index: 1; margin: 0.9rem 0; }
.brush-divider { display: block; width: 190px; height: auto; margin: 0 auto 1rem; }
.card-wrap { position: relative; margin-top: 1rem; }
.card-wrap > form, .card-wrap > .thanks { position: relative; z-index: 1; }
.flora-corner { position: absolute; z-index: 2; pointer-events: none; width: 100px; height: 100px; }
.flora-corner.tl { left: -30px; top: -58px; }
.flora-corner.br { right: -30px; bottom: -58px; transform: rotate(180deg); }
.card-wrap > form, .card-wrap > .thanks { padding-top: 2.3rem; padding-bottom: 2.6rem; }
.rsvp-page .btn-send { background: linear-gradient(135deg, #8C3A5E 0%, #5B2A4A 70%); box-shadow: 0 8px 20px rgba(122, 46, 79, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.rsvp-page .btn-send:hover { background: linear-gradient(135deg, #7A2E4F 0%, #4A1F3D 70%); }
.radios label:has(input:checked) { background: linear-gradient(135deg, #8C3A5E, #6B2545); border-color: #6B2545; color: #fff; }
.radios label:has(input:checked) input { accent-color: #F2E0A8; }
.thanks-icons { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.thanks-icons svg { width: 38px; height: 38px; }
.thanks-icons svg:nth-child(2) { width: 30px; height: 30px; opacity: .9; }
.rsvp-biz { text-align: center; font-style: italic; color: var(--dusty); font-size: 1.05rem; letter-spacing: 0.04em; padding: 0 1rem 0.6rem; }
.rsvp-biz::before { content: "✿ "; color: var(--gold); font-style: normal; }
.rsvp-biz::after { content: " ✿"; color: var(--gold); font-style: normal; }
.rsvp-biz[style*="none"]::before, .rsvp-biz[style*="none"]::after { content: none; }
.admin-mode .rsvp-biz:empty::before { content: "Click to add a line (leave empty to hide)"; color: inherit; }
.admin-mode .rsvp-biz:empty::after { content: none; }

/* ===== Gentle effects ===== */
.petal { position: fixed; top: -4vh; left: var(--x); width: var(--s); height: calc(var(--s) * 1.3); z-index: 220; pointer-events: none;
  background: linear-gradient(135deg, var(--c1), var(--c2)); border-radius: 80% 0 80% 0; opacity: 0; will-change: transform;
  animation: petalFall var(--t) linear var(--dl) forwards; }
@keyframes petalFall {
  0% { opacity: 0; transform: translate3d(0, -4vh, 0) rotate(0deg); }
  8% { opacity: .9; }
  50% { transform: translate3d(calc(var(--dx) * .6), 55vh, 0) rotate(calc(var(--r) * .5)); }
  92% { opacity: .85; }
  100% { opacity: 0; transform: translate3d(var(--dx), 108vh, 0) rotate(var(--r)); }
}
.puff { position: fixed; z-index: 160; width: var(--bs); height: var(--bs); margin: calc(var(--bs) / -2) 0 0 calc(var(--bs) / -2); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(201, 163, 179, .75) 0%, rgba(216, 200, 174, .45) 45%, rgba(216, 200, 174, 0) 72%);
  animation: puffOut 1.3s ease-out forwards; }
@keyframes puffOut { 0% { opacity: .95; transform: translate(0, 0) scale(.2); } 100% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(2.1); } }
.conf { position: fixed; z-index: 160; width: 7px; height: 11px; pointer-events: none; border-radius: 1px; animation: confOut 1.6s cubic-bezier(.15,.7,.3,1) forwards; }
@keyframes confOut { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--bx), calc(var(--by) + 160px)) rotate(var(--cr)); } }

html.anim:not(.admin-mode) .rv { opacity: 0; transform: translateY(24px); transition: opacity .9s ease var(--rd, 0ms), transform .9s cubic-bezier(.2,.7,.2,1) var(--rd, 0ms); }
html.anim:not(.admin-mode) .rv.in { opacity: 1; transform: none; }
html.anim:not(.admin-mode) #home .hero-photo { transform: scale(1.1); will-change: transform; }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  html.anim:not(.admin-mode) .rv.in .section-title, html.anim:not(.admin-mode) .section-title.rv.in {
    background: linear-gradient(100deg, var(--plum-deep) 0 38%, #D9BC73 50%, var(--plum-deep) 62% 100%); background-size: 260% 100%; background-position: 130% 0;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
    animation: titleShine 2.4s ease-out .35s 1 forwards;
  }
}
@keyframes titleShine { to { background-position: -30% 0; } }

.count-cell strong { display: block; }
html.anim:not(.admin-mode) .count-cell strong.tick { animation: digitIn .45s cubic-bezier(.2,.8,.3,1); }
@keyframes digitIn { from { opacity: 0; transform: translateY(-45%) rotateX(70deg); } to { opacity: 1; transform: none; } }

/* buttons: soft glow + press */
.btn, .pill { transition: box-shadow .25s ease, transform .15s ease, background .2s; }
.btn:hover, .pill:hover { box-shadow: 0 0 0 4px rgba(196, 163, 90, .22), 0 10px 26px rgba(74, 31, 61, .3); }
.btn:active, .pill:active { transform: scale(.97); }

/* florals sway, flowers breathe */
html.anim:not(.admin-mode) .flora-corner { animation: sway 7s ease-in-out infinite alternate; }
html.anim:not(.admin-mode) .flora-corner.tl { transform-origin: 20% 20%; }
html.anim:not(.admin-mode) .flora-corner.br { transform-origin: 20% 20%; animation-delay: -3s; }
@keyframes sway { from { rotate: -2.2deg; } to { rotate: 2.2deg; } }
html.anim:not(.admin-mode) #envelope .flora { animation: floatY 6s ease-in-out infinite alternate; }
@keyframes floatY { from { translate: 0 -3px; } to { translate: 0 4px; } }

/* hashtag written on by hand */
.rsvp-hashtag, .thanks-hashtag { font-family: "Great Vibes", "Palatino Linotype", cursive; font-weight: 400 !important; }
.rsvp-head .rsvp-hashtag { font-size: clamp(1.3rem, 7.2vw, 1.9rem); letter-spacing: .01em; white-space: nowrap; }
.thanks-hashtag { font-size: clamp(1.2rem, 6.4vw, 1.7rem); color: var(--plum); white-space: nowrap; }
html.anim:not(.admin-mode) .rsvp-hashtag, html.anim:not(.admin-mode) .thanks-hashtag { clip-path: inset(-20% 100% -20% 0); animation: writeOn 2.6s ease-in-out .8s forwards; }
@keyframes writeOn { to { clip-path: inset(-20% 0 -20% 0); } }

/* ===== Invitation suite (collage under the envelope) ===== */
:root { --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .22 0 0 0 0 .28 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
#suite { position: relative; padding: 1.2rem 0 2.6rem; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 16%, #FBF7F1 0%, #F3EEE6 52%, #E7DBCB 100%); }
.su-paper { position: absolute; inset: 0; background-image: var(--noise); opacity: .55; pointer-events: none; mix-blend-mode: multiply; }
.su-pieces { --W: min(92vw, 380px); --u: calc(var(--W) / 100); position: relative; width: var(--W); height: calc(var(--u) * 130); margin: .5rem auto 0; z-index: 1; }

.su-env { position: absolute; left: calc(var(--u) * 12); top: 0; width: calc(var(--u) * 76); height: calc(var(--u) * 78); filter: drop-shadow(0 14px 16px rgba(58, 23, 48, .3)); }
.su-back { position: absolute; left: 0; right: 0; top: calc(var(--u) * 26); bottom: 0; border-radius: 4px; background: var(--noise), linear-gradient(160deg, #6c3559, #4A1F3D 70%); }
.su-pocket { position: absolute; left: 0; right: 0; top: calc(var(--u) * 26); bottom: 0; border-radius: 4px; overflow: hidden; z-index: 1; }
.su-pocket svg { width: 100%; height: 100%; display: block; }
.su-flap { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--u) * 28); z-index: 2; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: var(--noise), linear-gradient(180deg, #7b4068, #5B2A4A); }
.su-liner { position: absolute; left: 6%; right: 6%; top: 9%; bottom: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: var(--noise), repeating-linear-gradient(45deg, rgba(142,95,114,.14) 0 1px, transparent 1px 6px), repeating-linear-gradient(-45deg, rgba(142,95,114,.14) 0 1px, transparent 1px 6px), linear-gradient(180deg, #EFDDE2, #E3C9D2); }
.su-mono { position: absolute !important; width: calc(var(--u) * 17); left: 50%; top: 34%; margin-left: calc(var(--u) * -8.5); }
.su-seal { position: absolute; left: 50%; top: calc(var(--u) * 27); width: calc(var(--u) * 10.5); aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 3;
  border-radius: 53% 47% 51% 49% / 49% 52% 48% 51%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #9a5a84, #6a3358 45%, #3f1833 100%);
  box-shadow: 0 3px 7px rgba(0,0,0,.4), inset 0 2px 3px rgba(255,255,255,.25), inset 0 -2px 4px rgba(0,0,0,.35); }
.su-seal img { width: 62%; height: 62%; object-fit: contain; }
.su-fl { position: absolute; pointer-events: none; z-index: 5; overflow: visible; width: calc(var(--u) * 24); height: auto; aspect-ratio: 1; }
.su-fl.f1 { left: calc(var(--u) * -3); top: calc(var(--u) * 12); transform: rotate(-8deg); }
.su-fl.f2 { right: calc(var(--u) * -5); top: calc(var(--u) * 18); transform: rotate(60deg) scaleX(-1); width: calc(var(--u) * 22); }
.su-fl.f3 { left: calc(var(--u) * -4); bottom: calc(var(--u) * -3); transform: rotate(-80deg); width: calc(var(--u) * 20); z-index: 11; }

.piece { position: absolute; display: block; color: var(--plum-deep); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transform: rotate(var(--rot, 0deg)); transition: transform .25s ease, filter .25s ease; }
.piece:hover, .piece:focus-visible { transform: rotate(var(--rot, 0deg)) translateY(-4px) scale(1.035); outline: none; }
.piece:active { transform: rotate(var(--rot, 0deg)) scale(.975); }
.piece:focus-visible { filter: drop-shadow(0 0 0 var(--gold)) drop-shadow(0 0 6px rgba(196,163,90,.9)); }
.piece .lbl, .piece .card-in { position: absolute; }
.piece .lbl span, .piece .card-in > span { display: block; }
.card-in { inset: calc(var(--u) * 1.6); border: 1px solid rgba(156,123,67,.42); padding: calc(var(--u) * 2) calc(var(--u) * 1.6); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

.p-invite { left: calc(var(--u) * 4); top: calc(var(--u) * 40); width: calc(var(--u) * 50); height: calc(var(--u) * 66); z-index: 6; border-radius: 2px;
  background: var(--noise), linear-gradient(160deg, #F2DDE0, #E5C4CE); box-shadow: 0 6px 14px rgba(58,23,48,.28), 0 1px 2px rgba(58,23,48,.3), inset 0 0 0 1px rgba(255,255,255,.35); }
.p-invite .card-in { color: #5B2A4A; line-height: 1.2; justify-content: flex-start; padding: calc(var(--u) * 2.4) calc(var(--u) * 7) 0 calc(var(--u) * 1.4); }
.ci-top { font-size: calc(var(--u) * 2.3); letter-spacing: .14em; text-transform: uppercase; color: var(--dusty); }
.ci-lead { font-size: calc(var(--u) * 2.8); font-style: italic; margin: calc(var(--u) * .7) 0 calc(var(--u) * 1); }
.ci-wd { font-size: calc(var(--u) * 2.3); letter-spacing: .28em; text-transform: uppercase; color: var(--gold-deep); }
.ci-date { display: flex !important; align-items: baseline; justify-content: center; gap: calc(var(--u) * 1.4); line-height: 1; margin-top: calc(var(--u) * .6); }
.ci-mon { font-size: calc(var(--u) * 4.2); letter-spacing: .3em; text-transform: uppercase; padding-left: .3em; margin-top: calc(var(--u) * .8); }
.ci-day { font-size: calc(var(--u) * 11); font-weight: 500; letter-spacing: .02em; line-height: .95; color: var(--plum-deep); }
.ci-year { font-size: calc(var(--u) * 3.2); letter-spacing: .12em; }
.ci-time { font-size: calc(var(--u) * 3); font-weight: 600; margin-top: calc(var(--u) * .9); letter-spacing: .06em; }
.ci-place { font-size: calc(var(--u) * 2.8); }
.ci-rec { font-size: calc(var(--u) * 2.3); font-style: italic; color: var(--muted); margin-top: calc(var(--u) * .7); }

.p-couple { left: calc(var(--u) * 48); top: calc(var(--u) * 35); width: calc(var(--u) * 47); height: calc(var(--u) * 60); z-index: 7; border-radius: 2px;
  background: var(--noise), linear-gradient(170deg, #FFFCF8, #F1E9DC); box-shadow: 0 7px 16px rgba(58,23,48,.3), 0 1px 2px rgba(58,23,48,.3); }
.p-couple .card-in { justify-content: flex-start; gap: calc(var(--u) * .5); padding-top: calc(var(--u) * 2.2); }
.cc-kicker { font-size: calc(var(--u) * 2.1); letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); }
.cc-names { font-size: calc(var(--u) * 5.8); color: var(--plum-deep); line-height: 1.05; white-space: nowrap; }
.cc-photo { width: 100%; flex: 1; min-height: 0; overflow: hidden; border-radius: calc(var(--u) * 20) calc(var(--u) * 20) 2px 2px; box-shadow: 0 0 0 1px rgba(216,200,174,.9); }
.cc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.cc-date { font-size: calc(var(--u) * 2.5); letter-spacing: .14em; color: var(--muted); }

.su-ribbon { position: absolute; left: calc(var(--u) * 1); top: calc(var(--u) * 54); width: calc(var(--u) * 11); height: calc(var(--u) * 28); z-index: 9; transform: rotate(-6deg); pointer-events: none; filter: drop-shadow(0 2px 2px rgba(58,23,48,.3)); }
.su-ribbon .shape { width: 100%; height: 100%; display: block; }

.p-doily { left: calc(var(--u) * 2); top: calc(var(--u) * 97); width: calc(var(--u) * 30); aspect-ratio: 1; z-index: 8; border-radius: 50%; filter: drop-shadow(0 4px 5px rgba(58,23,48,.28)); }
.p-doily .shape, .p-tag .shape { position: absolute; inset: 0; width: 100%; height: 100%; }
.p-doily .lbl, .p-tag .lbl, .p-rsvp .lbl { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.p-doily .l1 { font-size: calc(var(--u) * 2.1); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.p-doily .l2 { font-size: calc(var(--u) * 7); color: var(--plum); line-height: 1; margin-top: calc(var(--u) * .3); }
.p-tag { left: calc(var(--u) * 58); top: calc(var(--u) * 80); width: calc(var(--u) * 33); aspect-ratio: 1; z-index: 9; border-radius: 50%; filter: drop-shadow(0 4px 6px rgba(58,23,48,.3)); }
.p-tag .l1 { font-size: calc(var(--u) * 8.4); color: #2F4630; line-height: .95; }
.p-tag .l2 { font-size: calc(var(--u) * 3.1); letter-spacing: .34em; padding-left: .34em; color: #FBF7F1; font-weight: 700; margin-top: calc(var(--u) * .5); text-shadow: 0 1px 1px rgba(47,70,48,.4); }
.p-rsvp { left: calc(var(--u) * 35); top: calc(var(--u) * 100); width: calc(var(--u) * 25); aspect-ratio: 1; z-index: 10; border-radius: 53% 47% 51% 49% / 49% 52% 48% 51%;
  background: radial-gradient(circle at 35% 30%, #9a5a84, #6a3358 45%, #3f1833 100%); box-shadow: 0 5px 10px rgba(0,0,0,.4), inset 0 2px 4px rgba(255,255,255,.25), inset 0 -3px 5px rgba(0,0,0,.35); }
.p-rsvp::after { content: ""; position: absolute; inset: calc(var(--u) * 1.8); border-radius: 50%; border: 1px solid rgba(216,200,174,.55); pointer-events: none; }
.p-rsvp .l1 { font-size: calc(var(--u) * 4.4); letter-spacing: .2em; padding-left: .2em; font-weight: 700; color: var(--champagne); line-height: 1; }
.p-rsvp .l2 { font-size: calc(var(--u) * 6.2); color: var(--champagne); line-height: .9; }
.p-blooms { left: calc(var(--u) * 74); top: calc(var(--u) * 107); width: calc(var(--u) * 21); height: calc(var(--u) * 22); z-index: 8; clip-path: polygon(22% 0, 78% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
  background: var(--noise), linear-gradient(170deg, #F1E7D3, #E2D2B6); box-shadow: none; filter: drop-shadow(0 3px 4px rgba(58,23,48,.3)); }
.p-blooms::before { content: ""; position: absolute; left: 50%; top: calc(var(--u) * 1.6); width: calc(var(--u) * 2); height: calc(var(--u) * 2); margin-left: calc(var(--u) * -1); border-radius: 50%; background: #8c7a5a; box-shadow: inset 0 1px 1px rgba(0,0,0,.4); }
.bl-flower { position: absolute; left: 50%; top: calc(var(--u) * 4.2); width: calc(var(--u) * 11); margin-left: calc(var(--u) * -5.5); opacity: .95; }
.bl-flower svg { width: 100%; height: auto; display: block; }
.p-blooms .lbl { left: 6%; right: 6%; bottom: calc(var(--u) * 1.3); font-size: calc(var(--u) * 2.5); letter-spacing: .08em; text-transform: uppercase; color: var(--plum-deep); line-height: 1.1; font-weight: 600; text-align: center; }
.bl-string { display: none; }

.su-hint { position: relative; z-index: 1; margin: .9rem 1rem 0; font-size: .74rem; letter-spacing: .3em; text-transform: uppercase; color: var(--dusty); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; animation: envPulse 2.6s ease-in-out infinite; }
.su-cd-title { position: relative; z-index: 1; font-size: 1.85rem; color: var(--plum); margin: 1.5rem 1rem .2rem; }
#suite .countdown { position: relative; z-index: 1; max-width: 340px; margin: .5rem auto 0; padding: 0 1rem; }
#suite .count-cell { background: rgba(255,251,247,.72); backdrop-filter: none; border: 1px solid rgba(196,163,90,.55); box-shadow: 0 3px 10px rgba(74,31,61,.08); }
#suite .count-cell strong { color: var(--plum-deep); }
#suite .count-cell span { color: var(--olive-green); }
.su-names { position: relative; z-index: 1; font-size: 2.7rem; color: var(--plum-deep); margin: 1.1rem 1rem 0; line-height: 1.1; }
.su-date { position: relative; z-index: 1; font-size: .95rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: .15rem; }

html.anim:not(.admin-mode) .su-pieces:not(.go) .piece, html.anim:not(.admin-mode) .su-pieces:not(.go) .su-ribbon, html.anim:not(.admin-mode) .su-pieces:not(.go) .su-fl { opacity: 0; }
html.anim:not(.admin-mode) .su-pieces.go .piece { animation: pieceIn 1.1s cubic-bezier(.2,.9,.25,1.08) var(--pd, 0s) backwards; }
html.anim:not(.admin-mode) .su-pieces.go .su-ribbon, html.anim:not(.admin-mode) .su-pieces.go .su-fl { animation: fadeIn .9s ease 1.1s backwards; }
html.anim:not(.admin-mode) .su-pieces.go .p-invite::before, html.anim:not(.admin-mode) .su-pieces.go .p-couple::before,
html.anim:not(.admin-mode) .su-pieces.go .p-doily::before, html.anim:not(.admin-mode) .su-pieces.go .p-tag::before, html.anim:not(.admin-mode) .su-pieces.go .p-rsvp::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: pieceHint 2.9s ease-out var(--hd, 1s) infinite; }
html.anim:not(.admin-mode) .su-pieces.go .p-invite::after, html.anim:not(.admin-mode) .su-pieces.go .p-couple::after { content: ""; position: absolute; right: 9%; bottom: 6%; width: calc(var(--u) * 3.4); aspect-ratio: 1; border-radius: 50%;
  background: rgba(255,251,247,.92); border: 1px solid var(--gold); animation: tapDot 2.2s ease-in-out var(--hd, 1s) infinite; pointer-events: none; }
html.anim:not(.admin-mode) .su-pieces.go .p-blooms { animation: pieceIn 1.1s cubic-bezier(.2,.9,.25,1.08) var(--pd, 0s) backwards, bloomBob 3.2s ease-in-out 2s infinite; }
@keyframes pieceIn { 0% { opacity: 0; transform: translateY(calc(var(--u) * -34)) rotate(0deg) scale(.55); } 100% { opacity: 1; transform: rotate(var(--rot, 0deg)); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pieceHint { 0% { box-shadow: 0 0 0 0 rgba(196,163,90,.7); } 65% { box-shadow: 0 0 0 11px rgba(196,163,90,0); } 100% { box-shadow: 0 0 0 11px rgba(196,163,90,0); } }
@keyframes tapDot { 0%, 100% { transform: scale(.85); opacity: .75; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes bloomBob { 0%, 100% { transform: rotate(var(--rot)) translateY(0); } 50% { transform: rotate(calc(var(--rot) + 3deg)) translateY(-3px); } }

/* sheet (details bottom sheet) */
.sheet { position: fixed; inset: 0; z-index: 300; }
.sheet[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(40,16,34,.58); opacity: 0; transition: opacity .35s ease; }
.sheet.open .sheet-bg { opacity: 1; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 660px; max-height: 90vh; max-height: 90dvh; display: flex; flex-direction: column;
  background: var(--noise), var(--paper); border-radius: 22px 22px 0 0; box-shadow: 0 -14px 40px rgba(40,16,34,.38);
  transform: translateY(28px) scale(.92); opacity: 0; transform-origin: 50% 110%;
  transition: transform .5s cubic-bezier(.2,1.15,.3,1), opacity .35s ease; }
.sheet.open .sheet-panel { transform: none; opacity: 1; }
.sheet-grab { padding: .7rem 0 .25rem; display: flex; justify-content: center; touch-action: none; cursor: grab; flex: none; }
.sheet-grab i { width: 46px; height: 4px; border-radius: 4px; background: var(--champagne); }
.sheet-x { position: absolute; top: .5rem; right: .8rem; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--champagne); background: var(--paper); color: var(--plum-deep); font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 2; box-shadow: 0 2px 6px rgba(74,31,61,.15); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
html.sheet-on, html.sheet-on body { overflow: hidden; }
.in-sheet { padding-top: 1.6rem !important; padding-bottom: 2rem !important; background: transparent !important; }
.in-sheet + .in-sheet { border-top: 1px solid var(--celadon-soft); }
.sheet-only { display: none; }
.sheet-only.in-sheet, .admin-mode .sheet-only { display: block; }
.in-sheet .rv { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) { .sheet-panel, .sheet-bg, .piece, #envelope .env-card, #envelope .chip-pop, #envelope .chip-float { transition: none !important; animation: none !important; } }
.admin-mode .piece { cursor: text; }
.admin-mode #suite .su-pieces .piece:hover { transform: rotate(var(--rot, 0deg)); }

/* =====================================================================
   Envelope fix: ONE fixed scene (390x800 design canvas, scaled to fit).
   The envelope never moves; the letter comes out over it; the section
   buttons appear below; each opens a pop-up panel with a Back button.
   ===================================================================== */
#envelope { display: none; --s: 1; justify-content: center; align-items: center; gap: 0; padding: 0; transition: none; }
html.env-on #envelope { display: block; }
#envelope .scene { position: absolute; left: 50%; top: 50%; width: 390px; height: 800px; margin: -400px 0 0 -195px; transform: scale(var(--s)); transform-origin: 50% 50%; }
#envelope .env-above { position: absolute; left: 0; right: 0; top: 24px; margin: 0; font-size: 15px; z-index: 2; }
#envelope .env-stage { position: absolute; left: 27.5px; top: 310px; width: 335px; height: 231px; margin: 0; aspect-ratio: auto; }
#envelope .env-below { position: absolute; left: 0; right: 0; top: 572px; margin: 0; font-size: 12.5px; transition: opacity .4s ease; }
#envelope.is-open .env-below { opacity: 0; animation: none; pointer-events: none; }
#envelope.is-open .env { cursor: default; }
#envelope.is-leaving { opacity: 1; visibility: visible; transform: none; }

/* the letter rises partly out of the envelope; the envelope stays put and stays visible below */
#envelope .env-card.c1.letter { left: 51.5px; right: auto; width: 232px; top: -188px; bottom: auto; height: 276px; box-sizing: border-box; padding: 10px 12px 12px; gap: 0; justify-content: space-between;
  background: var(--noise), linear-gradient(165deg, #FFFCF8, #F4EBDD); border: 1px solid rgba(196,163,90,.55); border-radius: 3px; text-align: center; color: #5B2A4A; line-height: 1.15;
  box-shadow: 0 10px 22px rgba(58,23,48,.28), inset 0 0 0 4px rgba(255,255,255,.5), inset 0 0 0 5px rgba(196,163,90,.28);
  transform: translateY(168px) scale(.55); opacity: 0; z-index: 2; transition: none; }
#envelope .env-card.c2 { left: 51.5px; right: auto; width: 232px; top: -188px; bottom: auto; height: 276px; background: var(--champagne); transform: translateY(168px) scale(.55) rotate(0deg); opacity: 0; z-index: 1; transition: none; }
#envelope.is-open .env-card.c1.letter { transform: none; opacity: 1; z-index: 8; }
#envelope.is-open .env-card.c2 { transform: translate(6px, 7px) rotate(-3.5deg); opacity: 1; z-index: 7; }
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant) .env-card.c1.letter { animation: letterOut 1.65s cubic-bezier(.2,.8,.2,1) .85s both; }
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant) .env-card.c2 { animation: letterOut2 1.65s cubic-bezier(.2,.8,.2,1) .95s both; }
@keyframes letterOut {
  0% { transform: translateY(168px) scale(.55); opacity: 0; z-index: 2; }
  8% { opacity: 1; }
  62% { transform: translateY(-16px) scale(1.02); opacity: 1; z-index: 8; }
  78% { transform: translateY(8px) scale(.995); }
  100% { transform: none; opacity: 1; z-index: 8; }
}
@keyframes letterOut2 {
  0% { transform: translateY(168px) scale(.55); opacity: 0; z-index: 1; }
  8% { opacity: 1; }
  62% { transform: translate(6px, -8px) rotate(-3.5deg) scale(1.02); opacity: 1; z-index: 7; }
  78% { transform: translate(6px, 12px) rotate(-3.5deg); }
  100% { transform: translate(6px, 7px) rotate(-3.5deg); opacity: 1; z-index: 7; }
}
#envelope .letter .env-mono-light { width: 42px; --d: 1.7s; margin: 0 auto; flex: none; }
#envelope.is-instant .letter .env-mono-light { --d: .3s; }
#envelope .letter p { margin: 0; }
#envelope .letter .env-kicker { font-size: 8.5px !important; letter-spacing: .22em; margin-top: 1px; }
#envelope .letter .env-names { font-size: 28px; line-height: 1; white-space: nowrap; }
#envelope .letter .env-rule { display: block; width: 52px; height: 1px; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
#envelope .letter .ci-top { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--dusty); }
#envelope .letter .ci-lead { font-size: 12px; font-style: italic; line-height: 1.2; padding: 0 2px; }
#envelope .letter .ci-wd { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-deep); }
#envelope .letter .ci-date { display: flex; align-items: baseline; justify-content: center; gap: 5px; line-height: 1; }
#envelope .letter .ci-mon { font-size: 15px; letter-spacing: .26em; text-transform: uppercase; padding-left: .25em; }
#envelope .letter .ci-day { font-size: 40px; font-weight: 500; line-height: .95; color: var(--plum-deep); }
#envelope .letter .ci-year { font-size: 12px; letter-spacing: .1em; }
#envelope .letter .ci-time { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; }
#envelope .letter .ci-place { font-size: 12.5px; }
#envelope .letter .ci-rec { font-size: 11px; font-style: italic; color: var(--muted); }
#envelope .flora { z-index: 6; }

/* illustrated sticker icons, scattered above and around the envelope */
.env-menu { position: absolute; inset: 0; width: auto; left: 0; top: 0; display: block; z-index: 12; pointer-events: none; }
.env-menu .chip { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; box-sizing: border-box; min-width: 44px; min-height: 44px; padding: 0; margin: 0;
  text-decoration: none; color: var(--plum-deep); background: none; border: 0; box-shadow: none; letter-spacing: 0; font-weight: 600; opacity: 0; pointer-events: none; -webkit-tap-highlight-color: transparent; }
.env-menu .chip-pop, .env-menu .chip-float { display: flex; flex-direction: column; align-items: center; width: 100%; }
.env-menu .sticker { display: block; width: 100%; filter: drop-shadow(0 6px 8px rgba(58,23,48,.32)); pointer-events: none; }
.env-menu .sticker svg { width: 100%; height: auto; display: block; }
.env-menu .sticker-pol { position: relative; }
.env-menu .sticker-pol svg { width: 100%; height: auto; }
.env-menu .pol-photo { position: absolute; left: 9.5%; top: 8%; width: 81%; height: 68%; object-fit: cover; object-position: 50% 20%; border-radius: 1px; }
.env-menu .sticker svg.pol-heart { position: absolute; right: 3%; top: 3%; width: 22%; height: auto; filter: drop-shadow(0 1px 1px rgba(58,23,48,.35)); }
.env-menu .clbl { display: block; margin-top: 3px; max-width: 120%; text-align: center; font-size: 10.5px; font-weight: 600; line-height: 1.15; letter-spacing: .01em; color: var(--plum-deep);
  background: rgba(255,251,247,.9); border-radius: 8px; padding: 2px 5px; box-sizing: border-box; }
.env-menu .chip:focus-visible { outline: none; }
.env-menu .chip:focus-visible .sticker { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.env-menu .chip:active .chip-float { transform: scale(.96); }

.chip-faq { left: 8px; top: 22px; width: 82px; }
.chip-venue { left: 298px; top: 18px; width: 85px; }
.chip-photos { left: 6px; top: 132px; width: 76px; }
.chip-dress { left: 306px; top: 150px; width: 80px; }
.chip-story { left: 4px; top: 236px; width: 73px; }
.chip-makeup { left: 310px; top: 280px; width: 72px; }
.chip-blooms { left: 10px; top: 366px; width: 90px; }
.chip-rsvp { left: 296px; top: 468px; width: 88px; }

/* When a couple hides Lorified or Beloved Blooms, drop the sticker and rebalance the rest */
#envelope.hide-makeup .chip-makeup,
#envelope.hide-blooms .chip-blooms { display: none; }
/* Remaining stickers keep their default even spacing so the cluster stays tight and Dress Code stays high. */

#envelope.is-ready .env-menu .chip, #envelope.is-instant .env-menu .chip { opacity: 1; }
#envelope.is-ready .env-menu .chip { pointer-events: auto; }
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant) .chip-pop {
  animation: iconPop .75s cubic-bezier(.2,1.2,.3,1) calc(1.75s + var(--i, 0) * .13s) both;
}
html.anim:not(.admin-mode) #envelope.is-ready:not(.is-instant) .chip-float {
  animation: iconFloat 3.5s ease-in-out calc(var(--i, 0) * .28s) infinite;
}
@keyframes iconPop {
  0% { opacity: 0; transform: scale(.15) rotate(calc(var(--rot, 0deg) - 28deg)); }
  72% { opacity: 1; transform: scale(1.14) rotate(calc(var(--rot, 0deg) + 5deg)); }
  100% { opacity: 1; transform: scale(1) rotate(var(--rot, 0deg)); }
}
@keyframes iconFloat {
  0%, 100% { transform: rotate(var(--rot, 0deg)) translateY(0); }
  50% { transform: rotate(calc(var(--rot, 0deg) + 2.4deg)) translateY(-5px); }
}

.env-count { position: absolute; left: 27.5px; width: 335px; top: 655px; text-align: center; opacity: 0; pointer-events: none; }
#envelope.is-ready .env-count, #envelope.is-instant .env-count { opacity: 1; }
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant) .env-count { animation: chipIn .6s ease calc(2.4s) both; }
@keyframes chipIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.env-count .su-cd-title { margin: 0 0 4px; font-size: 20px; color: var(--plum); line-height: 1.1; }
.env-count .countdown { display: flex; gap: 8px; justify-content: center; margin: 0; padding: 0; max-width: none; }
.env-count .count-cell { flex: 1; padding: 5px 2px; background: rgba(255,251,247,.8); backdrop-filter: none; border: 1px solid rgba(196,163,90,.55); border-radius: 0; box-shadow: none; }
.env-count .count-cell strong { font-size: 20px; line-height: 1.1; color: var(--plum-deep); }
.env-count .count-cell span { font-size: 8.5px; letter-spacing: .14em; color: var(--olive-green); }
html.env-on .bottom-nav { display: none; }

/* drifting sparkles */
.spark { position: fixed; z-index: 221; width: var(--ss, 8px); height: var(--ss, 8px); left: var(--x); top: -3vh; pointer-events: none;
  background: #F2E0A8; opacity: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: sparkDrift var(--t, 7s) linear var(--dl, 0s) forwards; }
@keyframes sparkDrift {
  0% { opacity: 0; transform: translate3d(0,-3vh,0) rotate(0) scale(.4); }
  10% { opacity: .95; }
  50% { opacity: .8; transform: translate3d(var(--dx), 50vh, 0) rotate(180deg) scale(1); }
  100% { opacity: 0; transform: translate3d(calc(var(--dx) * 1.15), 105vh, 0) rotate(320deg) scale(.5); }
}

/* admin: opened scene, labels stay editable */
.admin-mode #envelope { display: block !important; position: relative; inset: auto; height: 820px; min-height: 0; overflow: hidden; z-index: 1; border-bottom: 3px dashed var(--dusty); }
.admin-mode #envelope .scene { left: 50%; transform: none; }
.admin-mode .env-menu .chip { opacity: 1; pointer-events: none; }
.admin-mode .env-menu .clbl { pointer-events: auto; }
.admin-mode .env-count { opacity: 1; pointer-events: auto; }
.admin-mode #envelope .env-below { display: none; }

/* pop-up panels */
.sheet { z-index: 300; }
.sheet-bg { background: rgba(40,16,34,.5); }
.sheet-panel { left: 8px; right: 8px; bottom: 8px; max-width: 560px; max-height: calc(100dvh - 40px); max-height: calc(100dvh - 40px); border-radius: 18px; overflow: hidden; }
.sheet-grab { display: none; }
.sheet-bar { flex: none; display: flex; align-items: center; justify-content: flex-start; padding: .5rem .7rem; background: var(--paper); border-bottom: 1px solid var(--celadon-soft); touch-action: none; position: relative; z-index: 3; }
.sheet-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid rgba(91,42,74,.85); background: linear-gradient(135deg, #8C3A5E 0%, #5B2A4A 70%); color: #fff; cursor: pointer; box-shadow: 0 3px 8px rgba(74,31,61,.25); }
.sheet-back .sb-arrow { font-size: 1.25rem; line-height: 1; }
.sheet-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sheet-body { flex: 1 1 auto; min-height: 0; }
.sheet #rsvp { padding-top: 1.2rem; }
.sheet #rsvp .btn-send { width: 100%; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.9rem; letter-spacing: 0.2em; border-radius: 999px; padding: 1rem 1.4rem; background: linear-gradient(135deg, #8C3A5E 0%, #5B2A4A 70%); box-shadow: 0 8px 20px rgba(122,46,79,.28), inset 0 1px 0 rgba(255,255,255,.25); }
.sheet #rsvp .flora-corner.tl { left: -22px; top: -36px; }
.sheet #rsvp .flora-corner.br { right: -22px; bottom: -50px; }
.sheet #rsvp .card-wrap { margin: 2rem .4rem 1.6rem; }
.sheet #rsvp .rsvp-hashtag-label { text-align: center; margin: .4rem 0 0; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dusty); }
.sheet #rsvp .rsvp-hashtag { text-align: center; margin: 0 0 1.4rem; font-size: min(5.4vw, 1.5rem); color: var(--plum); white-space: nowrap; }
.sheet #rsvp .thanks-hashtag { font-size: min(4.4vw, 1.15rem); }
.sheet #rsvp .flora-corner { width: 78px; height: 78px; }
.sheet #rsvp .card-wrap > form, .sheet #rsvp .card-wrap > .thanks { padding-top: 3rem; }
#rsvp.sheet-only .rsvp-intro { text-align: center; }
.admin-mode #rsvp.sheet-only { display: block; }

/* polaroid-style sample galleries (dress, Lorified, Beloved Blooms) */
.sample-wall { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 1rem 0.9rem; padding: 0.6rem 0.3rem 1.3rem; }
.sample-pol { width: calc(42% - 0.2rem); max-width: 160px; margin: 0; background: #FFFCF7; padding: 8px 8px 6px; box-sizing: border-box;
  box-shadow: 0 6px 14px rgba(58,23,48,.2), 0 1px 2px rgba(58,23,48,.12); transform: rotate(var(--r, -2deg)); border-radius: 2px; }
.sample-pol .sample-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center; display: block; background: #E7DBCB; }
#lorified .sample-pol .sample-photo { aspect-ratio: 1; object-position: 50% 20%; }
.sample-pol figcaption { text-align: center; font-size: 0.72rem; line-height: 1.25; color: var(--plum); margin: 0.45rem 0 0.2rem; font-style: italic; }
.sample-wall + p.center { margin-top: 0.2rem; padding-bottom: 1.2rem; }
.sheet .blooms-link, .sheet .lorified-link, #blooms .blooms-link, #lorified .lorified-link {
  display: inline-block; margin: 0.2rem auto 0.6rem; text-decoration: none; }

/* photo wall chip + pop-up (locked until the wedding date or test mode) */
.chip-photos .pw-lock { display: block; }
.chip-photos.is-open .pw-lock { display: none; }
#photowall { text-align: center; }
#photowall .pw-ico { font-size: 2.6rem; line-height: 1; display: block; }
#photowall .pw-open, #photowall .pw-go { display: none; }
#photowall.pw-is-open .pw-open, #photowall.pw-is-open .pw-go { display: block; }
#photowall.pw-is-open .pw-locked, #photowall.pw-is-open .pw-lockline { display: none; }
.admin-mode #photowall .pw-open, .admin-mode #photowall .pw-go { display: block; }
.admin-mode #photowall .pw-locked, .admin-mode #photowall .pw-lockline { display: block; }
#photowall .pw-go { padding-bottom: 1.4rem; }
#photowall .pw-locked { font-size: 1.15rem; padding-bottom: 1.2rem; }

/* Lorified + Beloved Blooms pop-ups: small 3-photo galleries */
#blooms, #lorified { position: relative; text-align: center; }
.sheet #blooms .flora-corner, #blooms .flora-corner { width: 86px; height: 86px; }
.sheet #blooms .flora-corner.tl, #blooms .flora-corner.tl { left: -18px; top: -28px; }
.sheet #blooms .flora-corner.br, #blooms .flora-corner.br { right: -18px; bottom: -36px; }
#lorified .who-title, #blooms .who-title {
  font-size: 0.92rem; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 500; color: var(--gold-deep); line-height: 1.45; padding: 0 0.7rem; margin: 0.2rem 0 0.35rem;
}
#lorified .sample-wall, #blooms .sample-wall {
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start;
  gap: 0.5rem; padding: 0.45rem 0.55rem 1.05rem;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
#lorified .sample-pol, #blooms .sample-pol {
  flex: 0 0 30%; width: 30%; max-width: 124px; scroll-snap-align: center;
}
#lorified .sample-photo, #blooms .sample-photo { aspect-ratio: 1; }
#lorified .sample-photo { object-position: 50% 20%; }
#blooms .sample-photo { object-position: center 72%; }

/* dress code: one landscape sample look each — caption makes clear these are palette samples */
#dress .samples-note { font-size: 0.95rem; font-style: italic; color: var(--muted); margin: 0.4rem 0.8rem 0.2rem; }
.attire-looks { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; padding: 0.2rem 0.3rem 1.1rem; }
.look-group { width: 100%; max-width: 340px; text-align: center; }
.look-group .look-label { margin: 0 0 0.4rem; color: var(--dusty); }
.look-group .sample-wall { padding: 0; justify-content: center; }
.look-group .sample-pol { width: 92%; max-width: 320px; }
.look-group .sample-photo { aspect-ratio: 4 / 3; object-position: center 30%; }

/* =====================================================================
   You're Invited heading — champagne foil script + flanking sprigs
   ===================================================================== */
#envelope .env-invite {
  position: absolute; left: 50%; top: 14px; width: 200px; height: 44px; margin: 0;
  transform: translateX(-50%); display: flex; align-items: center; justify-content: center;
  z-index: 11; pointer-events: none; opacity: 0;
}
#envelope.is-open .env-invite,
#envelope.is-instant .env-invite,
.admin-mode #envelope .env-invite { opacity: 1; }
#envelope .env-invite .env-above {
  position: relative; left: auto; right: auto; top: auto; z-index: auto;
  margin: 0; flex: 1 1 auto; min-width: 0; padding: 0 24px;
  font-family: "Great Vibes", cursive; font-size: 26px; line-height: 1.05;
  letter-spacing: .01em; text-transform: none; text-align: center; font-weight: 400;
  color: #C4A35A;
  background-image: linear-gradient(185deg, #F7EBD0 0%, #E8D5A3 22%, #C4A35A 48%, #F0E0B8 68%, #9C7B43 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(92, 62, 30, .3));
}
.admin-mode #envelope .env-invite { pointer-events: none; }
.admin-mode #envelope .env-invite .env-above { pointer-events: auto; }
#envelope .env-invite .env-above .ch {
  opacity: 0;
  background-image: inherit; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant) .env-invite .env-above .ch {
  animation: inviteLetter .55s ease calc(.2s + var(--i, 0) * .05s) both;
}
@keyframes inviteLetter {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
#envelope.is-instant .env-invite .env-above .ch,
.admin-mode #envelope .env-invite .env-above .ch,
#envelope.is-open.is-instant .env-invite .env-above .ch { opacity: 1; }
#envelope .env-sprig {
  position: absolute; top: 4px; flex: none; width: 22px; height: 30px;
  background: url(/images/vm-sprig-champagne.png) no-repeat;
  /* crop the 800x800 asset to bbox (441,46,655,342) */
  background-size: 81px 81px; background-position: -45px -5px;
  opacity: 0; transform: scale(.2);
  filter: drop-shadow(0 1px 1px rgba(74, 31, 61, .18));
}
#envelope .env-sprig-l { left: 4px; transform: scale(-.2, .2) rotate(-12deg); }
#envelope .env-sprig-r { right: 4px; transform: scale(.2) rotate(-12deg); }
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant) .env-sprig-l {
  animation: sprigGrowL .9s cubic-bezier(.2, 1.15, .3, 1) .16s both;
}
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant) .env-sprig-r {
  animation: sprigGrowR .9s cubic-bezier(.2, 1.15, .3, 1) .26s both;
}
@keyframes sprigGrowL {
  0% { opacity: 0; transform: scale(-.15, .15) rotate(-40deg); }
  100% { opacity: .95; transform: scale(-1, 1) rotate(-12deg); }
}
@keyframes sprigGrowR {
  0% { opacity: 0; transform: scale(.15) rotate(16deg); }
  100% { opacity: .95; transform: scale(1) rotate(-12deg); }
}
#envelope.is-instant .env-sprig-l,
.admin-mode #envelope .env-sprig-l { opacity: .95; transform: scale(-1, 1) rotate(-12deg); }
#envelope.is-instant .env-sprig-r,
.admin-mode #envelope .env-sprig-r { opacity: .95; transform: scale(1) rotate(-12deg); }
#envelope .env-invite::after {
  content: ""; position: absolute; inset: -6px -10px; pointer-events: none;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 248, .9) 50%, transparent 64%);
  background-size: 220% 100%; background-position: 150% 0; mix-blend-mode: soft-light; opacity: 0;
}
html.anim:not(.admin-mode) #envelope.is-open:not(.is-instant) .env-invite::after {
  animation: inviteShine 1.7s ease-in-out 1.3s both;
}
@keyframes inviteShine {
  0% { opacity: 1; background-position: 140% 0; }
  100% { opacity: 1; background-position: -40% 0; }
}
@media (prefers-reduced-motion: reduce) {
  #envelope .env-invite .env-above .ch,
  #envelope .env-sprig-l, #envelope .env-sprig-r { opacity: 1; }
  #envelope .env-sprig-l { transform: scale(-1, 1) rotate(-12deg); }
  #envelope .env-sprig-r { transform: scale(1) rotate(-12deg); }
}

/* =====================================================================
   Close / tuck the letter back into the envelope
   ===================================================================== */
#envelope .env-tuck {
  position: absolute; right: 0; bottom: 36px; left: auto; top: auto; width: 44px; height: 44px;
  margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; filter: none;
  color: var(--gold-deep); cursor: pointer; z-index: 14;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .35s ease;
}
#envelope .env-tuck svg { width: 24px; height: 24px; display: block; opacity: .5; }
#envelope.is-ready .env-tuck,
#envelope.is-instant.is-open .env-tuck { opacity: 1; pointer-events: auto; }
#envelope.is-ready .env-tuck:hover svg,
#envelope.is-ready .env-tuck:focus-visible svg { opacity: .85; }
#envelope.is-ready .env-tuck:focus-visible { outline: 1px solid rgba(156, 123, 67, .45); outline-offset: -8px; }
.admin-mode #envelope .env-tuck { opacity: 1; pointer-events: none; }
#envelope.is-open .env-front,
#envelope.is-open .env-back,
#envelope.is-open .env-flap { pointer-events: auto; cursor: pointer; }
#envelope.is-closing .env-card.c1.letter { animation: letterIn .95s cubic-bezier(.4, 0, .2, 1) both; }
#envelope.is-closing .env-card.c2 { animation: letterIn2 .95s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes letterIn {
  0% { transform: none; opacity: 1; z-index: 8; }
  40% { transform: translateY(-10px) scale(1.01); opacity: 1; z-index: 8; }
  100% { transform: translateY(168px) scale(.55); opacity: 0; z-index: 2; }
}
@keyframes letterIn2 {
  0% { transform: translate(6px, 7px) rotate(-3.5deg); opacity: 1; z-index: 7; }
  100% { transform: translateY(168px) scale(.55); opacity: 0; z-index: 1; }
}
#envelope.is-closing .env-flap {
  transform: none; z-index: 4; filter: none;
  transition: transform .85s ease, filter .85s ease, z-index 0s .45s;
}
#envelope.is-closing .env-seal {
  opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; animation: none;
  transition: opacity .5s ease .35s, transform .5s ease .35s;
}
#envelope.is-closing .env-invite,
#envelope.is-closing .env-menu .chip,
#envelope.is-closing .env-count,
#envelope.is-closing .env-tuck {
  opacity: 0 !important; pointer-events: none !important; transition: opacity .3s ease;
}
#envelope.is-closing .env-below { opacity: 1; pointer-events: auto; transition: opacity .4s ease .45s; }

/* =====================================================================
   Remembered RSVP (same phone)
   ===================================================================== */
.chip-rsvp { overflow: visible; }
.chip-rsvp .rsvp-badge {
  position: absolute; left: 50%; top: auto; bottom: 2px; transform: translate(-55%, 92%);
  z-index: 3; max-width: 96px; padding: 3px 6px; border-radius: 9px;
  background: #FFFBF7; border: 1px solid rgba(196, 163, 90, .7);
  color: var(--plum-deep); font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 8.5px; font-weight: 600; letter-spacing: .02em; line-height: 1.15;
  text-align: center; white-space: normal; pointer-events: none;
  box-shadow: 0 2px 6px rgba(58, 23, 48, .18);
}
.chip-rsvp .rsvp-badge.is-yes { background: #F6EEF3; border-color: #B98FA0; }
.chip-rsvp .rsvp-badge.hidden { display: none; }
.rsvp-saved { text-align: center; padding: 1.1rem 1rem 1.3rem; }
.rsvp-saved-label {
  margin: 0 0 .4rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--plum);
}
.rsvp-saved-name { margin: 0; font-family: "Great Vibes", cursive; font-size: 2rem; color: var(--plum-deep); line-height: 1.1; }
.rsvp-saved-status { margin: .45rem 0 0; font-size: 1.05rem; color: var(--plum-deep); }
.rsvp-saved-when { margin: .35rem 0 1rem; font-size: .85rem; color: var(--muted); }
.rsvp-saved .btn-change { display: inline-flex; }
