/* Layout: centered spaced-caps header with page links; full-bleed sliding photo
   strip with a monogram on the home page; quiet single-column inner pages.
   White and minimal, burgundy as the only accent. Light theme by design. */
:root {
  --bg: #fcfbf9;
  --surface: #f6f2ee;
  --ink: #2b2326;
  --muted: #76686b;
  --accent: #6e1f34;
  --accent-ink: #ffffff;
  --line: rgba(43, 35, 38, 0.14);
  --tile-1: #f3ece6;
  --tile-2: #ece8e3;
  --tile-3: #f2e6e8;
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;
  --font-script: "Pinyon Script", "Snell Roundhand", cursive;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
/* Trim anything wider than the screen inside the content area, not on <body>. Sideways overflow
   set on <body> applies to the whole page's scrolling, and Chrome on iPhone could then leave the
   top of the page under its address bar after scrolling back up. "clip" also keeps sticky
   sections working. */
body > main,
.site-header,
.site-footer {
  overflow-x: hidden;
}
@supports (overflow: clip) {
  body > main,
  .site-header,
  .site-footer {
    overflow-x: clip;
  }
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Header ---------- */
.site-header {
  text-align: center;
  padding-block: 36px 8px;
}
.site-names {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 3.3vw, 2rem);
  letter-spacing: 0.3em;
  padding-left: 0.3em; /* balances the trailing letter-spacing */
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.35;
  text-wrap: balance;
}
.site-names .site-amp {
  font-style: italic;
  letter-spacing: 0;
  padding-inline: 0.2em;
  color: var(--accent);
}
.site-nav ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
}
.site-nav a {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover {
  color: var(--ink);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.site-nav a.nav-rsvp {
  color: var(--accent);
  font-weight: 500;
}

/* ---------- Photo strip (home) ---------- */
.strip {
  position: relative;
  margin-top: 28px;
  margin-left: calc(-1 * var(--gutter-l));
  margin-right: calc(-1 * var(--gutter-r));
  height: clamp(240px, 44vw, 540px);
  overflow: hidden;
}
.strip-track {
  display: flex;
  height: 100%;
  width: max-content;
  will-change: transform; /* moved by StripMotion.tsx */
}
.strip {
  cursor: grab;
  touch-action: pan-y; /* phones: vertical swipes scroll the page, sideways swipes move the strip */
  user-select: none;
  -webkit-user-select: none;
}
.strip.dragging {
  cursor: grabbing;
}
.slot img {
  -webkit-user-drag: none;
  pointer-events: none;
}
@keyframes strip-slide {
  to {
    transform: translateX(-50%);
  }
}
/* With reduced motion the strip stays still (StripMotion skips the slide) but can still be dragged. */
.slot {
  flex: none;
  height: 100%;
  margin-right: 8px; /* margin, not gap, so the loop seam is exact */
  overflow: hidden;
  background: var(--tile-1);
}
.slot.wide {
  aspect-ratio: 3 / 2;
}
.slot.tall {
  aspect-ratio: 2 / 3;
}
.slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.placeholder {
  background-color: var(--tile-1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 2L26 14L14 26L2 14Z' fill='none' stroke='%236e1f34' stroke-opacity='.13'/%3E%3Ccircle cx='14' cy='14' r='4' fill='none' stroke='%236e1f34' stroke-opacity='.1'/%3E%3Ccircle cx='14' cy='14' r='1.2' fill='%236e1f34' fill-opacity='.2'/%3E%3C/svg%3E");
}
.placeholder:nth-child(3n + 2) {
  background-color: var(--tile-2);
}
.placeholder:nth-child(3n) {
  background-color: var(--tile-3);
}

.monogram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(4.5rem, 15vw, 11rem);
  line-height: 1;
  color: rgba(110, 31, 52, 0.55);
}
.strip.has-photos .monogram {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.25);
}
.monogram span {
  grid-area: 1 / 1;
}
.monogram .m-a {
  transform: translate(-0.42em, -0.3em);
}
.monogram .m-o {
  transform: translate(0.42em, 0.3em);
}
.monogram .m-amp {
  font-family: var(--font-script);
  font-size: 0.55em;
  transform: translate(0.02em, 0.06em);
}

/* ---------- Home intro ---------- */
.intro {
  text-align: center;
  padding-block: 64px 24px;
  max-width: 880px;
  margin-inline: auto;
}
.intro-names {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 4vw, 2.3rem);
  line-height: 1.4;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-wrap: balance;
}
.intro-names > span {
  display: block;
  padding-left: 0.26em;
}
.intro-names .intro-and {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  padding-left: 0;
  font-size: 0.6em;
  color: var(--muted);
  margin-block: 8px;
}
.intro-date {
  margin: 44px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.2vw, 1.8rem);
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  text-transform: uppercase;
}
.intro-place {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.countdown {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  word-spacing: 0.15em;
}
.countdown b {
  color: var(--ink);
  font-weight: 500;
}
.countdown-msg {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
}
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

/* Small Adire ornament */
.ornament {
  display: block;
  width: 140px;
  height: 28px;
  margin: 48px auto 0;
}
.adire-line {
  fill: none;
  stroke: var(--accent);
  stroke-opacity: 0.45;
  stroke-width: 1.2;
}
.adire-dot {
  fill: var(--accent);
  fill-opacity: 0.55;
  stroke: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  padding: 15px 28px;
  border-radius: 0;
  cursor: pointer;
}
.btn:hover {
  opacity: 0.9;
}
.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
}
.btn.ghost:hover {
  background: var(--accent);
  color: var(--accent-ink);
  opacity: 1;
}

