/* Mayank Weds Neha — shared styles. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --marigold: #ffb703;
  --marigold-deep: #fb8500;
  --rose: #e85d75;
  --maroon: #7b2d43;
  --cream: #fff8ec;
  --ink: #2b2118;
  --leaf: #4a7c59;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', -apple-system, system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

.pixel { font-family: 'Press Start 2P', monospace; line-height: 1.7; }
.serif { font-family: 'Playfair Display', Georgia, serif; }

/* ---------- palettes ---------- */
.bg-morning {
  background: linear-gradient(180deg, #8ecae6 0%, #bde0fe 45%, #ffe8b6 78%, #ffd166 100%);
}
.bg-golden {
  background: linear-gradient(180deg, #3d1d4e 0%, #7b2d5e 22%, #c94f4f 48%, #f18f4a 72%, #ffd166 100%);
  color: var(--cream);
}
.bg-dusk {
  background: linear-gradient(180deg, #2a2050 0%, #563d7c 38%, #7d5089 70%, #8f5570 100%);
  color: var(--cream);
}
.bg-night {
  background:
    radial-gradient(ellipse 60% 30% at 50% 100%, rgba(255, 140, 50, .35), transparent 70%),
    linear-gradient(180deg, #0d1230 0%, #1a1a3e 55%, #2c2350 100%);
  color: var(--cream);
}

/* ---------- marigold garland strip ---------- */
.garland {
  height: 18px;
  background:
    radial-gradient(circle 6px at 9px 9px, var(--marigold) 92%, transparent),
    radial-gradient(circle 6px at 27px 9px, var(--marigold-deep) 92%, transparent),
    radial-gradient(circle 6px at 45px 9px, var(--rose) 92%, transparent);
  background-size: 54px 18px;
  background-repeat: repeat-x;
}

/* ---------- layout ---------- */
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 3.2rem 0; }

/* ---------- cards ---------- */
.card {
  background: rgba(255, 248, 236, .96);
  color: var(--ink);
  border-radius: 18px;
  padding: 2rem 1.6rem;
  box-shadow: 0 12px 40px rgba(20, 10, 30, .35);
}

.card-dark {
  background: rgba(20, 14, 34, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--cream);
  border-radius: 16px;
  padding: 1.4rem 1.3rem;
}

/* ---------- type ---------- */
.eyebrow {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: .85;
}

h1.names {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.1rem, 9vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
}

h2.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 6vw, 2rem);
  margin-bottom: .6rem;
}

.big-date {
  font-size: clamp(1rem, 4.5vw, 1.3rem);
  font-weight: 700;
  letter-spacing: .08em;
}

.lead { font-size: 1.02rem; line-height: 1.75; }
.muted { opacity: .78; }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--marigold), var(--marigold-deep));
  color: #3a2200;
  box-shadow: 0 6px 22px rgba(251, 133, 0, .45);
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: inherit;
  border: 2px solid currentColor;
  opacity: .9;
}

/* contrast fixes at the bright end of the golden gradient */
.bg-golden .page-nav .btn-ghost { color: #5c2412; }
.bg-golden .tiny-footer { color: #5c2412; opacity: .8; }

.btn-pixel {
  font-family: 'Press Start 2P', monospace;
  font-size: .78rem;
  border-radius: 4px;
  padding: 16px 22px;
  background: var(--marigold);
  color: #3a2200;
  border: 4px solid #3a2200;
  box-shadow: 4px 4px 0 #3a2200;
}
.btn-pixel:active { box-shadow: 1px 1px 0 #3a2200; transform: translate(3px, 3px); }

/* ---------- splash ---------- */
.splash {
  min-height: calc(100vh - 18px);
  min-height: calc(100dvh - 18px); /* garland strip above — page must not scroll */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.2rem 3rem;
  position: relative;
  overflow: hidden;
}

.splash-title {
  font-size: clamp(1.1rem, 5.6vw, 1.9rem);
  color: #3a2a10;
  text-shadow: 3px 3px 0 rgba(255, 255, 255, .5);
  margin: 1.4rem 0 .4rem;
}

.splash-sub {
  font-size: clamp(.55rem, 2.8vw, .8rem);
  color: #5c4520;
  margin-bottom: 2.2rem;
}

.blink { animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.pixel-scene { width: min(88vw, 420px); image-rendering: pixelated; }

.skip-link {
  margin-top: 2.4rem;
  font-size: .86rem;
  color: #5c4520;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* pixel dialog (press start modal) */
.pixel-dialog-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 12, 5, .72);
  display: none;
  align-items: center; justify-content: center;
  padding: 1.4rem;
  z-index: 60;
}
.pixel-dialog-backdrop.open { display: flex; }
.pixel-dialog {
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .45);
  padding: 1.6rem 1.4rem;
  max-width: 420px;
  text-align: center;
}
.pixel-dialog p {
  font-family: 'Press Start 2P', monospace;
  font-size: .68rem;
  line-height: 2;
  color: var(--ink);
  margin-bottom: 1.3rem;
}
.pixel-dialog .btn { display: block; margin: .6rem auto 0; width: 100%; }

/* ---------- invite ---------- */
.invite-hero { padding: 4rem 0 2.4rem; text-align: center; }

.divider {
  width: 70px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--marigold), var(--rose));
  margin: 1.2rem auto;
}

.schedule-card { margin-bottom: 1.1rem; }
.schedule-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: .25rem;
}
.schedule-card .when {
  font-weight: 700; font-size: .85rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--marigold);
  margin-bottom: .55rem;
}
.schedule-card p { line-height: 1.7; font-size: .96rem; }

.faq-item { margin-bottom: 1rem; }
.faq-item b { display: block; margin-bottom: .2rem; }
.faq-item p { font-size: .93rem; line-height: 1.65; opacity: .92; }

/* ---------- story ---------- */
.beat { margin-bottom: 2.6rem; }
.year-chip {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: .62rem;
  background: rgba(255, 183, 3, .18);
  border: 1px solid rgba(255, 183, 3, .55);
  color: var(--marigold);
  padding: 8px 14px;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.beat h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.voice { display: flex; margin-bottom: .9rem; }
.voice .bubble {
  max-width: 88%;
  padding: .9rem 1.05rem;
  border-radius: 14px;
  font-size: .93rem;
  line-height: 1.65;
}
.voice.him { justify-content: flex-start; }
.voice.him .bubble {
  background: rgba(255, 183, 3, .14);
  border: 1px solid rgba(255, 183, 3, .35);
  border-bottom-left-radius: 4px;
}
.voice.her { justify-content: flex-end; }
.voice.her .bubble {
  background: rgba(232, 93, 117, .16);
  border: 1px solid rgba(232, 93, 117, .4);
  border-bottom-right-radius: 4px;
}
.voice .who {
  display: block;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  opacity: .75; margin-bottom: .3rem;
}
.beat-icon { margin: 0 0 .8rem; }
.beat-icon svg { width: 44px; height: 44px; image-rendering: pixelated; }

/* ---------- rsvp ---------- */
.deadline-banner {
  background: linear-gradient(135deg, var(--marigold), var(--marigold-deep));
  color: #3a2200;
  text-align: center;
  font-weight: 700;
  font-size: .88rem;
  padding: 10px 14px;
}

.form-group { margin-bottom: 1.4rem; }
.form-group > label {
  display: block;
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: .5rem;
}

input[type="text"], textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: var(--cream);
  font-family: inherit;
  font-size: 1rem;
}
input[type="text"]::placeholder, textarea::placeholder { color: rgba(255, 248, 236, .45); }
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--marigold);
  background: rgba(255, 255, 255, .12);
}
textarea { min-height: 84px; resize: vertical; }

.choice-row { display: flex; flex-direction: column; gap: .6rem; }
.choice {
  display: flex; align-items: center; gap: .7rem;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  font-size: .95rem;
  transition: border-color .15s, background .15s;
}
.choice input { accent-color: var(--marigold); width: 18px; height: 18px; flex: none; }
.choice.selected {
  border-color: var(--marigold);
  background: rgba(255, 183, 3, .14);
}

.stepper { display: flex; align-items: center; gap: 1rem; }
.stepper button {
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
  color: var(--cream);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
}
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper .count { font-size: 1.3rem; font-weight: 700; min-width: 2ch; text-align: center; }

.saved-banner {
  display: none;
  background: rgba(74, 124, 89, .25);
  border: 1px solid rgba(120, 200, 140, .5);
  color: #c8f0d0;
  border-radius: 12px;
  padding: .9rem 1.1rem;
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}
.saved-banner.show { display: block; }

.tent-line {
  text-align: center;
  font-size: .85rem;
  opacity: .7;
  font-style: italic;
  margin-top: 1.1rem;
  line-height: 1.6;
}

.leaderboard-teaser {
  text-align: center;
  padding: 2rem 1.4rem;
  border: 1.5px dashed rgba(255, 255, 255, .3);
  border-radius: 16px;
}

/* ---------- fire (rsvp bonfire) ---------- */
.bonfire { text-align: center; margin: 0 auto 1rem; }
.bonfire svg { width: 54px; height: 54px; image-rendering: pixelated; }
.flicker { animation: flicker 1.6s ease-in-out infinite alternate; }
@keyframes flicker {
  0% { opacity: 1; }
  100% { opacity: .72; }
}

/* stars for night sky */
.stars {
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.9), transparent),
    radial-gradient(1px 1px at 34% 8%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.5px 1.5px at 58% 22%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 76% 12%, rgba(255,255,255,.65), transparent),
    radial-gradient(1.5px 1.5px at 88% 28%, rgba(255,255,255,.85), transparent),
    radial-gradient(1px 1px at 45% 32%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 22% 40%, rgba(255,255,255,.5), transparent);
  background-repeat: no-repeat;
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .blink, .flicker { animation: none; }
}

