:root{
  --font-display:"Cormorant Garamond",Georgia,serif;
  --font-serif:"Cormorant Garamond",Georgia,serif;
  --font-body:Jost,system-ui,sans-serif;
  --font-sans:Jost,system-ui,sans-serif;
  --font-script:"Pinyon Script",cursive;
}
:root {
  --ivory: #fbf6ee;
  --paper: #fffaf3;
  --champagne: #e8dcc8;
  --gold: #c2a56a;
  --gold-deep: #8c7040;
  --gold-shine: #f1e2b4;
  --blush: #e9b5a8;
  --sage: #a4ae98;
  --ink: #40372f;
  --muted: #6f6254;
  --script-soft: #7a6a4e;
  --serif: var(--font-serif), "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: var(--font-sans), "Avenir Next", "Segoe UI", sans-serif;
  --script: var(--font-script), "Palatino Linotype", Palatino, serif;
  --shadow: 0 18px 40px rgba(64, 55, 47, 0.09);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #fcf7ef 0%, #fbf6ee 45%, #f7f0e5 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  background-image: url("/assets/textures/paper.png");
  background-size: 260px;
  mix-blend-mode: multiply;
}

button, input, a { font: inherit; color: inherit; }

button { cursor: pointer; }

img { max-width: 100%; }

::selection { background: var(--champagne); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 30;
  transform: translateY(-160%);
  background: var(--paper);
  border: 1px solid var(--gold);
  padding: 0.55rem 0.9rem;
}

.skip:focus { transform: none; }

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
  padding: max(1.4rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 2.6rem max(1rem, env(safe-area-inset-left));
}

main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-wrap-letter {
  min-height: calc(100dvh - 3rem);
  justify-content: safe center;
}

.page-gallery {
  padding-inline: max(0.75rem, env(safe-area-inset-left)) max(0.75rem, env(safe-area-inset-right));
}

.floral {
  position: fixed;
  z-index: 2;
  pointer-events: none;
  height: auto;
  background: transparent !important;
  opacity: 0.9;
}

.floral-bloom {
  filter: drop-shadow(0 6px 12px rgba(140, 112, 64, 0.05));
}

.floral-tl {
  top: -28px;
  left: -40px;
  width: min(300px, 42vw);
  object-fit: contain;
}

.floral-br {
  bottom: -32px;
  right: -36px;
  width: min(300px, 42vw);
  object-fit: contain;
}

.monogram { display: block; height: auto; }
.monogram-invite { width: min(196px, 48vw); margin: 0 auto 0.2rem; }
.monogram-letter { width: min(168px, 44vw); }
.monogram-gallery { width: 72px; margin: 0 auto 0.55rem; }