/* ---------- Inner pages ---------- */
.page {
  max-width: 760px;
  margin-inline: auto;
  padding-block: 56px 72px;
}
.page-head {
  text-align: center;
  margin-bottom: 48px;
}
.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  letter-spacing: 0.24em;
  padding-left: 0.24em;
  text-transform: uppercase;
  line-height: 1.3;
  text-wrap: balance;
}
.page-lede {
  margin: 14px auto 0;
  max-width: 52ch;
  color: var(--muted);
}
.soon {
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 44px;
}
.soon p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--muted);
}
h2.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0 0 8px;
  line-height: 1.2;
}

/* Schedule */
.day {
  list-style: none;
  margin: 0;
  padding: 0;
}
.day li {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 8px 32px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
}
.day li:last-child {
  border-bottom: 1px solid var(--line);
}
.day li > div {
  min-width: 0;
}
.day .time {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.day h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.15;
  margin: 0 0 4px;
}
.day p {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 600px) {
  .day li {
    grid-template-columns: 1fr;
  }
}
.note {
  margin: 28px 0 0;
  color: var(--muted);
}

/* Travel */
.venue {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}
.venue > div {
  min-width: 0;
}
@media (max-width: 720px) {
  .venue {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
.card {
  background: var(--surface);
  padding: 28px;
  border: 1px solid var(--line);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0 0 6px;
  line-height: 1.15;
}
.address {
  font-style: normal;
  margin: 0 0 20px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.info h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  margin: 0 0 4px;
}
.info p {
  margin: 0 0 22px;
  color: var(--muted);
}
.status {
  min-height: 1.5em;
  margin: 0;
  flex-basis: 100%;
  font-size: 0.95rem;
  color: var(--accent);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.gallery .tile {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin: 0;
}
.gallery .tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-note {
  text-align: center;
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--muted);
}

/* FAQs */
details {
  border-top: 1px solid var(--line);
  padding-block: 18px;
}
details:last-of-type {
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.25;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 400;
}
details[open] summary::after {
  content: "\2212";
}
details p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 60ch;
}
.mail {
  font-weight: 500;
  color: var(--ink);
  word-break: break-all;
}

/* RSVP form */
.rsvp-form {
  display: grid;
  gap: 22px;
  max-width: 640px;
  margin-inline: auto;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.rsvp-form label,
.rsvp-form legend {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.rsvp-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form input[type="tel"],
.rsvp-form select,
.rsvp-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  width: 100%;
  min-width: 0;
}
.rsvp-form textarea {
  resize: vertical;
  min-height: 84px;
}
.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.rsvp-form .choice label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  cursor: pointer;
}
.choice input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  margin: 0;
}
.rsvp-form .choice label:has(input:checked) {
  border-color: var(--accent);
}
.stack {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.yes-only {
  display: grid;
  gap: 22px;
}
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-error {
  color: var(--accent);
  font-size: 0.95rem;
  margin: 0;
  min-height: 1.2em;
}
.thanks {
  max-width: 640px;
  margin-inline: auto;
  border: 1px solid var(--accent);
  padding: 32px;
  background: var(--surface);
  text-align: center;
}
.thanks h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 8px;
  line-height: 1.15;
}
.thanks p {
  margin: 0 0 18px;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  border-top: 1px solid var(--line);
  max-width: 880px;
  margin-inline: auto;
  padding-block: 36px 48px;
  color: var(--muted);
}
.site-footer .foot-mono {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.06em;
}
.site-footer .foot-mono span {
  font-family: var(--font-script);
  color: var(--accent);
  font-size: 0.8em;
  padding-inline: 0.15em;
}
.site-footer p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ---------- Ribbon opening (home page, once per visit) ---------- */
:root {
  --paper: #f8f3ec;
  --op-ease: cubic-bezier(0.65, 0, 0.35, 1);
}
html[data-opened] .opening {
  display: none;
}
html:not([data-opened]):has(.opening),
html:not([data-opened]):has(.opening) body {
  overflow: hidden;
}
/* The home page rises in once the card opens */
.op-rise {
  transition: opacity 0.9s ease, transform 0.9s var(--op-ease);
}
/* hidden while the card is closed; starts rising as the card swings open */
html:not([data-opened]):has(.opening:not(.part):not(.quick)) .op-rise {
  opacity: 0;
  transform: translateY(14px);
}
html:has(.opening.part) .op-d1 { transition-delay: 0.3s; }
html:has(.opening.part) .op-d2 { transition-delay: 0.5s; }
html:has(.opening.part) .op-d3 { transition-delay: 0.75s; }