/* ---------- egg E4: heart burst + toast ---------- */
.egg-heart {
  position: fixed;
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 80;
  animation: heart-up 1.4s ease-out forwards;
}
@keyframes heart-up {
  0% { opacity: 1; transform: translateY(0) scale(.6); }
  100% { opacity: 0; transform: translateY(-130px) scale(1.4); }
}
.toast {
  position: fixed;
  left: 50%; bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 14, 34, .92);
  color: var(--cream);
  border: 1px solid rgba(255, 183, 3, .6);
  border-radius: 50px;
  padding: 11px 22px;
  font-size: .88rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity .35s, transform .35s;
  z-index: 90;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- game shell ---------- */
#game {
  position: fixed; inset: 0;
  background: #16324a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}
#game[hidden] { display: none; }
#gc {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  background: #8ecae6;
}
.hud {
  position: absolute;
  top: 10px; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: .68rem;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .5);
  pointer-events: none;
}
.hud #hudLives { color: #e85d75; }
.hud #hudMute {
  pointer-events: auto;
  background: rgba(0, 0, 0, .35);
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 6px;
  font-size: .8rem;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
}
.shoot-btn {
  position: absolute;
  bottom: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: auto;
  font-size: .92rem;
  padding: 18px 34px;
  animation: shoot-pulse 1s ease-in-out infinite;
}
.shoot-btn[hidden] { display: none; }
.shoot-btn:active { transform: translateX(-50%) translate(3px, 3px); box-shadow: 1px 1px 0 #3a2200; }
@keyframes shoot-pulse {
  0%, 100% { box-shadow: 4px 4px 0 #3a2200, 0 0 0 0 rgba(255, 183, 3, .55); }
  50% { box-shadow: 4px 4px 0 #3a2200, 0 0 0 12px rgba(255, 183, 3, 0); }
}

.game-overlay {
  position: absolute; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  background: rgba(20, 12, 5, .55);
}
.game-overlay .pixel-dialog { width: 100%; max-width: 380px; }
.game-overlay .btn { display: block; width: 100%; margin: .6rem auto 0; }

/* ---------- footer nav ---------- */
.page-nav {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: 2.4rem 0 3.4rem;
}
.page-nav .btn { width: 100%; }

.tiny-footer {
  text-align: center;
  font-size: .74rem;
  opacity: .55;
  padding-bottom: 2rem;
}


/* ============ wedding palette (Codex rounds 1-2) ============ */
.bg-wedding {
  background: radial-gradient(130% 100% at 50% 0%, #6b1839 0%, #4a0e2b 55%, #2e081c 100%);
  color: #fff8ec;
}
.toran-leaves {
  height: 16px;
  background-image:
    linear-gradient(135deg, #2f7d4f 25%, transparent 25%),
    linear-gradient(225deg, #2f7d4f 25%, transparent 25%);
  background-size: 22px 16px;
  background-repeat: repeat-x;
}

/* card deck */
.deck-wrap { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.deck-head { flex: none; }
.deck { flex: 1; position: relative; perspective: 1200px; margin: 12px 14px 4px; }
.wcard {
  position: absolute; inset: 0;
  background: #fff8ec;
  color: #3a1220;
  border: 2px solid #d4af37;
  border-radius: 16px;
  box-shadow: 0 0 0 6px rgba(212, 175, 55, .18), 0 18px 50px rgba(0, 0, 0, .55);
  padding: 2rem 1.4rem 1.6rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  overflow-y: auto;
  transition: transform .45s ease, opacity .45s ease;
  backface-visibility: hidden;
}
.wcard::before {
  content: '';
  position: absolute; inset: 9px;
  border: 1px solid rgba(180, 140, 40, .65);
  border-radius: 10px;
  pointer-events: none;
}
.wcard .corner { position: absolute; color: #b98c28; font-size: .8rem; }
.wcard .corner.tl { top: 16px; left: 18px; } .wcard .corner.tr { top: 16px; right: 18px; }
.wcard .corner.bl { bottom: 14px; left: 18px; } .wcard .corner.br { bottom: 14px; right: 18px; }
.wcard.off-l { transform: rotateY(-85deg) translateX(-40px); opacity: 0; pointer-events: none; }
.wcard.off-r { transform: rotateY(85deg) translateX(40px); opacity: 0; pointer-events: none; }
.wcard h2 { font-family: 'Playfair Display', Georgia, serif; color: #6b1839; font-size: clamp(1.3rem, 5.6vw, 1.8rem); margin-bottom: .5rem; }
.wcard .eyebrow { color: #b06000; }
.wcard p { line-height: 1.7; font-size: .95rem; }
.wcard .big-date { color: #6b1839; }
.gold-divider {
  width: 90px; height: 2px; background: #d4af37; margin: .9rem auto; position: relative;
}
.gold-divider::after {
  content: '\2666'; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -54%); color: #d4af37; font-size: .7rem; background: #fff8ec; padding: 0 6px;
}
.pixel-heart-sep { color: #e85d75; font-size: .8rem; letter-spacing: .5em; margin: .6rem 0; }

/* deck nav */
.deck-nav { flex: none; display: flex; align-items: center; justify-content: center; gap: 1.1rem; padding: .8rem 0 1.2rem; }
.deck-nav button {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, .8);
  background: rgba(212, 175, 55, .12); color: #ffd98a;
  font-size: 1.2rem; cursor: pointer;
}
.deck-dots { display: flex; gap: 8px; }
.deck-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 248, 236, .3); transition: background .2s, transform .2s; }
.deck-dots span.on { background: #d4af37; transform: scale(1.3); }
.swipe-hint { font-size: .78rem; opacity: .65; margin-top: 1rem; }

/* gold frame for rsvp form */
.gold-frame {
  border: 1.5px solid rgba(212, 175, 55, .65) !important;
  box-shadow: 0 0 0 5px rgba(212, 175, 55, .12);
}
.greet-line { color: #ffd98a; font-family: 'Playfair Display', Georgia, serif; font-size: 1.15rem; margin-bottom: .4rem; }

/* pixel name input (splash) — input[type=text] beats a bare class, so match its specificity */
input.pixel-input[type="text"],
.pixel-input {
  font-family: 'Press Start 2P', monospace;
  font-size: .7rem;
  padding: 12px 10px;
  width: 100%;
  border: 3px solid #2b2118;
  background: #fff;
  color: #2b2118;
  margin-bottom: 1rem;
  text-align: center;
  text-transform: uppercase;
}
.pixel-input:focus { outline: 3px solid #fb8500; }
input.pixel-input[type="text"]::placeholder { color: #9a8f80; }


/* ============ story page: family-album treatment ============ */
.story-wrap { position: relative; max-width: 640px; margin: 0 auto; padding: 0 20px 2rem; }
.story-wrap::before {
  content: '';
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(rgba(212,175,55,0), rgba(212,175,55,.5) 4%, rgba(212,175,55,.5) 96%, rgba(212,175,55,0));
}
.album-card {
  position: relative;
  background: #fff8ec;
  color: #3a1220;
  border: 2px solid #d4af37;
  border-radius: 16px;
  box-shadow: 0 0 0 5px rgba(212, 175, 55, .15), 0 14px 40px rgba(0, 0, 0, .45);
  padding: 2.2rem 1.3rem 1.5rem;
  margin: 0 0 3.2rem;
}
.album-card::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(180, 140, 40, .55);
  border-radius: 10px;
  pointer-events: none;
}
.album-card .corner { position: absolute; color: #b98c28; font-size: .75rem; }
.album-card .corner.tl { top: 14px; left: 16px; } .album-card .corner.tr { top: 14px; right: 16px; }
.album-card .corner.bl { bottom: 12px; left: 16px; } .album-card .corner.br { bottom: 12px; right: 16px; }
.album-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #6b1839; text-align: center;
  font-size: 1.35rem; margin: .2rem 0 1rem;
}
.year-medal {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  background: #d4af37; color: #4a0e2b;
  font-family: 'Press Start 2P', monospace; font-size: .58rem;
  padding: 8px 16px; border-radius: 999px;
  border: 2px solid #fff8ec;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  white-space: nowrap; z-index: 2;
}
.icon-ring {
  width: 54px; height: 54px; border-radius: 50%;
  border: 2px solid #d4af37; background: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .9rem;
}
.icon-ring svg { width: 30px; height: 30px; image-rendering: pixelated; }
.album-card .voice .bubble { font-size: .92rem; }
.album-card .voice.him .bubble {
  background: rgba(107, 24, 57, .07);
  border: 1px solid rgba(107, 24, 57, .22);
  border-bottom-left-radius: 4px; color: #3a1220;
}
.album-card .voice.her .bubble {
  background: rgba(232, 93, 117, .12);
  border: 1px solid rgba(232, 93, 117, .35);
  border-bottom-right-radius: 4px; color: #3a1220;
}
.album-card .voice.him .who { color: #6b1839; opacity: 1; }
.album-card .voice.her .who { color: #c9455f; opacity: 1; }

/* two voices converge: his lines from the left, hers from the right */
.reveal-l { opacity: 0; transform: translateX(-26px); transition: opacity .6s ease, transform .6s ease; }
.reveal-r { opacity: 0; transform: translateX(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal-l.visible, .reveal-r.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-l, .reveal-r { opacity: 1; transform: none; transition: none; }
}

.gold-divider.gd-dark::after { background: #4a0e2b; }
.btn-ghost-gold {
  background: transparent;
  color: #ffd98a;
  border: 1.5px solid rgba(212, 175, 55, .75);
}
.story-hero { text-align: center; padding: 2.6rem 20px 2.2rem; }
.story-hero .eyebrow { color: #ffd98a; }
.story-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #fff8ec;
  font-size: clamp(1.9rem, 7.5vw, 2.8rem);
  margin: .5rem 0 .2rem;
}
.story-footer { text-align: center; color: #d4af37; font-size: .8rem; padding: .5rem 0 2.4rem; opacity: .8; }

/* ============ one-screen compaction (no page scrolls) ============ */
body.bg-night { min-height: 100dvh; }

/* rsvp: tighter rhythm so the whole form fits one screen */
#rsvpForm { padding: 1.05rem 1rem .9rem; }
#rsvpForm .form-group { margin-bottom: .4rem; }
#rsvpForm .form-group > label { font-size: .84rem; margin-bottom: .2rem; }
#rsvpForm input[type="text"] { padding: 6px 13px; font-size: .95rem; }
#rsvpForm .choice { padding: 9px 11px; font-size: .86rem; gap: .55rem; }
#rsvpForm .choice-row { gap: .45rem; }
.choice-row.cols { flex-direction: row; }
.choice-row.cols .choice { flex: 1; align-items: flex-start; }
#rsvpForm .tent-line { font-size: .74rem; margin-top: .35rem; line-height: 1.4; }
.saved-banner { padding: .55rem .8rem; font-size: .78rem; margin-bottom: .7rem; line-height: 1.4; }

/* compact nav row under the form */
.nav-row { display: flex; gap: .6rem; padding: .8rem 0 max(1rem, env(safe-area-inset-bottom)); }
.nav-row .btn { flex: 1; font-size: .82rem; padding: 10px 12px; }

/* leaderboard modal */
.lb-modal {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(8, 6, 18, .78);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 20px;
}
.lb-modal[hidden] { display: none; }
.lb-box { position: relative; width: 100%; max-width: 360px; max-height: 82dvh; overflow-y: auto; text-align: center; }
.lb-close {
  position: absolute; top: 6px; right: 10px;
  background: none; border: none; color: var(--cream);
  font-size: 1.7rem; line-height: 1; cursor: pointer; opacity: .75; padding: 6px;
}
.lb-close:hover { opacity: 1; }

/* short phones: squeeze a little more */
@media (max-height: 760px) {
  .invite-hero .names { font-size: 1.2rem !important; }
  #rsvpForm .form-group { margin-bottom: .55rem; }
  #rsvpForm .choice { padding: 7px 10px; font-size: .8rem; }
  #rsvpForm input[type="text"] { padding: 8px 12px; font-size: .9rem; }
  #rsvpForm .btn { padding: 11px 24px; font-size: .92rem; }
  #rsvpForm .tent-line { display: none; }
  .deadline-banner { padding: 6px 12px; font-size: .78rem; }
  .nav-row { padding-top: .5rem; }
  .nav-row .btn { padding: 8px 10px; font-size: .78rem; }
}

/* editing an existing RSVP: deadline + tent joke already served their purpose */
body.editing .deadline-banner, body.editing .tent-line { display: none; }

/* very short phones (SE class) */
@media (max-height: 700px) {
  .invite-hero { padding-top: .6rem !important; }
  .invite-hero .names { font-size: 1.05rem !important; }
  .deadline-banner { display: none; }
  #rsvpForm { padding: .85rem .85rem .75rem; }
  #rsvpForm .form-group { margin-bottom: .45rem; }
  #rsvpForm .form-group > label { font-size: .76rem; margin-bottom: .25rem; }
  #rsvpForm .choice { padding: 6px 9px; font-size: .76rem; gap: .45rem; }
  #rsvpForm input[type="text"] { padding: 7px 11px; font-size: .88rem; }
  #rsvpForm .btn { padding: 10px 20px; font-size: .88rem; }
  .greet-line { display: none; }
}

/* author display rules must never defeat the hidden attribute */
[hidden] { display: none !important; }

/* Shared blossom primitives. Historical lotus-* names are used by Sakura. */
.lotus-bg, .lotus-fg { position: fixed; inset: 0; overflow: hidden; }
.lotus-bg { z-index: 0; }
.lotus-fg { z-index: 2; pointer-events: none; }

/* bloom: petals unfurl from a closed bud, staggered */
.petal {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: rotate(var(--a)) scale(var(--s, 1));
  animation: bloom 1.6s cubic-bezier(.18, .8, .28, 1) both;
  animation-delay: calc(var(--d, 0s) + var(--i) * .13s);
}
@keyframes bloom {
  from { opacity: .15; transform: rotate(0deg) scale(calc(var(--s, 1) * .55)) scaleY(.35); }
  to   { opacity: 1; transform: rotate(var(--a)) scale(var(--s, 1)); }
}
.lotus-heart {
  animation: heartin .8s ease both;
  animation-delay: calc(var(--d, 0s) + 1.9s);
}
@keyframes heartin { from { opacity: 0; } to { opacity: 1; } }
.lotus-stem { stroke-dasharray: 120; stroke-dashoffset: 120; animation: stemgrow 1.2s ease forwards; animation-delay: calc(var(--d, 0s) * .5); }
@keyframes stemgrow { to { stroke-dashoffset: 0; } }

/* alive after the bloom: slow breathing sway */
.lotus-sway { animation: lsway 7.5s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.lotus-sway.s2 { animation-duration: 9.5s; animation-delay: -3s; }
.lotus-sway.s3 { animation-duration: 11s; animation-delay: -6s; }
@keyframes lsway { from { rotate: -2deg; } to { rotate: 2.2deg; } }

/* drifting petals */
.drift { position: absolute; top: -20px; opacity: 0; animation: driftfall var(--dur) linear infinite; animation-delay: var(--dl); }
@keyframes driftfall {
  0% { opacity: 0; transform: translate3d(0, -4vh, 0) rotate(10deg); }
  8% { opacity: .55; }
  85% { opacity: .45; }
  100% { opacity: 0; transform: translate3d(7vw, 106vh, 0) rotate(300deg); }
}

@media (prefers-reduced-motion: reduce) {
  .petal, .lotus-heart, .lotus-stem { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .lotus-sway { animation: none; }
  .drift { display: none; }
}

/* ============ sakura theme + single-page invite ============ */
body.bg-sakura {
  min-height: 100dvh;
  color: #6b5a52;
  background: linear-gradient(170deg, #fdf6f4 0%, #fbeef0 50%, #f8e7ea 100%);
  font-family: 'Montserrat', sans-serif;
}
.bg-sakura main, .bg-sakura .invite-hero, .bg-sakura .nav-row,
.bg-sakura .deadline-banner, .bg-sakura .saved-banner, .bg-sakura #editRsvp { position: relative; z-index: 1; }

/* sakura clusters */
.scluster { position: absolute; pointer-events: none; }
.scluster .twig { position: absolute; inset: 0; width: 100%; height: 100%; }
.scluster .sp { position: absolute; }
.sc-tl { top: -18px; left: -24px; width: min(42vw, 230px); height: min(34vw, 185px); transform-origin: 0 0; }
.sc-br { bottom: -42px; right: -44px; width: min(48vw, 258px); height: min(30vw, 162px); transform-origin: 100% 100%; }
.sband { position: absolute; left: 0; right: 0; bottom: 0; height: 20vh; pointer-events: none; }
.sband .sp { position: absolute; }
.sak { display: block; }

/* invitation card + same-page RSVP dialog */
.invite-experience { position: relative; z-index: 1; }
.invite-single {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: max(20px, 4vh) 22px;
}
.invite-rsvp-section {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 20px max(16px, env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
.rsvp-modal {
  position: fixed; inset: 0; margin: auto;
  width: min(480px, calc(100vw - 28px)); max-width: none;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid #e2cbd0; border-radius: 14px;
  background: #fffaf8; color: #675b58; overflow: hidden;
  box-shadow: 0 18px 55px rgba(70, 35, 48, .2);
}
.rsvp-modal[open] { display: flex; flex-direction: column; }
.rsvp-modal::backdrop { background: rgba(55, 37, 45, .38); }
body.rsvp-open { overflow: hidden; position: fixed; left: 0; right: 0; top: var(--rsvp-scroll-top, 0); }
.rsvp-dialog-head { position: relative; flex: none; padding: 22px 50px 10px; text-align: center; }
.rsvp-dialog-head h2 { margin: 0; font: 500 clamp(21px, 6vw, 26px)/1.15 'Cormorant Garamond', Georgia, serif; color: #865868; }
.rsvp-close {
  position: absolute; right: 5px; top: 5px; width: 44px; height: 44px;
  border: 0; background: transparent; color: #865868;
  font: 26px/1 Georgia, serif; cursor: pointer;
}
.rsvp-close:focus-visible, .inv-rsvp:focus-visible { outline: 2px solid #986f50; outline-offset: 2px; }
.rsvp-modal #rsvpForm { margin: 0 auto; width: 100%; box-shadow: none; background: transparent; padding: 8px 0; border: 0; }
.rsvp-modal input[type="text"] { font-size: 16px !important; }
.rsvp-modal .foot-nav { flex-wrap: wrap; gap: 4px 16px; }
.rsvp-modal .toast { position: absolute; max-width: calc(100% - 32px); white-space: normal; text-align: center; bottom: 16px; }
.rsvp-modal .lb-modal { border-radius: 14px; }
.rsvp-modal .lb-close { min-width: 44px; min-height: 44px; }
.invite-rsvp-section .deadline-banner { margin: 0 auto 10px; }
.invite-rsvp-section .greet-line { text-align: center; }
.invite-rsvp-section .form-title {
  font-size: clamp(1.15rem, 4.6vw, 1.5rem);
  text-align: center; margin-bottom: .6rem;
}
.invite-rsvp-section #editRsvp {
  width: 100%; max-width: 350px; margin: 0 auto .7rem;
  font-size: .85rem; padding: 10px 16px;
}
.leaderboard-game { margin-top: 1rem; font-size: .85rem; padding: 10px 22px; }
#lbRows { margin-top: .7rem; }
.invite-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 340px;
  text-align: center;
  border-radius: 6px;
  padding: clamp(1.4rem, 4.5vh, 2.6rem) 1.4rem;
}
.bg-sakura .invite-card {
  background: rgba(255, 253, 253, .92);
  box-shadow: 0 22px 60px rgba(122, 66, 88, .18), 0 4px 16px rgba(122, 66, 88, .1);
  color: #6b5a52;
}

/* invitation typography (reference: gold serif caps + script) */
.inv-eyebrow {
  font-size: .72rem; letter-spacing: .34em; text-transform: uppercase;
  color: #9a8578; font-weight: 600;
}
.inv-names {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 8.4vw, 2.7rem);
  letter-spacing: .14em; text-transform: uppercase;
  color: #c9a24b;
  line-height: 1.14;
  margin: .7rem 0 .55rem;
  display: flex; flex-direction: column; align-items: center; gap: .1em;
}
.inv-and {
  font-family: 'Great Vibes', cursive;
  text-transform: none; letter-spacing: .02em;
  font-size: .58em; color: #8a7968; font-weight: 400;
  margin: -.15em 0;
}
.inv-caps {
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  color: #6b5a52; font-weight: 600; margin: .3rem 0;
}
.inv-day { margin-top: .7rem; }
.inv-script {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.9rem, 8vw, 2.5rem);
  color: #c9863f; line-height: 1.15; margin: .15rem 0;
}
.inv-rule { width: 120px; height: 1px; background: #d9c1a8; margin: .85rem auto; position: relative; }
.inv-rule::after {
  content: '\2766'; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -52%); font-size: .7rem; color: #c9a24b;
  background: inherit; padding: 0 8px; background: transparent;
}
.inv-venue {
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 700; color: #6b5a52; line-height: 1.8;
}
.inv-venue span { font-weight: 400; font-size: .72rem; opacity: .85; }
.inv-note {
  font-family: 'Playfair Display', Georgia, serif; font-style: italic;
  font-size: .86rem; line-height: 1.65; color: #8a7264; margin: .9rem 0 1.2rem;
}
.inv-rsvp { width: 100%; max-width: 250px; }
.bg-sakura .btn-primary {
  background: linear-gradient(135deg, #eb9db5, #dd7396);
  color: #fff; box-shadow: 0 8px 24px rgba(221, 115, 150, .4);
}
.inv-links { margin-top: .9rem; font-size: .8rem; color: #9a8578; display: flex; gap: .55rem; justify-content: center; align-items: center; }
.linklike {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: rgba(0, 0, 0, .25);
}
.inv-champ { margin-top: .8rem; font-size: .74rem; font-weight: 600; color: #c9863f; }

/* good-to-know modal body */
.gtk-box { text-align: left; }
.gtk-body p { font-size: .84rem; line-height: 1.55; margin-bottom: .8rem; }
.gtk-body b { display: block; margin-bottom: .1rem; }
.bg-sakura .lb-box.gtk-box, .bg-sakura .lb-box {
  background: #fffdfd; color: #6b5a52; border: none;
  box-shadow: 0 22px 60px rgba(90, 40, 60, .3);
}
.bg-sakura .lb-close { color: #6b5a52; }

/* sakura RSVP: white panel, dark text (reference right panel) */
.bg-sakura .deadline-banner { background: linear-gradient(135deg, #eb9db5, #dd7396); color: #fff; }
.bg-sakura h1.names { color: #b8637f; font-family: 'Playfair Display', Georgia, serif; }
.bg-sakura .greet-line { color: #c9863f; }
.bg-sakura .card-dark.gold-frame { border: none !important; box-shadow: 0 18px 50px rgba(122, 66, 88, .16); }
#rsvpForm { max-width: 420px; margin-left: auto; margin-right: auto; }
.bg-sakura #rsvpForm { padding: 1.5rem 1.4rem 1.2rem; }
.form-title { line-height: 1.3; }
.bg-sakura .form-title { color: #b8637f; font-family: 'Playfair Display', Georgia, serif; }
.bg-sakura .card-dark {
  background: rgba(255, 253, 253, .94);
  border: none;
  box-shadow: 0 18px 50px rgba(122, 66, 88, .16);
  color: #6b5a52;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.bg-sakura .card-dark input[type="text"] {
  background: #fff; border-color: #e5cdd5; color: #5a4a52;
}
.bg-sakura .card-dark input[type="text"]::placeholder { color: #b9a5ad; }
.bg-sakura .card-dark input[type="text"]:focus { border-color: #dd7396; background: #fff; }
.bg-sakura .choice { background: #fdf7f8; border-color: #e5cdd5; color: #6b5a52; }
.bg-sakura .choice input { accent-color: #dd7396; }
.bg-sakura .choice.selected { border-color: #dd7396; background: rgba(221, 115, 150, .1); }
.bg-sakura .saved-banner { background: rgba(111, 148, 80, .12); border-color: rgba(111, 148, 80, .4); color: #557a3a; }
.bg-sakura .tent-line { color: #9a8578; }
.bg-sakura .nav-row .btn-ghost, .bg-sakura #editRsvp { color: #b8637f; }
.bg-sakura .lb-modal p, .bg-sakura .lb-box .muted { color: #8a7264; }
.bg-sakura .lb-box [style*="ffd23f"] { color: #c9863f !important; }

@media (max-height: 700px) {
  .invite-card { padding: 1.1rem 1.2rem; }
  .inv-names { font-size: 1.7rem; margin: .6rem 0 .5rem; }
  .inv-script { font-size: 1.6rem; }
  .inv-note { margin: .6rem 0 .8rem; }
  .inv-rule { margin: .7rem auto; }
}

/* ============ loop-3: stationery typography refinement (sakura) ============ */
.bg-sakura .inv-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .38em; color: #776966; margin-bottom: 14px; }
.bg-sakura .inv-names { font-weight: 500; letter-spacing: .16em; color: #b88732; font-size: clamp(1.85rem, 8vw, 2.35rem); }
.bg-sakura .inv-and { font-size: 16px; color: #8e7b76; }
.bg-sakura .inv-script { font-size: 30px; color: #b88732; margin: 10px 0 6px; }
.bg-sakura .inv-caps { font-size: 12px; font-weight: 500; letter-spacing: .24em; color: #675b58; }
.bg-sakura .inv-venue { font-size: 14px; font-weight: 600; letter-spacing: .22em; color: #5f534f; margin-top: 6px; }
.bg-sakura .inv-venue span { font-size: 11px; font-weight: 400; letter-spacing: .28em; }
.bg-sakura .inv-note { font-size: 14px; line-height: 1.55; color: #8c7470; }
.bg-sakura .inv-rsvp {
  background: transparent; box-shadow: none; color: #765460;
  font-family: 'Montserrat', sans-serif; font-weight: 600; text-transform: uppercase;
}
.bg-sakura .inv-links { font-size: 11px; color: #8c7470; margin-top: 6px; gap: 10px; }
.bg-sakura .inv-champ { font-size: 11px; color: #8c7470; margin-top: 10px; }

/* rsvp panel: clean stationery column */
.bg-sakura .form-title { font-size: 23px; line-height: 1.05; color: #b65e79; }
.bg-sakura .card-dark .form-group > label { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #675b58; }
.bg-sakura .card-dark input[type="text"],
.bg-sakura .choice {
  border: 1px solid #ddbfc8; border-radius: 2px;
  font-size: 14px; color: #675b58; min-height: 44px;
}
.bg-sakura .choice.selected { border-color: #c9879d; background: rgba(201, 135, 157, .1); }
.bg-sakura #rsvpForm .btn-primary {
  border-radius: 2px; background: #c9879d;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff;
  box-shadow: 0 6px 18px rgba(201, 135, 157, .35);
}
.bg-sakura .nav-row .btn { border-radius: 2px; }
.bg-sakura #editRsvp { border-radius: 2px; }

/* custom radio controls */
.choice input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #ddbfc8; background: transparent; margin: 0;
  display: inline-block; flex: none; transition: border-color .15s, background .15s;
}
.bg-sakura .choice input[type="radio"]:checked { border-color: #c9879d; background: radial-gradient(circle, #c9879d 0 4.5px, transparent 5px); }
/* fewer petals over controls */

/* loop-5 final nitpicks */
.bg-sakura .tent-line, .bg-sakura .inv-note { color: #9b777d; }

/* year as engraved numerals, not spelled-out text */
.inv-year {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 1.15rem; font-weight: 600;
  letter-spacing: .55em; text-indent: .55em; /* re-center tracked text */
  color: #b88732; margin: .2rem 0 0;
}

/* ============ mobile polish (device-emulation audit) ============ */
/* iOS zooms the page when a focused input is under 16px — never allow that */
input[type="text"], textarea { font-size: 16px !important; }

/* tiny text links need real thumb targets without changing visual layout */
.linklike { display: inline-block; padding: 12px 6px; margin: -10px -2px; }

/* 44px minimum touch targets */
.lb-close { padding: 8px 14px; }

/* ============ couture RSVP: de-boxed stationery controls ============ */
/* options: hairline rows, not cards */
#rsvpForm .choice {
  background: none !important;
  border: none !important;
  border-bottom: 1px solid #dfc4ce !important;
  border-radius: 0;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 15px;
  color: #655557;
  gap: .8rem;
  transition: background .25s, transform .25s, color .25s;
}
#rsvpForm .choice-row { gap: 0; }
#rsvpForm .choice-row.cols { flex-direction: column; }
#rsvpForm .choice.selected {
  background: rgba(248, 237, 241, .55) !important;
  transform: translateX(2px);
  color: #4c3f42;
  font-weight: 600;
}

/* selector circles: 16px hairline, 6px dot + halo when chosen */
#rsvpForm .choice input[type="radio"] {
  width: 16px; height: 16px; border-width: 1px; border-color: #c7839d;
}
.bg-sakura #rsvpForm .choice input[type="radio"]:checked {
  border-color: #c7839d;
  background: radial-gradient(circle, #c7839d 0 3px, transparent 3.5px);
  box-shadow: 0 0 0 4px rgba(199, 131, 157, .16);
}

/* written-line inputs */
#rsvpForm input[type="text"] {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #dfc4ce !important;
  border-radius: 0;
  padding: 8px 2px;
  color: #4c3f42;
}
#rsvpForm input[type="text"]:focus { border-bottom-color: #c7839d !important; }

/* labels: quiet engraved captions */
#rsvpForm .form-group > label {
  font-size: 11px !important; font-weight: 600 !important;
  letter-spacing: .14em; text-transform: uppercase;
  color: #9b8489 !important; margin-bottom: .3rem;
}

/* submit: centered cartouche */
#rsvpForm .btn-primary {
  display: block;
  width: 248px; max-width: calc(100% - 40px);
  height: 52px; line-height: 52px; padding: 0;
  margin: 26px auto 0;
  border-radius: 2px !important;
  font-size: 12px !important; font-weight: 600 !important;
  letter-spacing: .18em !important; text-transform: uppercase;
}
.bg-sakura #rsvpForm .btn-primary {
  background: #c7839d; color: #fffdfb;
  box-shadow: inset 0 0 0 1px #e2b9c8, 0 10px 26px rgba(199, 131, 157, .3);
}

/* panel proportions */
#rsvpForm { max-width: 420px; }
.bg-sakura #rsvpForm { border-radius: 14px; padding: 18px 16px 18px; }

/* footnote navigation: engraved, not buttons */
.foot-nav {
  position: relative; z-index: 1;
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 2px 0 max(.9rem, env(safe-area-inset-bottom));
}
.footlink {
  background: none; border: none; cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: #a96c83; text-decoration: none;
  padding: 16px 6px; position: relative;
}
.footlink::after {
  content: ''; position: absolute; left: 6px; right: 6px; bottom: 12px;
  height: 1px; background: #dab3c2;
}
.foot-dot { color: #a96c83; opacity: .6; }

/* tent line: italic serif whisper */
#rsvpForm .tent-line { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 11px !important; opacity: .75; }

/* short screens: stacked hairline rows need tighter rhythm */
@media (max-height: 760px) {
  #rsvpForm .choice { min-height: 42px; padding: 8px 4px; font-size: 14px; }
  #rsvpForm .btn-primary { height: 46px; line-height: 46px; margin-top: 18px; }
}
@media (max-height: 700px) {
  #rsvpForm .choice { min-height: 38px; padding: 6px 3px; font-size: 13px; }
  #rsvpForm .tent-line { display: none; }
}

/* loop-2 refinements: kill the last web-form tells */
.deadline-banner {
  background: none !important;
  color: #a96c83 !important;
  font-size: 11px !important; font-weight: 600 !important;
  letter-spacing: .22em; text-transform: uppercase;
  padding: 14px 12px 2px !important;
}
#rsvpForm .choice { border-bottom: none !important; position: relative; }
#rsvpForm .choice::after {
  content: ''; position: absolute; left: 24px; right: 0; bottom: 0;
  height: .5px; background: currentColor; opacity: .35;
}
#rsvpForm .btn-primary {
  border-radius: 28px !important;
  height: 48px; line-height: 48px;
}
.footlink { font-size: 10px; letter-spacing: .16em; }
.footlink::after { display: none; }
.foot-dot { display: none; }
.foot-nav { gap: 26px; }

/* ============ the entry moment: envelope + seal + ink ============ */
.env-ov {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .45s ease;
}
.bg-sakura .env-ov { background: linear-gradient(170deg, #fdf6f4, #f8e7ea); }
.env-ov.env-in { opacity: 1; }
.env-ov.env-gone { opacity: 0; pointer-events: none; }
body.env-locked { overflow: hidden; }
body.hold-bloom .lotus-fg .petal,
body.hold-bloom .lotus-fg .drift,
body.hold-bloom .lotus-fg .lotus-stem,
body.hold-bloom .lotus-fg .lotus-heart,
body.hold-bloom .lotus-fg .twig path { animation-play-state: paused !important; }

.env-scene { perspective: 1100px; }
.env {
  position: relative; width: min(78vw, 330px); height: min(56vw, 236px);
  transform-style: preserve-3d;
}
.env-back, .env-front, .env-flap, .env-card { position: absolute; border-radius: 6px; }
.env-back { inset: 0; box-shadow: 0 30px 70px rgba(90, 40, 60, .3); }
.bg-sakura .env-back { background: #f3d3dd; }
.env-card {
  left: 4%; right: 4%; top: 6%; height: 88%;
  background: #fffdfb; box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
  transition: transform .6s cubic-bezier(.2, .7, .3, 1) .35s;
}
.env-front {
  inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 12px; overflow: hidden;
}
.bg-sakura .env-front { background: linear-gradient(180deg, #f9dfe7 0%, #f5d2dd 100%); }
.env-front::before, .env-front::after { /* envelope side folds */
  content: ''; position: absolute; top: 0; bottom: 0; width: 52%;
  opacity: .35;
}
.env-front::before { left: 0; background: linear-gradient(105deg, rgba(0, 0, 0, .07), transparent 55%); }
.env-front::after { right: 0; background: linear-gradient(255deg, rgba(0, 0, 0, .07), transparent 55%); }
.env-front svg { margin-bottom: 2px; }
.env-names {
  font-family: 'Great Vibes', cursive; font-size: 1.25rem; color: #52679c; opacity: .85;
}
.env-flap {
  left: 0; right: 0; top: 0; height: 54%;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform .55s cubic-bezier(.4, 0, .3, 1) .12s, z-index 0s .3s;
  z-index: 3;
}
.bg-sakura .env-flap { background: linear-gradient(180deg, #f0c3d2, #ecb5c8); }
.env-seal {
  position: absolute; left: 50%; top: 64%; z-index: 4;
  width: 76px; height: 76px; margin: -38px 0 0 -38px;
  background: none; border: none; padding: 0; cursor: pointer;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3));
  transition: transform .18s ease;
  animation: sealglint 3.2s ease-in-out 1.2s infinite;
}
.env-seal:active { transform: scale(.93); }
.env-seal svg { width: 100%; height: 100%; }
.bg-sakura .env-seal .wax { fill: #ad5872; }
.env-seal .seal-mono { color: rgba(255, 248, 236, .92); }
@keyframes sealglint {
  0%, 100% { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)) brightness(1); }
  50% { filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35)) brightness(1.12); }
}
.env-hint {
  position: absolute; left: 0; right: 0; bottom: -44px;
  text-align: center; font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: #6d4a56;
  opacity: 0; animation: hintin .8s ease 2s forwards;
}
@keyframes hintin { to { opacity: 1; } }

/* opening */
.env-open .env-seal { animation: sealcrack .5s ease forwards; pointer-events: none; }
@keyframes sealcrack {
  30% { transform: scale(1.08); }
  100% { transform: scale(.6) rotate(14deg); opacity: 0; }
}
.env-open .env-flap { transform: rotateX(-168deg); z-index: 1; }
.env-open .env-card { transform: translateY(-34%) scale(1.04); }
.env-open .env-hint { opacity: 0; }

/* names ink-write */
.ink-names { position: relative; margin: 1rem 0 .8rem; }
.ink-line {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.3rem, 10vw, 3rem);
  display: block; line-height: 1.2;
  color: transparent;
  background: linear-gradient(90deg, #b88732 0%, #b88732 50%, transparent 50.5%);
  background-size: 210% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  animation: inkwrite 1.7s cubic-bezier(.3, 0, .4, 1) .2s forwards;
}
@keyframes inkwrite { to { background-position: 0% 0; } }
.ink-flourish {
  width: 170px; height: 14px; color: #c9a24b; display: block; margin: .1rem auto 0;
}
.ink-flourish path { stroke-dasharray: 220; stroke-dashoffset: 220; animation: flourishdraw .9s ease 1.6s forwards; }
@keyframes flourishdraw { to { stroke-dashoffset: 0; } }
.ink-names.ink-out { transition: opacity .55s ease; opacity: 0; position: absolute; left: 0; right: 0; }

/* countdown line */
.inv-count {
  font-size: 10px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase;
  color: #9a8578; margin: .45rem 0 0;
  animation: hintin .8s ease .3s both;
}

/* sakura: branches draw themselves */
.scluster .twig path {
  stroke-dasharray: 430; stroke-dashoffset: 430;
  animation: branchdraw 1.5s ease-out forwards;
}
.sc-br .twig path { animation-delay: .45s; }
@keyframes branchdraw { to { stroke-dashoffset: 0; } }

/* sakura: wind-drift petals (sine sway, not straight down) */
@keyframes driftfall {
  0%   { opacity: 0; transform: translate3d(0, -4vh, 0) rotate(10deg); }
  8%   { opacity: .55; }
  25%  { transform: translate3d(5vw, 24vh, 0) rotate(90deg); }
  45%  { transform: translate3d(-3vw, 48vh, 0) rotate(170deg); }
  65%  { transform: translate3d(6vw, 70vh, 0) rotate(240deg); }
  85%  { opacity: .45; transform: translate3d(-2vw, 92vh, 0) rotate(300deg); }
  100% { opacity: 0; transform: translate3d(4vw, 108vh, 0) rotate(340deg); }
}

@media (prefers-reduced-motion: reduce) {
  .env-ov { display: none !important; }
  .ink-names { display: none; }
  .scluster .twig path { animation: none; stroke-dashoffset: 0; }
  .inv-count { animation: none; }
}
.bg-sakura .env-seal .wax-rim { fill: #a94b64; }
.env-front svg { margin-bottom: 0; }

/* critical-loop-1: entry refinement */
.env { width: min(76vw, 322px); height: min(52vw, 218px); }
.env-scene { margin-top: -8vh; }
.env-back { box-shadow: 0 22px 54px rgba(90, 40, 60, .22); }
.env-seal {
  width: 88px; height: 88px; margin: -44px 0 0 -44px;
  animation: none;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .25));
}
.bg-sakura .env-seal .wax-rim { fill: #832844; }
.env-seal .seal-emboss { color: rgba(0, 0, 0, .28); }
.env-names { font-size: 1.45rem; margin-bottom: 8px; margin-top: 12px; }
.env-rule { width: 74px; height: 1px; background: rgba(82, 103, 156, .4); margin: 0 auto 14px; }
.card-logo { display: flex; justify-content: center; margin: -6px 0 0; }
@media (max-height: 720px) { .card-logo svg { width: 72px; height: 61px; } .invite-card { padding-top: 1rem; } }
@media (max-height: 600px) { .card-logo { display: none; } }

/* tighter card rhythm (-25%) + calmer countdown + legible note */
.invite-card { padding: clamp(1.2rem, 3.6vh, 2rem) 1.4rem; }
.bg-sakura .inv-eyebrow { margin-bottom: 10px; }
.inv-names { margin: .5rem 0 .4rem; }
.inv-day { margin-top: .5rem; }
.bg-sakura .inv-script { margin: 6px 0 4px; }
.inv-rule { margin: .65rem auto; }
.inv-note { margin: .65rem 0 .95rem; }
.bg-sakura .inv-note { color: #766867; }
.inv-count { letter-spacing: .3em; }

/* softer ink write: longer continuous stroke, feathered edge */
.ink-line {
  background: linear-gradient(90deg, #b88732 0%, #b88732 47%, rgba(184, 135, 50, 0) 53%);
  background-size: 210% 100%;
  background-position: 100% 0;
  animation: inkwrite 2.1s cubic-bezier(.35, 0, .35, 1) .15s forwards;
}

/* good-to-know modal: solid readable panel */
.lb-modal .lb-box { background: #fffdfd; color: #5f534f; border: none; box-shadow: 0 22px 60px rgba(90, 40, 60, .3); }
.lb-modal .lb-box .lead b { color: inherit; }
.gtk-body p { color: inherit; }

/* smaller, refined RSVP cartouche — the information is the hero */
.inv-rsvp {
  width: auto !important; max-width: none !important;
  height: 44px !important; line-height: 44px !important;
  padding: 0 20px !important;
  display: inline-block;
  border-radius: 22px !important;
  font-size: 10px !important; letter-spacing: .16em !important;
  position: relative; border: 0; cursor: pointer; appearance: none;
}
.inv-rsvp::before {
  content: ''; position: absolute; inset: 7px 0;
  border: 1px solid #d6bcc5; border-radius: 16px; pointer-events: none;
}
.inv-rsvp:hover::before { border-color: #a98290; }
/* RSVP submit: same small cartouche as the invite's RSVP button */
#rsvpForm #submitBtn {
  display: block; width: fit-content; max-width: none;
  height: 44px; line-height: 44px; padding: 0 36px;
  margin: 14px auto 0;
  border-radius: 22px !important;
  font-size: 11px !important; letter-spacing: .2em !important; text-transform: uppercase;
}

/* the real illustrated logo (raster, background keyed out) */
.card-logo img { width: 104px; height: auto; display: block; }
@media (max-height: 720px) { .card-logo img { width: 84px; } }
.env-logo { width: 92px; height: auto; display: block; margin: 0 auto 4px; }
.env-front { justify-content: center; padding-bottom: 0; }
.env-names { margin-top: 2px; margin-bottom: 0; font-size: 1.15rem; }
.env-logo { display: none; }
.env-front { justify-content: flex-end; padding-bottom: 12px; }
.env-names { margin-top: 12px; margin-bottom: 4px; font-size: 1.2rem; }

/* logo at codex-directed 116px */
.card-logo img { width: 116px; }
@media (max-height: 720px) { .card-logo img { width: 98px; } .card-logo { margin: -10px 0 -2px; } .inv-note { margin: .5rem 0 .75rem; } }

/* sakura: 50% deeper unfurl + the lotus breathing transition */
.bg-sakura .sak .petal {
  animation: bloom 2.4s cubic-bezier(.18, .8, .28, 1) both,
             sbreathe 8s ease-in-out 2 alternate;
  animation-delay: calc(var(--d, 0s) + var(--i) * .2s), calc(var(--d, 0s) + 4.2s);
}
@keyframes sbreathe {
  from { transform: rotate(var(--a)) scale(var(--s, 1)); }
  to   { transform: rotate(calc(var(--a) * .55)) scale(calc(var(--s, 1) * .86)); }
}
@media (prefers-reduced-motion: reduce) { .bg-sakura .sak .petal { animation: none; } }

/* logo printed on the envelope flap (lifts away with it) */
.env-flap { display: flex; justify-content: center; align-items: flex-start; }
.flap-logo { width: 68px; height: auto; margin-top: 2.5%; opacity: .97; }

/* reference-style side cascades — hug the edges, never the text */
.sc-le { left: -12px; top: 15vh; width: min(15vw, 64px); height: 58vh; transform-origin: 0 50%; }
.sc-rm { right: -10px; top: 34vh; width: min(12vw, 52px); height: 20vh; transform-origin: 100% 50%; }

/* ============ Cherry Blossom Keepsake — entry v2 ============ */
.ck-ov {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 7vh; /* lifts the composition ~3.5vh for vertical balance */
  opacity: 0; transition: opacity .45s ease;
  background: linear-gradient(170deg, #f8eff0 0%, #f6e9eb 55%, #f3e2e5 100%);
}
.ck-ov.ck-in { opacity: 1; }
.ck-vignette { position: absolute; inset: 0; box-shadow: inset 0 0 120px 30px rgba(112, 67, 78, .08); pointer-events: none; }
.ck-glow {
  position: absolute; left: 50%; top: 50%; width: 420px; height: 340px;
  transform: translate(-50%, -54%);
  background: radial-gradient(closest-side, rgba(255, 238, 230, .38), transparent 72%);
  pointer-events: none;
}
.ck-branch { position: absolute; top: -6px; left: -14px; width: min(52vw, 230px); opacity: .85; pointer-events: none; }
.ck-branch svg { width: 100%; height: auto; }
.ck-branch2 { position: absolute; top: -8px; right: -12px; width: min(40vw, 172px); opacity: .8; pointer-events: none; }
.ck-branch2 svg { width: 100%; height: auto; }
.ck-loose { position: absolute; right: 5vw; bottom: 8vh; pointer-events: none; }
.ck-loose svg { animation: ckfloat 7s ease-in-out infinite alternate; }
@keyframes ckfloat { from { transform: translateY(0) rotate(0); } to { transform: translateY(-8px) rotate(7deg); } }

/* ceremonial introduction */
.ck-head { text-align: center; margin-bottom: 26px; }
.ck-eyebrow {
  font-family: 'Montserrat', sans-serif; font-size: 9px; font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase; color: #655557; margin-bottom: 7px;
}
.ck-topnames {
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: #554648;
}
.ck-heart { color: #9c536c; font-size: .75em; letter-spacing: 0; }

/* the envelope — physical stationery.
   Light reads from the upper left: every fold carries its own matte
   gradient, a soft contact shadow where its edge overlaps the panel
   beneath, and a hairline paper-thickness light along that edge. */
.ck-scene { perspective: 1150px; position: relative; }
/* ground contact shadow beneath the envelope */
.ck-scene::after {
  content: ''; position: absolute; left: 11%; right: 11%; bottom: -11px; height: 15px;
  background: radial-gradient(50% 100% at 50% 0, rgba(76, 30, 44, .20), transparent 70%);
  filter: blur(4px); pointer-events: none;
}
.ck-env {
  position: relative;
  width: clamp(300px, 82vw, 370px);
  aspect-ratio: 1.48 / 1;
  transform: translateY(8px);
  transition: transform .35s ease .45s;
  filter: drop-shadow(5px 18px 40px rgba(112, 67, 78, .17)) drop-shadow(1px 4px 10px rgba(112, 67, 78, .11));
}
.ck-in .ck-env { transform: translateY(0); }
.ck-body {
  position: absolute; inset: 0; border-radius: 7px;
  background: linear-gradient(118deg, #f0d2da 0%, #ecc8d2 45%, #e5bac7 100%);
}
.ck-interior {
  position: absolute; left: 3px; right: 3px; top: 3px; height: 58%;
  background: linear-gradient(180deg, #dca6b6, #e5b6c3);
  border-radius: 6px 6px 0 0;
  box-shadow: inset 0 8px 16px rgba(84, 34, 49, .22), inset 0 2px 4px rgba(84, 34, 49, .16);
}
.ck-insert {
  position: absolute; left: 7%; right: 7%; top: 24%; height: 72%;
  background: #fffbf8; border-radius: 4px;
  box-shadow: 0 -2px 5px rgba(84, 34, 49, .10), 0 2px 10px rgba(84, 34, 49, .14);
  transform: translateY(0);
  transition: transform .75s cubic-bezier(.25, .6, .25, 1) .4s, opacity .45s ease;
}
.ck-open .ck-insert { transform: translateY(-62%); }
.ck-fold { position: absolute; inset: 0; border-radius: 7px; }
.ck-fold-l {
  clip-path: polygon(0 0, 50% 58%, 0 100%);
  background:
    linear-gradient(64deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(100deg, #edc9d3 0%, #eecbd5 55%, #e9c0cb 100%);
  filter: drop-shadow(1.5px .5px 2px rgba(96, 52, 64, .16)) drop-shadow(.5px 0 0 rgba(255, 250, 246, .5));
}
.ck-fold-r {
  clip-path: polygon(100% 0, 100% 100%, 50% 58%);
  /* shading concentrated near the crease; broad face closer to its
     neighbours so the panel stops reading as a distinct geometric fill */
  background:
    linear-gradient(296deg, rgba(96, 52, 64, .07) 0%, rgba(96, 52, 64, 0) 22%),
    linear-gradient(260deg, #ebc6d1 0%, #ecc8d2 55%, #e8c0cb 100%);
  filter: drop-shadow(-1.5px .5px 2px rgba(96, 52, 64, .16)) drop-shadow(-.5px 0 0 rgba(255, 250, 246, .5));
}
.ck-fold-b {
  clip-path: polygon(0 100%, 50% 56%, 100% 100%);
  background:
    /* curved tonal lift near the base: paper tension in the folded pocket */
    radial-gradient(95% 75% at 50% 112%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 72%),
    linear-gradient(0deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(0deg, #f0d2da 0%, #eccad4 55%, #e6bcc9 96%);
  filter: drop-shadow(0 -2px 3px rgba(96, 52, 64, .18)) drop-shadow(0 -.75px 0 rgba(255, 250, 246, .55));
}
.ck-grain {
  position: absolute; inset: 0; border-radius: 7px; opacity: .17; pointer-events: none;
  /* fine matte grain + a much weaker large-scale mottling pass */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .27 0 0 0 0 .3 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.014 .02' numOctaves='2' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .3 0 0 0 0 .34 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23m)'/%3E%3C/svg%3E");
}
/* one directional light pass over body + folds (under the flap, so the
   flap carries its own lighting and nothing jumps when it swings) */
.ck-sheen {
  position: absolute; inset: 0; border-radius: 7px; pointer-events: none;
  background:
    linear-gradient(126deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, 0) 48%, rgba(96, 52, 64, .05) 72%, rgba(96, 52, 64, .10) 100%),
    radial-gradient(130% 90% at 50% 0%, rgba(0, 0, 0, 0) 62%, rgba(96, 52, 64, .05) 100%);
}
.ck-flap {
  position: absolute; inset: 0; border-radius: 7px 7px 0 0;
  /* gently bowed, slightly asymmetric diagonals: intermediate vertices
     break the cut-vector straightness near the shoulders and the point */
  clip-path: polygon(0 0, 100% 0, 99.7% 2.4%, 75.6% 30.4%, 50.3% 62%, 24.2% 30.8%, .3% 2.2%);
  /* tonal separation from the body + its own paper grain, a top crease
     catch-light, a hint of side light, and a hairline pale paper edge
     along the diagonals (thickness) — all in the flap's own background,
     so the shading travels with it as it swings open */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .27 0 0 0 0 .3 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 62' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L50 61.4 L100 0' fill='none' stroke='rgba(255,250,244,.5)' stroke-width='.45'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, .24) 0%, rgba(255, 255, 255, 0) 7%),
    linear-gradient(118deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 45%, rgba(96, 52, 64, .05) 100%),
    linear-gradient(180deg, #e8bbc8 0%, #e1aebd 55%, #d8a0b2 100%);
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: auto, 100% 62%, 100% 100%, 100% 100%, 100% 100%;
  background-position: 0 0, top, 0 0, 0 0, 0 0;
  transform-origin: top center;
  transition: transform .9s cubic-bezier(.34, .05, .18, 1.08) .25s, z-index 0s .8s;
  z-index: 3;
  display: flex; justify-content: center; align-items: flex-start;
}
.ck-open .ck-flap { transform: rotateX(-172deg); z-index: 1; }
/* the flap's cast shadow on the body — its own layer, opacity-only animation */
/* a blurred, down-offset copy of the flap silhouette: the flap visibly
   floats above the pocket and casts a distinct shadow along both
   diagonal edges, deepening toward the tip (validator P1) */
.ck-flapcast {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  /* a blurred copy of the flap's own silhouette, nudged down-right: the
     flap hides everything above its diagonals, so only a crisp directional
     band of shadow shows beneath both edges, deepening toward the point */
  clip-path: polygon(1% 2%, 99.4% 2.8%, 50.6% 66%);
  /* uneven band: the shadow breathes along the edges instead of a
     constant-width strip */
  background: linear-gradient(94deg, rgba(90, 48, 60, .30) 0%, rgba(90, 48, 60, .19) 38%, rgba(90, 48, 60, .29) 62%, rgba(90, 48, 60, .17) 100%);
  filter: blur(3.5px);
  transition: opacity .7s ease .25s;
}
.ck-open .ck-flapcast { opacity: 0; }
/* paper lining: covers the flap face as it swings past edge-on, so the
   mid-rotation frame reads as the flap's underside, not a white glare */
.ck-flap::after {
  content: ''; position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 99.7% 2.4%, 75.6% 30.4%, 50.3% 62%, 24.2% 30.8%, .3% 2.2%);
  background: linear-gradient(0deg, #dfaab9 0%, #e7bfca 90%);
  opacity: 0; transition: opacity .32s ease .62s;
}
.ck-open .ck-flap::after { opacity: 1; }
.ck-open .ck-flaplogo { opacity: 0; transition: opacity .3s ease .55s; }
/* the real logo on the flap — exactly as-is: no filters, no opacity dial.
   Net user-directed placement: +10px down (15 - 5). */
.ck-flaplogo { width: 73px; height: auto; margin-top: calc(1% + 10px); }

/* wax seal — dusty rose, irregular, embossed */
.ck-seal {
  position: absolute; left: 50%; top: calc(65% - 20px);
  width: clamp(61px, 16vw, 67px); height: clamp(61px, 16vw, 67px);
  margin: calc(clamp(61px, 16vw, 67px) / -2) 0 0 calc(clamp(61px, 16vw, 67px) / -2);
  padding: 0; background: none; border: none;
  appearance: none; -webkit-appearance: none;
  border-radius: 50%; cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 4;
  /* tight contact shadow against the paper + softer down-right falloff */
  filter: drop-shadow(.5px 1.5px 1.5px rgba(60, 22, 34, .36)) drop-shadow(3px 7px 10px rgba(84, 34, 49, .22));
}
.ck-seal:focus-visible { outline: 2px solid #8b5a2b; outline-offset: 7px; }
.ck-seal[aria-disabled="true"] { cursor: default; pointer-events: none; outline: none; }
.inv-names:focus { outline: none; } /* programmatic focus target, not interactive */
.ck-seal svg { width: 100%; height: 100%; overflow: visible; }
/* no hard outline: the edge is defined by the gradient falloff plus a
   soft blurred stroke inside the SVG, so the wax reads matte, not drawn */
.ck-wax { fill: url(#ckwaxg); stroke: none; }
.ck-crack { stroke: #5c2438; stroke-width: 1.1; stroke-dasharray: 160; stroke-dashoffset: 160; opacity: 0; }
/* NM monogram: warm-ivory emboss — top-left light, bottom-right inset shade;
   muted ivory-gold gradient across the lettering, not metallic shine */
.ck-mg path { fill: url(#cklet); }
.ck-mg-hi path { fill: rgba(255, 244, 226, .5); }
.ck-mg-sh path { fill: rgba(58, 18, 30, .5); }
.ck-sweep { fill: rgba(255, 236, 220, .28); opacity: 0; animation: cksweep 2.8s ease .9s 1; }
@keyframes cksweep { 6% { opacity: 1; } 18% { transform: rotate(18deg) translateX(150px); opacity: 0; } 100% { opacity: 0; } }
.ck-half { transition: transform .42s ease .22s; }
.ck-crackt .ck-seal, .ck-crack .ck-seal { pointer-events: none; }
.ck-crack .ck-seal svg { animation: ckpress .32s ease both; }
@keyframes ckpress { 40% { transform: scale(.94); } 100% { transform: scale(1.03); } }
.ck-crack .ck-crack { opacity: 1; animation: ckcrackdraw .38s ease .24s forwards; }
@keyframes ckcrackdraw { to { stroke-dashoffset: 0; } }
.ck-crack .ck-half-l { transform: translate(-4px, 1px) rotate(-2deg); }
.ck-crack .ck-half-r { transform: translate(4px, -1px) rotate(1.5deg); }
.ck-open .ck-seal { transition: opacity .6s ease .2s, transform .75s ease .2s; opacity: 0; transform: translateY(10px); }

/* hint */
.ck-hint {
  margin-top: 30px; text-align: center;
  font-family: 'Playfair Display', Georgia, serif; font-style: italic;
  font-size: 15px; color: #5d5051;
  min-height: 48px; position: relative;
}
.ck-hintcopy {
  display: block; opacity: 0; transform: translateY(7px);
}
.ck-hint-one { animation: ckhintcopy .9s ease 1.1s forwards; }
.ck-hint-two { animation: ckhintcopy .9s ease 2.7s forwards; }
.ck-wait .ck-hintcopy, .ck-wait .ck-hintline { animation: none; }
.ck-wait .ck-hint { visibility: hidden; }
.ck-audio-prompt {
  position: absolute; bottom: max(28px, 7vh); left: 20px; right: 20px;
  text-align: center; font: italic 15px/1.5 'Playfair Display', Georgia, serif;
  color: #6b4353;
}
.ck-static, .ck-static *, .ck-static *::before, .ck-static *::after {
  animation: none !important; transition: none !important;
}
.ck-static .ck-head { opacity: 1; }
@keyframes ckhintcopy {
  to { opacity: 1; transform: translateY(0); }
}
.ck-hintline {
  display: block; height: 1px; width: 0; margin: 7px auto 0;
  background: #bf8731;
  animation: ckline 1s ease 3.5s forwards;
}
@keyframes ckline { to { width: 44px; } }
/* the hint leaves when the automatic opening begins */
.ck-ov.ck-crack .ck-hint { opacity: 0; transition: opacity .5s ease; }
.ck-ov.ck-crack .ck-hintline { animation: none; }

/* departure: envelope lowers and fades UNDER the flying card */
.ck-away .ck-scene { transition: transform .95s ease, opacity .95s ease; transform: translateY(26px); opacity: 0; }
.ck-away .ck-head, .ck-away .ck-hint, .ck-away .ck-branch, .ck-away .ck-loose { transition: opacity .5s ease; opacity: 0; }
.ck-ov.ck-away { transition: opacity 1s ease .2s; opacity: 0; pointer-events: none; }

/* shared-card FLIP: real card rides above the envelope while landing.
   z-index + will-change are set for the WHOLE entry (env-locked), so only
   visibility flips at FLIP time — and the overlay simultaneously DROPS below
   the card (Chromium won't re-sort composited layers when the card's z rises
   the same frame its transform animation starts, so we lower the envelope
   instead: physically truer anyway). */
body.env-locked .invite-card { visibility: hidden; z-index: 90; will-change: transform; }
/* pre-script bootstrap lock (inline body-top script) — same hiding, earlier */
html.env-boot .invite-card { visibility: hidden; }
/* nothing behind the envelope is reachable while it is up */
body.ck-flip .invite-card { visibility: visible; }
body.ck-flip .ck-ov { z-index: 10; }

/* staggered bloom release (hold-bloom pauses everything; go* classes free groups) */
body.go1 .sc-tl .petal, body.go1 .sc-tl .twig path, body.go1 .sc-tl .lotus-stem, body.go1 .sc-tl .lotus-heart { animation-play-state: running !important; }
body.go2 .sc-le .petal, body.go2 .sc-rm .petal, body.go2 .sc-le .lotus-heart, body.go2 .sc-rm .lotus-heart { animation-play-state: running !important; }
body.go3 .sc-br .petal, body.go3 .sc-br .twig path, body.go3 .sband .petal, body.go3 .sc-br .lotus-heart, body.go3 .sband .lotus-heart, body.go3 .sc-bl .petal { animation-play-state: running !important; }
body.go4 .lotus-fg .drift { animation-play-state: running !important; }
/* names: handwriting lifts and dissolves in one continuous motion,
   formal caps appear beneath — no watermark pause */
.ink-names.ink-keep {
  transition: transform .675s cubic-bezier(.3, 0, .3, 1), opacity .675s ease;
  transform: translateY(-14px) scale(.6);
  opacity: 0;
}
.ink-names .ink-line { animation-duration: 1.4s; }

/* compact tier: short or very narrow screens */
@media (max-height: 640px), (max-width: 340px) {
  .ck-ov { padding-bottom: 4vh; }
  .ck-env { width: clamp(255px, 78vw, 320px); }
  .ck-branch2 { width: min(34vw, 140px); }
  .ck-flaplogo { width: 56px; margin-top: calc(1% + 10px); }
  /* seal keeps the non-negotiable 61-67px size; space recovered above */
  .ck-head { margin-bottom: 16px; }
  .ck-hint { margin-top: 18px; }
}

/* sequential content reveal after the card lands */
.ck-g { transition: opacity .75s ease, transform .75s cubic-bezier(.2, .6, .2, 1); }
.ck-g.ckh { opacity: 0; transform: translateY(10px); transition: none; }

@media (prefers-reduced-motion: reduce) {
  .ck-ov { display: none !important; }
  .ck-ov.ck-wait { display: flex !important; opacity: 1; }
  body.env-locked .invite-card, html.env-boot .invite-card { visibility: visible; }
  .ck-g, .ck-g.ckh { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ink rewrite: clip-path wipe (immune to ancestor transforms) */
.ink-names .ink-line {
  background: none !important;
  color: #b88732;
  animation: none !important;
}
.ink-wipe {
  display: inline-block;
  clip-path: inset(-12% 100% -12% -4%);
  animation: inkwipe 1.275s cubic-bezier(.35, 0, .35, 1) forwards;
}
@keyframes inkwipe { to { clip-path: inset(-12% -6% -12% -4%); } }

/* ============ Blossom Season — perpetual bud -> bloom -> shed cycle ============
   Invite page + sakura only (body.blossom-season, set by js/sakura.js).
   One composite keyframe per petal; phases stratified per blossom (--cy),
   durations 20-26s (--cdur) so the canopy desynchronizes naturally.
   0-12% grow · 12-62% full + sway · 62-71% shed on the wind · rest dormant,
   then the new bud appears. 100% state === 0% state (no seam). */
.blossom-season .sak-bloom { overflow: visible; }
/* NOTE: old-Safari safe — delays only ADD time values (--pi is emitted as a
   time by JS; number*time calc needs Safari 18.2+), and scales compose as
   scale(var(--s)) scale(k) instead of scale(calc(var(--s) * k)). */
.blossom-season .sak-bloom .petal {
  animation: season var(--cdur, 22s) linear infinite;
  animation-delay: calc(var(--cy, 0s) + var(--d, 0s) + var(--pi, 0s));
}
@keyframes season {
  0%    { opacity: .85; transform: translate(0, 0) rotate(var(--a)) scale(var(--s, 1)) scale(.14);
          animation-timing-function: cubic-bezier(.18, .8, .28, 1); }
  12%   { opacity: 1; transform: translate(0, 0) rotate(var(--a)) scale(var(--s, 1)) scale(1);
          animation-timing-function: ease-in-out; }
  34%   { opacity: 1; transform: translate(0, 0) rotate(calc(var(--a) + 2.5deg)) scale(var(--s, 1)) scale(1.03); }
  50%   { opacity: 1; transform: translate(0, 0) rotate(calc(var(--a) - 2deg)) scale(var(--s, 1)) scale(1); }
  62%   { opacity: 1; transform: translate(0, 0) rotate(var(--a)) scale(var(--s, 1)) scale(1);
          animation-timing-function: cubic-bezier(.5, 0, .85, .5); }
  71%   { opacity: 0; transform: translate(var(--dx, 26px), var(--dy, 48px)) rotate(calc(var(--a) + var(--spin, 90deg))) scale(var(--s, 1)) scale(.8); }
  71.3%, 92%
        { opacity: 0; transform: translate(0, 0) rotate(var(--a)) scale(var(--s, 1)) scale(.05); }
  100%  { opacity: .85; transform: translate(0, 0) rotate(var(--a)) scale(var(--s, 1)) scale(.14); }
}
.blossom-season .sak-bloom .lotus-heart {
  animation: seasonheart var(--cdur, 22s) linear infinite;
  animation-delay: calc(var(--cy, 0s) + var(--d, 0s));
}
@keyframes seasonheart {
  0%, 10%   { opacity: 0; }
  16%, 60%  { opacity: 1; }
  67%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .blossom-season .sak-bloom .petal { animation: none; }      /* base transform = full bloom */
  .blossom-season .sak-bloom .lotus-heart { animation: none; opacity: 1; }
}

/* ============ Good to know — stationery insert, not a utility panel ============ */
.bg-sakura {
  --gtk-paper: #fffdfc; --gtk-ink: #6b5a52; --gtk-heading: #4f3f45;
  --gtk-accent: #c7839d; --gtk-accent-soft: rgba(199, 131, 157, .09);
  --gtk-line: rgba(199, 131, 157, .3); --gtk-gold: #bf8731;
}
.lb-box.gtk-box {
  background: var(--gtk-paper) !important;
  width: min(400px, calc(100vw - 32px)); max-width: none;
  max-height: 84dvh;
  padding: 26px 24px 24px; border-radius: 12px;
  text-align: left;
}
.gtk-title {
  text-align: center; margin-bottom: 7px !important;
  color: var(--gtk-heading) !important; letter-spacing: .3em; font-size: .7rem;
}
.gtk-titleline { display: block; width: 44px; height: 1px; margin: 0 auto 4px; background: var(--gtk-gold); }
.gtk-box .lb-close {
  position: absolute; top: 6px; right: 6px;
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 400 20px/1 Montserrat, sans-serif; opacity: 1; color: var(--gtk-heading);
}
.gtk-box .lb-close:hover { background: var(--gtk-accent-soft); }
.gtk-item { position: relative; padding: 12px 0 13px; }
.gtk-item:last-child { padding-bottom: 4px; }
.gtk-item + .gtk-item { border-top: 1px solid var(--gtk-line); }
.gtk-item + .gtk-item::before {
  content: ''; position: absolute; top: -3px; left: 50%; margin-left: -3px;
  width: 5px; height: 5px;
  background: var(--gtk-paper); border: 1px solid var(--gtk-accent);
  transform: rotate(45deg);
}
.gtk-question {
  margin: 0 0 5px; color: var(--gtk-heading);
  font: 600 1.13rem/1.2 'Cormorant Garamond', Georgia, serif;
}
.gtk-answer { margin: 0; color: var(--gtk-ink) !important; font: 400 .84rem/1.55 Montserrat, sans-serif; }
.gtk-icon { width: 15px; height: 15px; margin-right: 5px; color: var(--gtk-accent); vertical-align: -2px; }
.gtk-travel { display: grid; gap: 4px; }
.gtk-travel-row { display: flex; align-items: center; gap: 6px; }
.gtk-travel-row .gtk-icon { flex: none; margin-right: 0; }
.gtk-travel-row > span { min-width: 0; }
.gtk-map {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 7px; padding: 0 16px;
  border: 1px solid var(--gtk-accent); border-radius: 999px;
  color: var(--gtk-heading); background: none;
  font: 600 .62rem/1 Montserrat, sans-serif; letter-spacing: .14em;
  text-decoration: none; text-transform: uppercase;
  transition: background-color .18s ease;
}
.gtk-map:hover { background: var(--gtk-accent-soft); }
.gtk-box :focus-visible { outline: 2px solid var(--gtk-gold); outline-offset: 2px; }
@media (min-width: 600px) {
  .lb-box.gtk-box { width: min(460px, calc(100vw - 48px)); padding: 30px 36px 30px; border-radius: 14px; }
  .gtk-answer { font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) { .gtk-map { transition: none; } }

/* RSVP card: narrow paper panel — blossoms breathe on both sides */
#rsvpForm { max-width: 350px; margin-left: auto; margin-right: auto; }
#editRsvp, #savedBanner { max-width: 350px; margin-left: auto; margin-right: auto; }

/* ============ page-to-page paper veil ============ */
html { --nav-veil: #f6e9eb; }               /* sakura wash (default) */
html[data-page="game"] { --nav-veil: #f2debc; } /* leaving the game: marigold */
html::after {
  content: ''; position: fixed; inset: 0; z-index: 220;
  background: var(--nav-veil);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
html.nav-arriving:not(.nav-ready)::after { opacity: 1; transition: none; }
html.nav-arriving.nav-ready::after { opacity: 0; transition: opacity .25s ease; }
html.nav-leaving::after { opacity: 1 !important; pointer-events: auto; transition: opacity .18s ease !important; }
@media (prefers-reduced-motion: reduce) {
  html::after { display: none; }
}
/* native cross-document dissolve where supported (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
}