.script {
  font-family: var(--script);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.invite-script {
  margin: 0.2rem 0 0.1rem;
  text-align: center;
  font-size: clamp(1.9rem, 4.2vw, 2.85rem);
  line-height: 1.12;
  font-weight: 400;
  max-width: 16ch;
  color: var(--script-soft);
}

.foil-kicker,
.foil-title {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .foil-kicker,
  .foil-title {
    background: linear-gradient(115deg, #8c7040 0%, #e8d19a 28%, #c2a56a 48%, #f4e7c0 58%, #a6874c 78%, #8c7040 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.foil-kicker {
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.foil-title {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  letter-spacing: 0.14em;
  line-height: 0.95;
  margin-top: 0.2rem;
}

.letter-script {
  margin: 0.45rem 0 0.2rem;
  text-align: center;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  line-height: 1.1;
  color: var(--script-soft);
}

.display {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.display-letter {
  font-size: clamp(2.35rem, 5.4vw, 3.85rem);
  margin-top: 0.15rem;
}

.display-gallery {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  max-width: 14ch;
  margin-inline: auto;
}

.display-small { font-size: clamp(3rem, 8vw, 4.6rem); }

.eyebrow {
  margin: 0.15rem 0 0.25rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-letter {
  margin: 1.15rem 0 0.45rem;
  color: var(--gold-deep);
  font-size: 0.76rem;
  letter-spacing: 0.28em;
}

.date-line {
  margin: 0.35rem 0 0.2rem;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.date-line-tight { margin-top: 0.2rem; }

.stage {
  min-height: calc(100dvh - 3rem);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stage-body {
  width: min(640px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0 1rem;
}

.stage-body-envelope { width: min(560px, 100%); }

.sealed {
  margin: 0.35rem 0 0;
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  line-height: 1;
  color: var(--script-soft);
}

.tap-hint {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}

.tap-hint::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin: 0 auto 0.55rem;
  background: var(--gold);
}

.envelope-button {
  appearance: none;
  border: 0;
  background: none;
  padding: 1.9rem 0 0.55rem;
  width: min(460px, 100%);
  color: inherit;
}

.envelope-button:disabled { cursor: default; }

.envelope {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.58 / 1;
  filter: drop-shadow(0 22px 34px rgba(64, 55, 47, 0.16));
  perspective: 1700px;
}

.envelope-body,
.envelope-pocket,
.envelope-flap,
.letter-slip,
.envelope-ribbon,
.seal { position: absolute; }

.envelope-body {
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 3px;
  background:
    linear-gradient(160deg, #fbf6ee 0%, #f3e9db 55%, #eadfce 100%);
  border: 1px solid rgba(148, 118, 72, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 248, 0.75),
    inset 0 -24px 36px rgba(64, 55, 47, 0.04);
}

.envelope-grain {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image: url("/assets/textures/paper.png");
  background-size: 200px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.letter-slip {
  left: 10%;
  top: 7%;
  width: 80%;
  height: 78%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.05rem;
  background: linear-gradient(180deg, #fffdf8 0%, #faf4ea 100%);
  border: 1px solid rgba(194, 165, 106, 0.38);
  box-shadow: 0 8px 18px rgba(64, 55, 47, 0.08);
}

.letter-slip-crest {
  width: 58px;
  margin-bottom: 0.4rem;
}

.letter-slip-crest img {
  display: block;
  width: 100%;
  height: auto;
}

.letter-slip-word {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
}

.envelope-pocket {
  left: 0;
  right: 0;
  bottom: 0;
  height: 53%;
  z-index: 2;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f8f1e6 0%, #f1e6d6 100%);
  border-top: 1px solid rgba(180, 154, 101, 0.3);
  box-shadow:
    inset 0 18px 26px rgba(64, 55, 47, 0.055),
    inset 18px 0 24px rgba(64, 55, 47, 0.025),
    inset -18px 0 24px rgba(64, 55, 47, 0.025);
}

.envelope-pocket::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: url("/assets/textures/paper.png");
  background-size: 200px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.envelope-pocket-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(148, 118, 72, 0.1), transparent 40%),
    linear-gradient(245deg, rgba(148, 118, 72, 0.1), transparent 40%);
  pointer-events: none;
}

.envelope-flap {
  left: 0;
  right: 0;
  top: 0;
  height: 57%;
  z-index: 4;
  filter: drop-shadow(0 5px 4px rgba(112, 88, 52, 0.2));
}

.envelope-flap-front,
.envelope-flap-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.envelope-flap-front {
  background:
    linear-gradient(180deg, #fffdf8 0%, #f7efe4 58%, #efe4d4 100%);
}

.envelope-flap-front::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image: url("/assets/textures/paper.png");
  background-size: 200px;
  mix-blend-mode: multiply;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.envelope-flap-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(148, 118, 72, 0.14), transparent 42%),
    linear-gradient(225deg, rgba(148, 118, 72, 0.14), transparent 42%),
    linear-gradient(to bottom right, transparent 49.5%, rgba(120, 92, 48, 0.32) 49.5%, rgba(120, 92, 48, 0.32) 50.3%, transparent 50.3%),
    linear-gradient(to bottom left, transparent 49.5%, rgba(120, 92, 48, 0.32) 49.5%, rgba(120, 92, 48, 0.32) 50.3%, transparent 50.3%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.envelope-flap-back {
  background: linear-gradient(165deg, #d8a296 0%, #e4b7a8 40%, #d3ae78 100%);
  transform: rotateX(180deg);
}

.envelope-ribbon {
  left: -2.5%;
  right: -2.5%;
  top: 53%;
  height: 20px;
  z-index: 5;
  transform: translateY(-50%);
  background:
    linear-gradient(180deg, #f6ecdb 0%, #e8d7be 36%, #cbb288 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 248, 0.9),
    inset 0 -1px 0 rgba(122, 98, 58, 0.3),
    0 3px 6px rgba(64, 55, 47, 0.1);
}

.envelope-ribbon-shine {
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 5px;
  background: rgba(255, 253, 248, 0.42);
}

.seal {
  left: 50%;
  top: 53%;
  width: 108px;
  margin-left: -54px;
  margin-top: -54px;
  z-index: 6;
  filter: drop-shadow(0 10px 14px rgba(64, 55, 47, 0.22));
}

.wax-seal {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.wax-seal-rim,
.wax-seal-face {
  position: absolute;
  inset: 0;
}

.wax-seal-rim {
  border-radius: 48% 52% 50% 50% / 46% 48% 52% 54%;
  background:
    radial-gradient(circle at 32% 28%, #f4e6c0 0%, #d7b56a 36%, #a07e42 68%, #6e5428 100%);
  box-shadow:
    inset 0 0 0 1px rgba(92, 71, 36, 0.28),
    inset 0 -10px 16px rgba(64, 55, 47, 0.18),
    inset 0 8px 12px rgba(255, 248, 220, 0.28);
}

.wax-seal-face {
  inset: 11%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 248, 220, 0.28), transparent 55%),
    radial-gradient(circle at 50% 50%, #d8b56f 0%, #b8924c 55%, #8c6a34 100%);
  box-shadow:
    inset 0 0 0 1px rgba(92, 71, 36, 0.22),
    inset 0 6px 10px rgba(255, 248, 220, 0.18);
}

.wax-seal-logo {
  display: block;
  width: 86%;
  height: auto;
  filter:
    drop-shadow(0 1px 0 rgba(255, 248, 220, 0.25))
    drop-shadow(0 2px 3px rgba(64, 55, 47, 0.18));
}

.stage-letter {
  position: relative;
  min-height: calc(100dvh - 3rem);
  padding: 4.8rem 0 5.5rem;
  align-items: center;
  justify-content: center;
}

.stage-letter .letter-sheet {
  transform: translateY(1.25rem);
}

.stage-letter .footer {
  position: absolute;
  left: 50%;
  bottom: 0.6rem;
  transform: translateX(-50%);
  margin: 0;
  width: min(680px, 100%);
}

.letter-sheet {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-width: 100%;
  margin: 0 auto;
  align-self: center;
  padding: clamp(4.4rem, 8vw, 5.4rem) clamp(1.8rem, 6vw, 3.6rem) clamp(2.2rem, 4vw, 3.2rem);
  background:
    linear-gradient(180deg, #fffdf8 0%, #fbf6ee 48%, #f6eee2 100%);
  border: 1px solid rgba(194, 165, 106, 0.42);
  box-shadow:
    0 20px 42px rgba(64, 55, 47, 0.1),
    inset 0 0 0 1px rgba(255, 253, 248, 0.65);
}

.letter-sheet > *:not(.letter-corners):not(.letter-crest) {
  position: relative;
  z-index: 2;
}

.letter-sheet::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(194, 165, 106, 0.22);
  pointer-events: none;
}

.letter-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: url("/assets/textures/paper.png");
  background-size: 240px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.letter-sheet-open {
  overflow: visible;
}

.letter-corners {
  position: absolute;
  inset: 18px;
  pointer-events: none;
  z-index: 1;
}

.letter-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(194, 165, 106, 0.55);
  border-style: solid;
}

.letter-corner-tl { top: 0; left: 0; border-width: 1px 0 0 1px; }
.letter-corner-tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.letter-corner-bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.letter-corner-br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.letter-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(180px, 55%);
  margin: 1rem auto 0.55rem;
}

.letter-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194, 165, 106, 0.75), transparent);
}

.letter-crest {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(168px, 44vw);
  transform: translate(-50%, -42%);
  z-index: 2;
  filter: drop-shadow(0 8px 14px rgba(64, 55, 47, 0.08));
}

.letter-crest .monogram { margin: 0; width: 100%; }

.letter-body {
  max-width: 38rem;
  margin: 0.55rem auto 0;
  text-align: center;
}

.letter-body p { margin: 0 0 0.95rem; }

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  line-height: 1.35;
  margin-bottom: 1.35rem;
  color: var(--ink);
}

.closing {
  margin: 1.35rem 0 0.35rem;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
}

.signature {
  margin: 0.1rem 0 0;
  text-align: center;
  font-family: var(--script);
  font-size: clamp(2.85rem, 7vw, 4.1rem);
  line-height: 0.92;
}

.portrait {
  width: min(100%, 240px);
  margin: 0.85rem auto 1.15rem;
  padding: 7px;
  border: 1px solid rgba(180, 154, 101, 0.5);
  background: var(--ivory);
}

.portrait img { display: block; width: 100%; height: auto; }

.letter-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin: 0.35rem auto 0;
  width: 100%;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--ivory);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.letter-sheet .btn,
.gallery-note .btn,
.load-more .btn { display: flex; width: fit-content; }

.letter-actions .btn { width: min(100%, 280px); }

.btn:hover,
.btn:focus-visible {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: var(--ivory);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(180, 154, 101, 0.55);
  color: var(--muted);
  min-height: 42px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: transparent;
  color: var(--ink);
  border-color: var(--gold);
}

.btn:disabled { opacity: 0.55; cursor: default; }
.btn:disabled:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

.text-btn {
  appearance: none;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  padding: 0.35rem 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.text-btn:hover,
.text-btn[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.text-btn-light { color: #faf7f0; }
.text-btn-light:hover { color: #fffdf8; border-bottom-color: var(--gold); }

.quiet-rule {
  display: flex;
  justify-content: center;
  width: min(120px, 40%);
  margin: 0.85rem auto 1rem;
}

.quiet-rule span {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
}

.footer {
  width: min(680px, 100%);
  margin: 0.5rem auto 0.4rem;
  padding: 0.4rem 0 0.8rem;
  text-align: center;
  align-self: center;
}

.footer-quiet { margin-top: auto; }

.footer-date,
.footer-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.footer-actions .btn {
  width: auto;
  min-width: 12rem;
}

.gate {
  min-height: calc(100dvh - 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 0;
}

.gate-copy { max-width: 26rem; margin: 0.4rem 0 0.2rem; }
.gate-back {
  margin-top: 1.2rem;
  display: inline-flex;
}

.gate-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(320px, 100%);
  margin-top: 0.8rem;
}

.gate-form label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.gate-input {
  width: 100%;
  margin: 0.35rem 0 0.4rem;
  padding: 0.45rem 0.2rem 0.5rem;
  border: 0;
  border-bottom: 1px solid var(--gold);
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.14em;
}

.form-error {
  margin: 0.8rem 0 0;
  color: #6e3b32;
  font-size: 0.95rem;
}

.gathering {
  min-height: calc(100dvh - 4rem);
  display: grid;
  place-items: center;
}

.gallery { width: min(1240px, 100%); margin: 0 auto; }

.gallery-head {
  padding: 0.8rem 0 0.85rem;
  text-align: center;
}

.gallery-sub {
  margin: 0.5rem 0 0.95rem;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gallery-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.5rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(180, 154, 101, 0.28);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.filters button {
  appearance: none;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  padding: 0.55rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.filters button[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.gallery-note {
  min-height: 38vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem 3rem;
}

.gallery-note p { max-width: 34rem; }

.gallery-hint {
  margin: 0.8rem auto 0;
  max-width: 36rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.gallery-error { text-align: center; }

.masonry {
  display: grid;
  gap: 0.8rem;
  align-items: start;
  margin-top: 0.85rem;
}

.masonry-col {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
}

.protect-media {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.protect-media img,
.protect-media video {
  -webkit-user-drag: none;
  user-drag: none;
}

.screen-guard {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: #0f0c0a;
  color: rgba(250, 247, 240, 0.84);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.4vw, 1.55rem);
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.08s linear, visibility 0.08s linear;
}

.screen-guard.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.screen-guard p {
  margin: 0;
  max-width: 18rem;
}

.lightbox-stage::after {
  content: "R & F · private";
  position: absolute;
  right: 1.1rem;
  bottom: 1rem;
  z-index: 2;
  color: rgba(250, 247, 240, 0.28);
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
}

.tile {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  content-visibility: auto;
  contain-intrinsic-size: 240px 300px;
}

.tile-frame {
  position: relative;
  display: block;
  width: 100%;
  background: var(--champagne);
  overflow: hidden;
  contain: paint;
}

.tile-fallback {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(194, 165, 106, 0.18), transparent 55%),
    var(--champagne);
}

.tile-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.tile-frame img.is-ready { opacity: 1; }

.tile:hover .tile-frame,
.tile:focus-visible .tile-frame,
.tile.is-selected .tile-frame {
  outline: 1px solid rgba(140, 112, 64, 0.85);
  outline-offset: 3px;
}

.play-mark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--ivory);
  pointer-events: none;
}

.play-mark svg { width: 54px; height: 54px; }
.play-mark circle { fill: rgba(64, 55, 47, 0.38); stroke: var(--ivory); stroke-width: 1; }
.play-mark path { fill: var(--ivory); }
.play-mark span {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.tick {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--gold-deep);
  background: rgba(255, 253, 248, 0.92);
}

.tick[data-checked="true"]::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid var(--ink);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.load-more { display: flex; justify-content: center; padding: 1.6rem 0 0.4rem; }
.load-more[hidden] { display: none !important; }

.select-bar {
  position: sticky;
  bottom: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--gold);
}

.select-bar p { margin: 0; }
.select-bar .btn { margin: 0; }

.gallery-success {
  margin: 0.8rem auto 0;
  max-width: 36rem;
  padding: 0.85rem 1rem;
  text-align: center;
  color: var(--gold-deep);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.95), rgba(247, 239, 228, 0.95));
  border: 1px solid rgba(194, 165, 106, 0.55);
}

.tile-frame img.is-error {
  opacity: 0.35;
}

.request-panel {
  width: min(520px, 100%);
  margin: 1.2rem auto 0.4rem;
  padding: 1.2rem 1.15rem 1.3rem;
  border: 1px solid rgba(194, 165, 106, 0.55);
  background: linear-gradient(180deg, #fffdf8 0%, #f7efe4 100%);
}

.request-title {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
}

.request-copy {
  margin: 0.55rem 0 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.request-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.request-field input,
.request-field textarea {
  width: 100%;
  border: 1px solid rgba(180, 154, 101, 0.55);
  background: #fffdf8;
  padding: 0.7rem 0.75rem;
  color: var(--ink);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  resize: vertical;
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #1c1814;
  color: var(--ivory);
}

.lightbox-bar {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(16, 13, 11, 0.92);
  border-bottom: 1px solid rgba(194, 165, 106, 0.28);
}

.lightbox-count {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: #faf7f0;
}

.lightbox-count span,
.lightbox-duration { color: rgba(250, 247, 240, 0.72); font-size: 1rem; }

.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
}

.lightbox-action {
  appearance: none;
  min-height: 40px;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(194, 165, 106, 0.7);
  background: rgba(255, 253, 248, 0.08);
  color: #faf7f0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox-action:hover,
.lightbox-action:focus-visible {
  background: rgba(255, 253, 248, 0.16);
  border-color: var(--gold);
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 4.5rem 1.4rem;
  overflow: hidden;
}

.lightbox-media {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform-origin: center center;
}

.lightbox-media.is-loading {
  opacity: 0;
}

.lightbox-media.is-ready {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.lightbox-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: rgba(250, 247, 240, 0.7);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.lightbox-video-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.lightbox-video-wrap .lightbox-media {
  max-width: 100%;
  max-height: 100%;
}

.lightbox-prepare {
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.lightbox-prepare-msg {
  max-width: 28rem;
  padding: 0.9rem 1rem;
  text-align: center;
  color: rgba(250, 247, 240, 0.92);
  background: rgba(16, 13, 11, 0.62);
  border: 1px solid rgba(180, 154, 101, 0.45);
}

.lightbox-prepare-msg p {
  margin: 0.35rem 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: 1px solid rgba(180, 154, 101, 0.85);
  background: rgba(16, 13, 11, 0.55);
  color: #faf7f0;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
}

.lightbox-prev { left: 0.8rem; }
.lightbox-next { right: 0.8rem; }
.lightbox-nav:disabled { opacity: 0.28; cursor: default; }

.film-wait {
  max-width: 28rem;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(180, 154, 101, 0.45);
}

.noscript {
  position: relative;
  z-index: 2;
  max-width: 36rem;
  margin: 12vh auto;
  padding: 1.5rem;
  text-align: center;
}

@media (max-width: 760px) {
  .floral-tl { width: min(250px, 72vw); top: -24px; left: -56px; }
  .floral-br { width: min(220px, 64vw); bottom: -28px; right: -48px; }
  .invite-script { font-size: 1.85rem; }
  .foil-title { font-size: clamp(2.3rem, 11vw, 3.2rem); letter-spacing: 0.12em; }
  .letter-sheet {
    margin-top: 0;
    padding-inline: 1.2rem;
    padding-top: 3.8rem;
  }
  .stage-letter {
    padding: 2.6rem 0 1.2rem;
    justify-content: flex-start;
    min-height: auto;
  }
  .stage-letter .footer {
    position: static;
    transform: none;
    left: auto;
    bottom: auto;
    margin-top: 0.6rem;
  }
  .stage-wrap-letter {
    min-height: auto;
    justify-content: flex-start;
  }
  .eyebrow-letter { margin-top: 0.85rem; }
  .letter-actions .btn { width: min(100%, 100%); }
  .letter-crest { width: min(140px, 42vw); transform: translate(-50%, -40%); }
  .envelope-button { width: min(360px, 100%); }
  .seal { width: 92px; margin-left: -46px; margin-top: -46px; }
  .lightbox-stage { padding: 0.7rem 0.7rem 4.8rem; }
  .lightbox-nav { top: auto; bottom: 0.75rem; margin-top: 0; }
  .lightbox-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }
  .lightbox-actions { width: 100%; justify-content: flex-start; }
}

@media (min-width: 1100px) {
  .floral-tl { width: min(420px, 36vw); top: -36px; left: -56px; }
  .floral-br { width: min(380px, 30vw); bottom: -44px; right: -48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile-frame img,
  .btn,
  .text-btn { transition: none; }
}

/* —— Motion / effects (PHP edition) —— */
@media (prefers-reduced-motion: no-preference) {
  .stage-enter {
    animation: stage-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .floral-bloom {
    animation: floral-drift 7s ease-in-out infinite alternate;
  }

  .floral-br {
    animation-delay: -2.5s;
  }

  .letter-slip {
    transform: translateY(50%);
    transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0s;
  }

  .envelope-flap {
    transform: rotateX(0deg);
    transform-origin: center top;
    transform-style: preserve-3d;
    transition: transform 1.05s cubic-bezier(0.45, 0.05, 0.2, 1);
    transition-delay: 0s;
  }

  .seal {
    transition:
      transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.75s ease;
  }

  .envelope-legacy.is-opening .envelope-flap {
    transform: rotateX(-178deg);
    transition-delay: 0.48s;
  }

  .envelope-legacy.is-opening .letter-slip {
    transform: translateY(-78%);
    transition-delay: 1.1s;
  }

  .envelope-legacy.is-opening .seal {
    transform: translateY(-42px) scale(0.92);
    opacity: 0;
    transition-delay: 0.12s;
    pointer-events: none;
  }

  .envelope-legacy.is-opening .envelope-ribbon {
    animation: ribbon-soften 0.8s ease 0.35s both;
  }

  /* tile-in disabled for gallery fluidity */

  .request-panel {
    animation: stage-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .lightbox {
    animation: fade-in 0.25s ease both;
  }

  .monogram-invite,
  .invite-script,
  .date-line {
    animation: stage-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .invite-script { animation-delay: 0.08s; }
  .stage-body-envelope > .date-line { animation-delay: 0.16s; }
  .envelope-button { animation: stage-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both; }
  .seal-hint { animation: fade-in 1s ease 0.8s both; }
}

@keyframes stage-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes floral-drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(0, 10px, 0) rotate(1.2deg); }
}

@keyframes tile-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ribbon-soften {
  from { filter: brightness(1); }
  to { filter: brightness(1.05); }
}

.seal-hint {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}


.tile-check {
  position: absolute;
  inset: auto 10px 10px auto;
  width: 18px;
  height: 18px;
  border: 1.5px solid #fff;
  border-radius: 50%;
}

.tile.is-selected .tile-check {
  background: #c9b8a0;
  border-color: #c9b8a0;
}

.tile-video {
  position: absolute;
  left: 10px;
  bottom: 10px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.screen-flash {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #000;
  color: #ddd;
  font-family: var(--serif);
  text-align: center;
  padding: 2rem;
  animation: fade-in 0.08s linear both;
}



/* —— Luxury invite envelope (reference style) —— */
.page-invite {
  padding: 0 !important;
  margin: 0;
  min-height: 100dvh;
  min-height: 100svh;
  width: 100%;
  display: grid !important;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 42%, #faf4ea 0%, #ece3d5 62%, #e5dbcd 100%);
  overflow-x: hidden;
}

.page-invite > main {
  width: 100%;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 0;
}

.stage-wrap-invite {
  width: min(100vw, 430px);
  margin: 0 auto;
  display: block;
}

.invite-stage {
  width: 100%;
  margin: 0 auto;
  display: block;
}

.invite-face {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0 auto;
  width: 100%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: block;
}

.invite-face:disabled { cursor: default; }

.invite-shell {
  position: relative;
  display: block;
  isolation: isolate;
  width: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: #f7f0e6;
  perspective: 1800px;
}

.invite-paper,
.invite-flaps,
.invite-bloom,
.invite-content {
  display: block;
}

.invite-paper,
.invite-emboss,
.invite-flaps,
.invite-creases {
  position: absolute;
  inset: 0;
}

.invite-paper {
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 28%, #fffdf8 0%, transparent 55%),
    linear-gradient(180deg, #f8f1e7 0%, #f3ebe0 52%, #ebe2d4 100%);
}

.invite-emboss {
  z-index: 1;
  opacity: 0.28;
  background-image: url("/assets/textures/paper.png");
  background-size: 210px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Creases only when closed — solid opaque flaps appear on open */
.invite-creases {
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

.invite-flaps {
  z-index: 3;
  pointer-events: none;
  transform-style: preserve-3d;
  opacity: 0;
}

.invite-shell.is-opening .invite-flaps {
  opacity: 1;
}

.invite-shell.is-opening .invite-creases {
  opacity: 0;
}

.invite-flap {
  position: absolute;
  background: #f4ebe0;
  box-shadow: inset 0 0 0 1px rgba(150, 120, 75, 0.1);
}

.invite-flap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("/assets/textures/paper.png");
  background-size: 200px;
  mix-blend-mode: multiply;
}

.invite-flap-top {
  left: 0; right: 0; top: 0; height: 52%;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: center top;
}

.invite-flap-bottom {
  left: 0; right: 0; bottom: 0; height: 52%;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform-origin: center bottom;
}

.invite-flap-left {
  left: 0; top: 0; bottom: 0; width: 52%;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform-origin: left center;
}

.invite-flap-right {
  right: 0; top: 0; bottom: 0; width: 52%;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
  transform-origin: right center;
}

.invite-bloom {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  height: auto;
}

.invite-bloom-tl {
  top: -1%;
  left: -14%;
  width: min(74%, 320px);
}

.invite-bloom-br {
  right: -12%;
  bottom: -2%;
  width: min(72%, 310px);
}

.invite-content {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.45rem, 1.5vh, 0.8rem);
  padding:
    max(5.5rem, env(safe-area-inset-top, 0px) + 4.2rem)
    1.25rem
    max(4rem, env(safe-area-inset-bottom, 0px) + 3rem);
  text-align: center;
  box-sizing: border-box;
}

.invite-copy-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: min(100%, 18rem);
  margin: 0 auto;
}

.invite-kicker,
.invite-cta {
  margin: 0;
  font-family: var(--serif);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8f7750;
}

.invite-kicker {
  font-size: clamp(0.9rem, 2.6vw + 0.45rem, 1.15rem);
  font-weight: 500;
}

.invite-cta {
  font-size: clamp(0.56rem, 1.5vw + 0.32rem, 0.7rem);
  letter-spacing: 0.15em;
  line-height: 1.55;
  max-width: 16rem;
}

.invite-rule {
  display: block;
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c2a56a, transparent);
}

.invite-ornament {
  width: clamp(120px, 46%, 180px);
  margin: 0 auto;
  color: #b8964f;
  opacity: 0.92;
}

.invite-ornament-flip { transform: scaleY(-1); }
.invite-filigree { display: block; width: 100%; height: auto; }

.invite-crest {
  width: clamp(180px, 56vw, 248px);
  margin: 0.15rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 12px 22px rgba(70, 50, 25, 0.14));
}

.invite-crest img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

@media (prefers-reduced-motion: no-preference) {
  .invite-flap {
    transition: transform 1.15s cubic-bezier(0.45, 0.05, 0.2, 1);
  }

  .invite-flaps {
    transition: opacity 0.15s ease;
  }

  .invite-crest,
  .invite-ornament,
  .invite-copy-top,
  .invite-bloom,
  .invite-creases {
    transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.65s ease;
  }

  .invite-shell.is-opening .invite-flap-top { transform: rotateX(-165deg); }
  .invite-shell.is-opening .invite-flap-bottom { transform: rotateX(165deg); }
  .invite-shell.is-opening .invite-flap-left { transform: rotateY(-165deg); }
  .invite-shell.is-opening .invite-flap-right { transform: rotateY(165deg); }

  .invite-shell.is-opening .invite-crest {
    transform: scale(0.94) translateY(-8px);
    opacity: 0;
    transition-delay: 0.2s;
  }

  .invite-shell.is-opening .invite-ornament,
  .invite-shell.is-opening .invite-copy-top {
    opacity: 0;
    transform: translateY(-6px);
    transition-delay: 0.12s;
  }

  .invite-shell.is-opening .invite-ornament-flip {
    transform: scaleY(-1) translateY(-6px);
  }

  .invite-shell.is-opening .invite-bloom-tl {
    transform: translate(-14px, -18px);
    opacity: 0.2;
  }

  .invite-shell.is-opening .invite-bloom-br {
    transform: translate(14px, 18px);
    opacity: 0.2;
  }

  .invite-crest { animation: seal-breathe 3.8s ease-in-out infinite; }
  .invite-cta { animation: cta-pulse 2.4s ease-in-out infinite; }
}

@keyframes seal-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.012); }
}

@keyframes cta-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@media (max-height: 700px) {
  .invite-content {
    gap: 0.35rem;
    padding-top: max(3rem, env(safe-area-inset-top, 0px) + 2.2rem);
    padding-bottom: max(2.2rem, env(safe-area-inset-bottom, 0px) + 1.5rem);
  }
  .invite-crest { width: clamp(140px, 36vh, 200px); }
  .invite-ornament { width: clamp(100px, 28vh, 150px); }
  .invite-bloom-tl { width: min(54%, 230px); }
  .invite-bloom-br { width: min(52%, 220px); }
}

@media (max-width: 380px) {
  .invite-kicker { letter-spacing: 0.18em; }
  .invite-cta { letter-spacing: 0.12em; }
}

@media (min-width: 768px) {
  .page-invite { padding: 1.5rem !important; }

  .page-invite > main {
    min-height: auto;
    width: auto;
  }

  .stage-wrap-invite,
  .invite-stage,
  .invite-face,
  .invite-shell {
    width: min(400px, 92vw);
    min-height: min(860px, calc(100dvh - 3rem));
    max-height: calc(100dvh - 2rem);
  }

  .invite-shell {
    border-radius: 28px;
    box-shadow:
      0 30px 60px rgba(80, 60, 35, 0.18),
      0 0 0 1px rgba(180, 150, 100, 0.14);
  }

  .invite-content {
    min-height: 100%;
    height: 100%;
    padding-top: 7rem;
    padding-bottom: 5rem;
  }
}

@media (min-width: 1200px) {
  .stage-wrap-invite,
  .invite-stage,
  .invite-face,
  .invite-shell {
    width: min(420px, 32vw);
    min-height: min(900px, calc(100dvh - 4rem));
  }
  .invite-crest { width: min(255px, 62%); }
}


/* Gallery fluidity — true masonry columns */
.masonry {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.masonry .tile {
  animation: none !important;
}

.masonry .tile-frame img.is-ready {
  opacity: 1;
}

#infinite-sentinel {
  height: 1px;
  width: 100%;
}

.page-gallery {
  padding-bottom: 5rem;
}

.lightbox-action[aria-pressed="true"] {
  background: rgba(194, 165, 106, 0.28);
  border-color: var(--gold);
}
.lightbox-nav {
  cursor: pointer;
}


.request-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.request-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(28, 24, 20, 0.55);
  cursor: pointer;
}

.request-overlay .request-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  margin: 0;
  max-height: min(90dvh, 720px);
  overflow: auto;
  box-shadow: 0 24px 48px rgba(40, 30, 20, 0.28);
}