.opening {
  position: fixed;
  inset: 0;
  z-index: 100;
  perspective: 1600px;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.op-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.2%;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 50% 45%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M14 2L26 14L14 26L2 14Z' fill='none' stroke='%236e1f34' stroke-opacity='.07'/%3E%3Ccircle cx='14' cy='14' r='1.2' fill='%236e1f34' fill-opacity='.12'/%3E%3C/svg%3E");
  background-attachment: fixed;
  transition: transform 1.2s var(--op-ease), box-shadow 1.2s var(--op-ease);
  backface-visibility: hidden;
}
.op-door-l {
  left: 0;
  transform-origin: left center;
  box-shadow: inset -1px 0 0 rgba(110, 31, 52, 0.06);
}
.op-door-r {
  right: 0;
  transform-origin: right center;
  box-shadow: inset 1px 0 0 rgba(110, 31, 52, 0.06);
}
.opening.part .op-door-l {
  transform: translateX(-102%) rotateY(18deg);
  box-shadow: 18px 0 40px rgba(43, 35, 38, 0.12);
}
.opening.part .op-door-r {
  transform: translateX(102%) rotateY(-18deg);
  box-shadow: -18px 0 40px rgba(43, 35, 38, 0.12);
}
.op-text {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr 210px 1fr;
  text-align: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) 24px max(24px, env(safe-area-inset-bottom, 0px));
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.opening.fade-text .op-text {
  opacity: 0;
}
.op-top {
  align-self: end;
  padding-bottom: 18px;
}
.op-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18px;
}
.op-invited {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}
.op-celebrate {
  margin: 10px 0 0;
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  line-height: 1.2;
  color: var(--accent);
}
.op-names {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 5.4vw, 2rem);
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  text-transform: uppercase;
  line-height: 1.45;
  color: var(--ink);
}
.op-amp {
  display: block;
  font-family: var(--font-script);
  text-transform: none;
  letter-spacing: 0;
  padding: 0;
  color: var(--accent);
  font-size: 1.1em;
  line-height: 1.1;
}
.op-date {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.op-hint {
  margin-top: auto;
  display: grid;
  gap: 4px;
  justify-items: center;
  transition: opacity 0.4s ease;
}
.op-hint b {
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  animation: op-breathe 2.4s ease-in-out infinite;
}
.op-hint span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.opening.touched .op-hint {
  opacity: 0;
}
@keyframes op-breathe {
  50% {
    opacity: 0.4;
  }
}
.op-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}
.opening.dragging .op-canvas {
  cursor: grabbing;
}
.op-skip {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 2;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(248, 243, 236, 0.8);
  border: 1px solid var(--line);
  padding: 9px 12px;
  cursor: pointer;
  transition: opacity 0.4s ease;
}
.opening.released .op-skip {
  opacity: 0;
  pointer-events: none;
}
.opening.quick {
  transition: opacity 0.35s ease;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .op-hint b {
    animation: none;
  }
  .op-rise {
    transition: opacity 0.4s ease;
  }
  html:not([data-opened]):has(.opening:not(.part):not(.quick)) .op-rise {
    transform: none;
  }
}

/* ---------- Content from the site editor ---------- */
.prose { max-width: 62ch; margin-inline: auto; }
.prose p { margin: 0 0 1em; }
.prose.center { text-align: center; color: var(--muted); }
.link-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.section-gap { margin-top: 56px; text-align: center; }
.hotels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.hotel { display: grid; gap: 6px; align-content: start; }
.hotel h3 { margin: 0; }
.hotel p { margin: 0; color: var(--muted); }
.hotel-meta b { color: var(--ink); font-weight: 500; }
.hotel .btn { justify-self: start; margin-top: 8px; }
.soon-sub { margin-top: 10px !important; font-family: var(--font-body) !important; font-style: normal !important; font-size: 0.95rem !important; }
.page.wide { max-width: 960px; }
.party { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 20px; }
.member { margin: 0; text-align: center; }
.member-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--tile-1); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-photo .placeholder { display: block; width: 100%; height: 100%; }
.member h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; margin: 14px 0 2px; }
.member-role { margin: 0; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.member-bio { margin: 8px 0 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Guest password screen ---------- */
.gate { min-height: 80vh; display: grid; place-content: center; justify-items: center; text-align: center; padding-block: 48px; gap: 6px; }
.gate-mono { margin: 0; font-family: var(--font-display); font-size: 3rem; line-height: 1; }
.gate-mono span { font-family: var(--font-script); color: var(--accent); font-size: 0.8em; padding-inline: 0.12em; }
.gate-title { margin: 8px 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.3rem, 4.5vw, 2rem); letter-spacing: 0.24em; padding-left: 0.24em; text-transform: uppercase; }
.gate-lede { margin: 0; color: var(--muted); letter-spacing: 0.08em; }
.gate-form { display: grid; gap: 10px; width: min(320px, 100%); margin-top: 28px; text-align: left; }
.gate-form label { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.gate-form input { font: inherit; padding: 12px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%; }

.field-help { margin: -2px 0 4px; font-size: 0.85rem; color: var(--muted); }

/* ---------- Registry: Zelle / Cash App / Venmo cards ---------- */
.pay-apps { margin-top: 64px; text-align: center; }
.pay-apps h2.section-title { margin-bottom: 0; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.pay-card { text-align: center; display: grid; gap: 10px; justify-items: center; align-content: start; padding: 24px 20px; }
.pay-card h3 { margin: 0; }
.pay-handle { margin: 0; color: var(--accent); font-size: 1.05rem; word-break: break-all; user-select: all; }
.pay-qr { width: 132px; height: 132px; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 6px; }
.pay-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; }
.pay-actions .status { font-size: 0.85rem; text-align: center; min-height: 0; }
.btn.small { padding: 10px 20px; font-size: 0.72rem; }
.pay-open { color: var(--muted); font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; }
.pay-open:hover { color: var(--accent); }
.pay-note { margin: 0; color: var(--muted); font-family: var(--font-display); font-style: italic; font-size: 1.05rem; }

/* ---------- Wedding party: bride's and groom's sections ---------- */
.party-side { margin-top: 48px; text-align: center; }
.party-side .ornament { margin: 0 auto 40px; }
.party-side h2.section-title { margin: 0 0 28px; letter-spacing: 0.04em; }
.party-side .party { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 20px; }
.party-side .member { flex: 0 1 225px; min-width: 0; }
@media (max-width: 520px) { .party-side .member { flex-basis: calc(50% - 10px); } }

/* ---------- Wedding party motion: wheel, shuffle, scatter, enlarged photo ---------- */
.party-side .polaroid {
  position: absolute; left: 50%; top: 50%; width: var(--cw, 140px); display: block;
  background: #fff; border: 1px solid var(--line);
  padding: calc(var(--cw, 140px) * 0.06) calc(var(--cw, 140px) * 0.06) 0;
  box-shadow: 0 1px 2px rgba(43, 35, 38, 0.1), 0 10px 22px rgba(43, 35, 38, 0.12);
  cursor: pointer; will-change: transform; color: inherit; font: inherit; text-align: center;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.party-side .polaroid:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.party-side .ph, .party-lb .ph { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; display: grid; place-items: center; }
.ph.tile-0 { background: var(--tile-1); } .ph.tile-1 { background: var(--tile-2); } .ph.tile-2 { background: var(--tile-3); }
.party-side .ph img, .party-lb .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ph .num { font-family: var(--font-display); font-style: italic; font-size: calc(var(--cw, 140px) * 0.28); color: var(--accent); opacity: 0.5; }
.pol-name {
  display: block; padding: calc(var(--cw, 140px) * 0.05) 2px calc(var(--cw, 140px) * 0.07);
  font-family: var(--font-script); color: var(--ink); font-size: clamp(0.85rem, calc(var(--cw, 140px) * 0.11), 1.35rem);
  line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.party-motion { display: grid; justify-items: center; gap: 4px; }
.party-caption { margin: 6px 0 0; min-height: 3.2em; }
.party-caption b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; line-height: 1.2; }
.party-caption span { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.party-hint { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
.party-buttons { display: flex; gap: 10px; justify-content: center; }

.wheel-scene { position: relative; width: 100%; overflow: hidden; perspective: 900px; touch-action: pan-y; cursor: grab; }
.wheel-scene.dragging { cursor: grabbing; }
.wheel-ring { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.wheel-ring .polaroid { top: 24px; pointer-events: auto; }

.shuffle-deck { --cw: min(250px, 64vw); position: relative; width: 100%; height: calc(var(--cw) * 1.5 + 50px); touch-action: pan-y; }
.shuffle-deck .polaroid { top: 10px; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s; }
.shuffle-deck .polaroid.dragging { transition: none; cursor: grabbing; }

.scatter { position: relative; margin-inline: calc(-1 * var(--gutter-l)) calc(-1 * var(--gutter-r)); }
.scatter-stage { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.scatter-head { position: absolute; left: 0; right: 0; top: 18px; margin: 0; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); pointer-events: none; }
.scatter-hint { position: absolute; left: 0; right: 0; bottom: 28px; margin: 0; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }

.party-side .member { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: center; }
.member-text { display: block; }
.member-text b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; margin: 14px 0 2px; }
.member-text .member-role { display: block; }

.party-lb {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(43, 35, 38, 0.6);
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  opacity: 0; transition: opacity 0.25s;
}
.party-lb.in { opacity: 1; }
.party-lb figure {
  --cw: min(340px, 80vw); margin: 0; width: var(--cw); max-height: 100%; overflow-y: auto; background: #fff; padding: 14px 14px 20px; text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); transform: scale(0.55) rotate(-7deg); transition: transform 0.5s cubic-bezier(0.2, 1.25, 0.3, 1);
}
.party-lb.in figure { transform: none; }
.party-lb figcaption { padding-top: 14px; }
.party-lb figcaption b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; line-height: 1.15; }
.party-lb figcaption span { display: block; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }
.party-lb figcaption p { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; white-space: pre-line; }
.party-lb .btn { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) {
  .shuffle-deck .polaroid, .party-lb, .party-lb figure { transition: none; }
}

/* ---------- Gallery in the wedding-party photo styles ---------- */
.gallery-show { margin-top: 8px; }
.gallery-show .gallery { text-align: left; }
.gallery .tile { display: block; padding: 0; border: 0; background: var(--tile-1); cursor: pointer; width: 100%; }
.pol-name:empty::before { content: "\00a0"; }
.party-lb figure.whole { --cw: min(560px, 92vw); width: auto; max-width: var(--cw); }
.party-lb .lb-whole { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; margin: 0 auto; }

/* ---------- Personal invitations: code entry, seats, reply summary, requests ---------- */
.code-entry { max-width: 380px; }
.code-entry input[type="text"] { font-size: 1.25rem; letter-spacing: 0.24em; text-transform: uppercase; text-align: center; }
.request-link { text-align: center; margin: 28px 0 0; color: var(--muted); }
.request-link a { color: var(--accent); text-underline-offset: 3px; }
.soon-sub.center { text-align: center; }
.invite-hello { margin: 0; text-align: center; font-family: var(--font-display); font-size: 1.9rem; line-height: 1.2; }
.invite-hello span { display: block; margin-top: 8px; font-family: var(--font-body); font-size: 0.98rem; color: var(--muted); }
.rsvp-form fieldset.seat { border: 1px solid var(--line); background: var(--surface); padding: 18px 18px 20px; display: grid; gap: 12px; }
.rsvp-form fieldset.seat > legend { padding: 0 8px; margin-left: -8px; color: var(--accent); }
.seat-events { margin-top: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.reply-summary { list-style: none; margin: 0 auto 20px; padding: 0; max-width: 420px; display: grid; gap: 10px; text-align: left; }
.reply-summary li { display: grid; gap: 2px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); }
.reply-summary b { font-weight: 500; }
.reply-summary span { font-size: 0.85rem; letter-spacing: 0.06em; color: var(--accent); }
.reply-link { font-size: 0.92rem; }
.reply-link .mail { word-break: break-all; color: var(--ink); }
.invite-hello .invite-event { color: var(--accent); font-size: 0.9rem; letter-spacing: 0.08em; }

/* ---------- Check-in QR code on the reply page ---------- */
.door-pass { margin: 22px auto 18px; padding: 18px; max-width: 300px; background: #fff; border: 1px solid var(--line); display: grid; justify-items: center; gap: 8px; }
.door-pass-title { margin: 0 !important; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent) !important; }
.door-pass img { width: 180px; height: 180px; image-rendering: pixelated; }
.door-pass-help { margin: 0 !important; font-size: 0.88rem; }

/* ---------- Personal welcome from the invitation link ---------- */
.intro-greeting { margin: 0 auto 18px; max-width: 34ch; color: var(--muted); font-size: 1rem; line-height: 1.5; text-wrap: balance; }
.intro-dear { display: block; font-family: var(--font-script); color: var(--accent); font-size: 2.3rem; line-height: 1.2; margin-bottom: 4px; }
.known-invite { max-width: 380px; margin: 0 auto 26px; padding: 20px; text-align: center; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; justify-items: center; }
.known-invite p { margin: 0; font-family: var(--font-display); font-size: 1.4rem; }
.known-invite .known-other { font-family: var(--font-body); font-size: 0.9rem; color: var(--muted); }

/* ---------- Replay the opening (bottom-left, for 10 seconds after it opens) ---------- */
.op-replay {
  position: fixed; z-index: 60;
  left: calc(14px + env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  background: var(--surface); color: var(--accent); border: 1px solid var(--line); cursor: pointer;
  box-shadow: 0 2px 8px rgba(43, 35, 38, 0.12);
  animation: op-replay-in 0.5s ease both; transition: opacity 0.6s ease;
}
.op-replay:hover { background: var(--accent); color: var(--accent-ink); }
.op-replay:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.op-replay.leaving { opacity: 0; pointer-events: none; }
@keyframes op-replay-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .op-replay { animation: none; } }

/* ---------- Add to calendar ---------- */
.add-cal { margin: 20px auto 0; display: grid; justify-items: center; gap: 8px; }
.add-cal-title { margin: 0 !important; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent) !important; }
.add-cal-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- music button (bottom-left; the ribbon replay button sits beside it) ---------- */
.music-btn {
  position: fixed; z-index: 60;
  left: calc(14px + env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  background: var(--surface); color: var(--accent); border: 1px solid var(--line); cursor: pointer;
  box-shadow: 0 2px 8px rgba(43, 35, 38, 0.12);
  animation: op-replay-in 0.5s ease both;
}
.music-btn:hover { background: var(--accent); color: var(--accent-ink); }
.music-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.music-btn svg { grid-area: 1 / 1; }
/* a soft ring that breathes while the song plays */
.music-btn.is-playing::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0; animation: music-ring 2.4s ease-out infinite;
}
@keyframes music-ring { 0% { transform: scale(0.9); opacity: 0.45; } 100% { transform: scale(1.25); opacity: 0; } }
.has-music .op-replay { left: calc(56px + env(safe-area-inset-left, 0px)); }
@media (prefers-reduced-motion: reduce) { .music-btn { animation: none; } .music-btn.is-playing::after { animation: none; opacity: 0; } }
@media print { .music-btn { display: none; } }
