/* =====================================================================
   townhall-all-hands-card-from-the-desk
   "From the Desk" — an engraved-style formal invitation card for a
   company townhall.

   Design language: a fine stationery suite. Deep navy "envelope"
   backdrop with faint foil sparkles, an ivory card stock with a double
   brass-foil rule, a radar "signal" crest, Fraunces serif invitation
   type and Inter labels. The formal counterpart to the bold flyer in
   townhall-all-hands-flyer-front-and-center — same motif, same
   colorway, a deliberate matching set.

   Palette is driven by CSS custom properties at the top — recolor the
   whole template by editing those values.
   ===================================================================== */

:root {
  --envelope-950: #10141d;     /* page / shell background */
  --envelope-900: #151b27;     /* panel backdrop tint */
  --envelope-text: #e8e1cf;    /* text on the envelope */
  --envelope-muted: #97a1b0;   /* secondary text on the envelope */
  --card: #fbf6ea;             /* ivory card stock */
  --card-edge: #f0e7d2;        /* card border tint */
  --ink: #232a35;              /* text on the card */
  --ink-soft: #5a6472;         /* secondary text on the card */
  --ink-faint: #8b93a0;        /* muted text on the card */
  --brass-500: #8f6a27;        /* deep brass (foil rules, ink accents) */
  --brass-400: #a97e33;        /* primary brass */
  --gold-300: #cdab67;         /* soft gold */
  --gold-200: #e2c88e;         /* light foil */
  --ok: #4c8f6d;               /* success / live dot on card */
  --err: #a63d2f;              /* validation on card */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --radius: 18px;
  --shell-pad: clamp(18px, 4.5vw, 40px);
  --foil-rule: linear-gradient(90deg, var(--gold-200), var(--brass-400) 30%, var(--gold-300) 50%, var(--brass-400) 70%, var(--gold-200));
}

/* ---------- reset & base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--envelope-text);
  background: var(--envelope-950);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
dd { margin: 0; }

a { color: inherit; }

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

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

/* ---------- utilities ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--card);
  color: var(--envelope-950);
  font-weight: 700;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* =====================================================================
   SHELL — progressive enhancement
   Without JS everything is a normal stacked page that scrolls.
   With .js it becomes a single-viewport app: 100dvh shell, absolutely
   positioned panels, only the active panel scrolls.
   ===================================================================== */

.shell { min-height: 100vh; }

.panel { display: block; }

/* A panel carrying the `hidden` attribute (e.g. the optional Free Page) is
   hidden AND skipped by main.js — its nav entry, tab and dot disappear with
   it. Author styles would otherwise beat the UA [hidden] rule. */
.panel[hidden] { display: none; }

.panel-scroll {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: var(--shell-pad) var(--shell-pad) 48px;
}

/* ---- app mode ---- */

.js body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.js .shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.js .panels {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.js .panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(205, 171, 103, 0.4) transparent;
  padding: 0 0 132px;                    /* clearance for the bottom nav + footer */
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0s linear 0.45s;
}

.js .panel::-webkit-scrollbar { width: 10px; }
.js .panel::-webkit-scrollbar-thumb {
  background: rgba(205, 171, 103, 0.35);
  border-radius: 8px;
  border: 3px solid var(--envelope-950);
}

.js .panel.is-active {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.js .panel-scroll { min-height: 100%; }

/* The invitation card centers; falls back to scroll on short screens. */
.js .card-scroll {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* =====================================================================
   AMBIENT FOIL SPARKLES (envelope backdrop)
   JS injects .fx-spark spans; each twinkles like light on foil.
   ===================================================================== */

.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.fx-spark {
  position: absolute;
  border-radius: 50%;
  background: var(--gold-200);
  opacity: 0;
  animation: sparkle-twinkle 5s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  18% { opacity: 0.55; transform: scale(1); }
  36% { opacity: 0.12; transform: scale(0.7); }
  52% { opacity: 0.5; transform: scale(1.15); }
  70% { opacity: 0; transform: scale(0.4); }
}

/* =====================================================================
   OPTIONAL PHOTO BACKDROP (envelope)
   A dimmed venue photo printed behind the cards, like a photo tucked into
   the envelope. Decorative — the dark glaze keeps the engraved-stationery
   look and text contrast. Delete the .photo-backdrop element to disable.
   ===================================================================== */

.photo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.photo-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navy "envelope" glaze over the photo: the image reads as a subtle
   texture while the ivory cards stay the star of the viewport. */
.photo-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 95% at 50% 10%, rgba(16, 20, 29, 0.42), rgba(16, 20, 29, 0.8) 58%, rgba(16, 20, 29, 0.94)),
    linear-gradient(180deg, rgba(16, 20, 29, 0.55), rgba(16, 20, 29, 0.86));
}

/* Graceful fallback: if the backdrop file is missing, drop back to the
   plain navy envelope (main.js adds .photo-missing on image error). */
.photo-backdrop.photo-missing img { display: none; }

/* =====================================================================
   THE CARDS — ivory stock with a double foil rule
   ===================================================================== */

.invite-card,
.session-card,
.moments-card,
.rsvp-card,
.guestbook-card,
.flyer-card,
.film-card,
.free-card {
  position: relative;
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Outer foil rule (drawn as a padded gradient border). */
.invite-card::before,
.session-card::before,
.moments-card::before,
.rsvp-card::before,
.guestbook-card::before,
.flyer-card::before,
.film-card::before,
.free-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1.5px;
  background: var(--foil-rule);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.card-frame {
  margin: 14px;
  border: 1px solid rgba(143, 106, 39, 0.5);
  border-radius: calc(var(--radius) - 6px);
}

.card-body {
  padding: clamp(26px, 5vw, 46px) clamp(22px, 6vw, 54px);
}

/* =====================================================================
   TYPOGRAPHY
   ===================================================================== */

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass-500);
}

.event-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 6.5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 14px;
}

.event-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.6vw, 1.28rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 44ch;
  margin-top: 10px;
}

.guest-greeting {
  margin-top: 26px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--brass-500);
}
.guest-greeting .greeting-name { color: var(--ink); font-weight: 500; }

/* ---- invitation card front ---- */

.card-crest { display: flex; justify-content: center; margin-bottom: 20px; }

.crest-signal {
  width: clamp(72px, 11vw, 104px);
  height: auto;
  color: var(--brass-400);
}

.host-line {
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass-500);
}

.invite-line {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink-soft);
  margin-top: 26px;
}

.invite-card .event-title,
.invite-card .event-subtitle { text-align: center; }
.invite-card .event-title { font-weight: 600; margin-top: 8px; }
.invite-card .event-subtitle { margin-left: auto; margin-right: auto; }
.invite-card .guest-greeting { text-align: center; }

/* ---- card details rows ---- */

.card-details {
  margin-top: 30px;
  border-top: 1px solid rgba(143, 106, 39, 0.35);
}

.card-detail {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(143, 106, 39, 0.28);
}

.card-detail-label {
  flex: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-500);
}

.card-detail-value {
  text-align: right;
  font-weight: 500;
  font-size: 15.5px;
  color: var(--ink);
}

/* ---- actions ---- */

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: linear-gradient(100deg, var(--gold-300), var(--brass-400));
  color: #fffdf6;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }

.btn-ghost {
  border: 1px solid rgba(143, 106, 39, 0.55);
  color: var(--ink-soft);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--brass-400); color: var(--ink); }

.card-footer {
  margin-top: 26px;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* =====================================================================
   SECTION HEADS (session / rsvp / guestbook cards)
   ===================================================================== */

.section-head,
.rsvp-head,
.guestbook-head {
  max-width: 640px;
  margin-bottom: 28px;
}

.section-title,
.rsvp-title,
.guestbook-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.12;
  color: var(--ink);
  margin-top: 12px;
}

.section-lead,
.rsvp-description,
.guestbook-description {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* =====================================================================
   AGENDA (session card)
   ===================================================================== */

.event-agenda { counter-reset: agenda; margin: 6px 0 28px; }

.agenda-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 12px 2px;
  border-top: 1px solid rgba(143, 106, 39, 0.28);
  font-size: 15px;
  color: var(--ink);
}
.agenda-item:first-of-type { border-top: 0; }

.agenda-time {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--brass-500);
  min-width: 6ch;
}

.agenda-text { line-height: 1.5; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.info-card {
  position: relative;
  background: #f6efdd;
  border: 1px solid rgba(143, 106, 39, 0.4);
  border-radius: 12px;
  padding: 20px;
}
/* Engraved inner hairline — a fine stationery double rule that echoes the
   card's own foil frame, instead of a single flat "AI" border. */
.info-card::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(143, 106, 39, 0.22);
  border-radius: 8px;
  pointer-events: none;
}

.info-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-500);
  margin-bottom: 10px;
}

.info-date,
.info-time,
.info-venue,
.info-join {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.info-address { color: var(--ink-soft); margin-top: 4px; font-size: 14.5px; }

.info-note {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-faint);
}

.event-notes {
  position: relative;
  background: #f6efdd;
  border: 1px solid rgba(143, 106, 39, 0.4);
  border-radius: 10px;
  padding: 18px 22px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 680px;
}
/* Same engraved double rule as the info cards — no single left accent bar. */
.event-notes::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(143, 106, 39, 0.2);
  border-radius: 5px;
  pointer-events: none;
}

/* =====================================================================
   MOMENTS (optional photo gallery)
   A "Moments from the floor" photo panel. Optional — delete the whole
   #moments section to remove the gallery; the nav rebuilds itself.
   ===================================================================== */

.moments-card { max-width: 820px; }

.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

/* The clickable photo button — opens the photo full-size in the built-in
   lightbox (see main.js + the lightbox styles below). */
.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.gallery-open img {
  transition: transform 0.35s ease;
}

.moment-figure {
  position: relative;
  margin: 0;
  background: var(--envelope-950);  /* shows while a photo loads */
  border: 1px solid rgba(143, 106, 39, 0.5);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.moment-figure:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.moment-figure:hover .gallery-open img,
.moment-figure:focus-within .gallery-open img {
  transform: scale(1.04);
}

.moment-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

/* A faint foil glyph on hover/focus — an engraved-style affordance that
   the photo opens full-size. */
.gallery-open::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(205, 171, 103, 0.6);
  background: rgba(16, 20, 29, 0.55);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2c88e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.6-4.6M11 8v6M8 11h6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.moment-figure:hover .gallery-open::after,
.moment-figure:focus-within .gallery-open::after {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-open img { transition: none; }
}

.moment-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: #f6efdd;
  border-top: 1px solid rgba(143, 106, 39, 0.35);
}

.moment-tag {
  flex: none;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-500);
}

.moment-note {
  font-size: 13.5px;
  color: var(--ink-soft);
  text-align: right;
}

/* Graceful fallback: a missing photo file shows a short note instead of a
   broken-image glyph (main.js adds .photo-missing on image error). */
.moment-figure.photo-missing .moment-photo { display: none; }

.moment-figure.photo-missing::before {
  content: "Photo not found — restore the image file or delete this photo (see README).";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  margin: 10px;
  padding: 20px;
  border: 1.5px dashed rgba(143, 106, 39, 0.55);
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--ink-faint);
}

/* A missing photo also drops the click-to-open affordance. */
.moment-figure.photo-missing .gallery-open { display: none; }

/* =====================================================================
   THE FLYER (optional flyer/banner showcase)
   Official announcement art, framed like a printed flyer. Tap it to open
   full-size in the lightbox. Optional — delete the whole #flyer section
   to remove it; the nav rebuilds itself.
   ===================================================================== */

.flyer-card { max-width: 820px; }

.flyer-figure {
  position: relative;
  margin: 0 auto;
  max-width: 400px;
  background: #f6efdd;
  border: 1px solid rgba(143, 106, 39, 0.5);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.08);
}

/* The flyer reads as a portrait print; the photo button reuses the
   gallery crop rules with a 4:5 frame. */
.flyer-figure .gallery-open { aspect-ratio: 4 / 5; cursor: zoom-in; }

.flyer-figure .flyer-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flyer-figure:hover .gallery-open img { transform: scale(1.04); }
.flyer-figure:focus-within .gallery-open::after { opacity: 1; transform: scale(1); }

.flyer-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: #f6efdd;
  border-top: 1px solid rgba(143, 106, 39, 0.35);
}

.flyer-link {
  margin-top: 20px;
  text-align: center;
}

.flyer-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid rgba(143, 106, 39, 0.5);
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.flyer-link a:hover { border-color: var(--brass-400); color: var(--ink); }

/* The optional announcement link stays hidden until a real href is set
   (main.js reveals it). The [hidden] UA rule loses to the rules above. */
.flyer-link[hidden] { display: none; }

/* Missing flyer file: same graceful note as the gallery. */
.flyer-figure.photo-missing .gallery-open { display: none; }

.flyer-figure.photo-missing::before {
  content: "Flyer not found — restore the image file or delete this panel (see README).";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  margin: 10px;
  padding: 20px;
  border: 1.5px dashed rgba(143, 106, 39, 0.55);
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--ink-faint);
}

/* =====================================================================
   THE FILM (optional video embed)
   A 16:9 video stage that stays quiet (a poster-like engraved backdrop
   with a play button) until the host's embed URL is loaded on demand.
   Optional — delete the whole #film section to remove it.
   ===================================================================== */

.film-card { max-width: 820px; }

.film-figure { margin: 0; }

.film-stage {
  position: relative;
  width: 100%;
  /* Capped by height so a tall phone screen never inflates the video;
     the 16:9 ratio is preserved (width caps first on phones). */
  max-width: calc(52vh * 16 / 9);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(143, 106, 39, 0.55);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  /* Engraved navy/brass poster while the video is unloaded. */
  background:
    radial-gradient(circle at 50% 42%, rgba(205, 171, 103, 0.16), transparent 62%),
    linear-gradient(165deg, #1b2230 0%, #0d1118 70%);
}

/* Fine inner hairline over the stage — a stationery double rule. */
.film-stage::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(205, 171, 103, 0.28);
  border-radius: 9px;
  pointer-events: none;
  z-index: 2;
}

.film-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  z-index: 1;
}

/* Optional poster frame: drop an <img class="film-poster"> as the first
   child of .film-stage and it sits behind the play button (see
   assets/img/README.md). */
.film-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.film-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  color: var(--envelope-text);
}

.film-stage.is-loaded .film-play { display: none; }

.film-play-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(205, 171, 103, 0.65);
  background: rgba(16, 20, 29, 0.55);
  color: var(--gold-200);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.film-play-ring svg { width: 26px; height: 26px; }

.film-play:hover .film-play-ring,
.film-play:focus-visible .film-play-ring {
  background: var(--gold-300);
  color: var(--envelope-950);
  transform: scale(1.06);
}

.film-play-label {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.film-play-note {
  display: none;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(232, 225, 207, 0.55);
}

/* Host-facing note when no embed URL is configured yet. */
.film-empty-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 10px 18px;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--gold-200);
  background: rgba(16, 20, 29, 0.88);
  border-top: 1px solid rgba(205, 171, 103, 0.35);
}

.film-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: #f6efdd;
  border: 1px solid rgba(143, 106, 39, 0.35);
  border-radius: 10px;
}

.film-caption-line {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.film-caption-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.film-fullscreen,
.film-original {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(143, 106, 39, 0.5);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.film-fullscreen:hover,
.film-original:hover { border-color: var(--brass-400); color: var(--ink); }

/* The original link stays hidden until an embed URL is set (main.js
   reveals it). The [hidden] UA rule loses to the inline-flex above. */
.film-original[hidden] { display: none; }

/* =====================================================================
   FREE PAGE (optional, re-orderable page)
   A host-owned page of free blocks: each block is a card with an optional
   photo, a title and free text. The photo is optional — leave the image
   empty (or delete the <figure>) and the block stays a clean text block.
   Photos open full-size in the built-in lightbox like the Moments gallery.
   Optional: add `hidden` to the #free section to hide the whole page, or
   move the <section> to re-order it — the nav rebuilds itself.
   ===================================================================== */

.free-card { max-width: 820px; }

.free-blocks {
  display: grid;
  gap: 20px;
}

.free-block {
  background: #f6efdd;
  border: 1px solid rgba(143, 106, 39, 0.4);
  border-radius: 14px;
  padding: 18px;
}

.free-block-figure {
  position: relative;
  margin: 0;
  background: var(--envelope-950);  /* shows while a photo loads */
  border: 1px solid rgba(143, 106, 39, 0.5);
  border-radius: 10px;
  overflow: hidden;
}

.free-block-figure:hover .gallery-open img,
.free-block-figure:focus-within .gallery-open img {
  transform: scale(1.04);
}

.free-block-figure:hover .gallery-open::after,
.free-block-figure:focus-within .gallery-open::after {
  opacity: 1;
  transform: scale(1);
}

.free-block-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.free-block-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--ink);
  margin-top: 14px;
}

.free-block-content {
  margin-top: 8px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* Missing photo file: same graceful note as the Moments gallery. */
.free-block-figure.photo-missing .free-block-image { display: none; }

/* A block whose image slot is empty (host left it blank) collapses the
   whole photo frame + caption — the block stays a clean text block. */
.free-block-figure:not(:has(img)) { display: none; }

.free-block-figure.photo-missing::before {
  content: "Photo not found — restore the image file or delete this photo (see README).";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  margin: 10px;
  padding: 20px;
  border: 1.5px dashed rgba(143, 106, 39, 0.55);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-align: center;
}

.free-block-figure.photo-missing .gallery-open { display: none; }

/* =====================================================================
   PANEL ADVANCE (bottom-of-panel CTA)
   ===================================================================== */

.panel-advance {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  padding: 12px 20px;
  border: 1px solid rgba(232, 225, 207, 0.35);
  border-radius: 999px;
  color: var(--envelope-text);
  font-weight: 600;
  font-size: 14px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.panel-advance:hover { border-color: var(--gold-300); color: var(--gold-200); }

.advance-chevron { width: 16px; height: 16px; }

/* =====================================================================
   LIGHTBOX — full-screen photo & video viewer (built by main.js)
   Every photo feature (the Moments gallery, The Flyer) opens here with
   zoom + pan, prev/next browsing and an "Open full size" link to the
   original file. The Film panel's video opens in its own viewer. Built
   on demand and destroyed on close — never traps focus when closed.
   ===================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  background: rgba(11, 14, 21, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: min(92vw, 960px);
  max-height: 74vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(205, 171, 103, 0.45);
  box-shadow: 0 34px 90px -30px rgba(0, 0, 0, 0.85);
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

/* Zoom state: the photo scales 2× and the viewer becomes a scrollable
   pane so guests can pan around — click the photo (or the zoom button)
   to toggle, click the dark backdrop to close. */
.lightbox.is-zoomed {
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.lightbox.is-zoomed img {
  max-width: none;
  max-height: none;
  transform: scale(2);
  transform-origin: 0 0;
  align-self: flex-start;
  cursor: zoom-out;
}

.lightbox-cap,
.lightbox-hint,
.lightbox-original { align-self: center; }

.lightbox-cap {
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-300);
  text-align: center;
}

.lightbox-hint {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 225, 207, 0.5);
  text-align: center;
}

.lightbox-original {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(205, 171, 103, 0.5);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--envelope-text);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lightbox-original:hover { background: var(--brass-400); color: #fffdf6; }

.lightbox-close,
.lightbox-prev,
.lightbox-next,
.lightbox-zoom {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(205, 171, 103, 0.45);
  border-radius: 50%;
  background: rgba(16, 20, 29, 0.75);
  color: var(--envelope-text);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-zoom:hover {
  background: var(--gold-300);
  color: var(--envelope-950);
}

.lightbox-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-zoom { bottom: calc(14px + env(safe-area-inset-bottom)); right: 14px; }

.lightbox-zoom svg { width: 19px; height: 19px; }

.lightbox-prev.is-hidden,
.lightbox-next.is-hidden { display: none; }

@media (max-width: 560px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

/* Video viewer — the same dialog hosting the film panel's iframe. */
.lightbox-video-stage {
  width: min(94vw, 1080px);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(205, 171, 103, 0.45);
  box-shadow: 0 34px 90px -30px rgba(0, 0, 0, 0.85);
  background: #000;
}

.lightbox-video-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =====================================================================
   RSVP FORM (on the card)
   ===================================================================== */

.rsvp-form {
  background: #f6efdd;
  border: 1px solid rgba(143, 106, 39, 0.3);
  border-radius: 14px;
  padding: clamp(20px, 4vw, 32px);
}

.form-group { margin-bottom: 20px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-group label,
.attending-fieldset legend {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 8px;
}

.label-optional { color: var(--ink-faint); font-weight: 400; font-size: 13px; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fffdf6;
  border: 1px solid rgba(143, 106, 39, 0.45);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brass-400);
  box-shadow: 0 0 0 3px rgba(169, 126, 51, 0.16);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--ink-faint); opacity: 0.85; }

.form-group textarea { resize: vertical; min-height: 84px; }

.form-hint {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-faint);
  margin-top: 8px;
}

.error {
  display: block;
  color: var(--err);
  font-size: 13px;
  margin-top: 6px;
}

/* ---- attending segmented control ---- */

.attending-fieldset { border: 0; padding: 0; margin: 0 0 20px; min-inline-size: 0; }

.attending-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.attending-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(143, 106, 39, 0.45);
  border-radius: 12px;
  background: #fffdf6;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.attending-btn:hover { border-color: var(--brass-400); color: var(--ink); }

.attending-btn.is-selected {
  border-color: var(--brass-400);
  color: var(--ink);
  background: rgba(205, 171, 103, 0.18);
}

.attending-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ink-faint);
  flex: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.attending-btn.is-selected .attending-dot {
  border-color: var(--brass-400);
  background: var(--brass-400);
  box-shadow: inset 0 0 0 3px #fffdf6;
}

/* Declining collapses the guest/meal fields (CSS only — inputs stay in the
   DOM and enabled so the platform still serializes the form). */
.is-declining .rsvp-guest-fields { display: none; }
.is-declining .attending-fieldset { margin-bottom: 20px; }

/* ---- guest stepper ---- */

.stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(143, 106, 39, 0.45);
  border-radius: 12px;
  background: #fffdf6;
  overflow: hidden;
}

.stepper-btn {
  width: 52px;
  font-size: 22px;
  font-weight: 700;
  color: var(--brass-500);
  background: transparent;
  transition: background-color 0.2s ease;
}
.stepper-btn:hover { background: rgba(205, 171, 103, 0.2); }

.stepper input[type="number"] {
  width: 76px;
  text-align: center;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 17px;
  font-weight: 700;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- submit ---- */

#submit-button {
  width: 100%;
  margin-top: 8px;
  padding: 16px 20px;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--gold-300), var(--brass-400));
  color: #fffdf6;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, filter 0.2s ease;
}
#submit-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
#submit-button:disabled { opacity: 0.6; cursor: wait; transform: none; }

.loading {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--brass-500);
}

/* ---- RSVP deadline countdown ---- */

.rsvp-deadline { display: none; margin-top: 22px; }

.rsvp-deadline-live .rsvp-deadline { display: block; }

.rsvp-deadline-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-500);
  margin-bottom: 12px;
}

.count-wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 360px;
}

.count-block {
  background: #fffdf6;
  border: 1px solid rgba(143, 106, 39, 0.4);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
}

.count-day,
.count-hour,
.count-minute,
.count-second {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 600;
  color: var(--brass-500);
  line-height: 1.1;
}

.count-unit {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* =====================================================================
   GUESTBOOK (mount point styling)
   ===================================================================== */

.guestbook-body { max-width: 640px; }

/* The platform injects entries; style them for a coherent look. */
.guestbook-body .guestbook-entry {
  background: #f6efdd;
  border: 1px solid rgba(143, 106, 39, 0.3);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 12px;
}

.guestbook-body input[type="text"],
.guestbook-body input[type="email"],
.guestbook-body textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fffdf6;
  border: 1px solid rgba(143, 106, 39, 0.45);
  border-radius: 10px;
  padding: 12px 14px;
}

.guestbook-body #load-more {
  display: inline-flex;
  margin-top: 8px;
  padding: 12px 22px;
  border: 1px solid rgba(143, 106, 39, 0.5);
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
}
.guestbook-body #load-more:hover { border-color: var(--brass-400); color: var(--ink); }

/* The platform injects #guestbookForm + #comments-container + .more-guestbook-wrap
   into .guestbook-body — style the injected classes so they read as part of the
   design (scoped under .guestbook-body). Inputs/entries/load-more rules above. */
.guestbook-body #guestbookForm { display: grid; gap: 14px; }
.guestbook-body #guestbookForm .form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 8px;
}
.guestbook-body #guestbookForm button[type="submit"] {
  width: 100%;
  margin-top: 8px;
  padding: 16px 20px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--gold-300), var(--brass-400));
  color: #fffdf6 !important;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.guestbook-body #guestbookForm button[type="submit"]:hover { transform: translateY(-1px); filter: brightness(1.06); }
.guestbook-body #guestbookForm button[type="submit"]:disabled { opacity: 0.6; cursor: wait; }
.guestbook-body #comments-container {
  margin-top: 28px !important;
  max-height: none !important;
  overflow: visible !important;
  border-top: 1px solid rgba(143, 106, 39, 0.3) !important;
}
.guestbook-body .more-guestbook-wrap { text-align: center; margin-top: 18px; }
.guestbook-body .loading-guestbook { text-align: center; font-size: 13px; letter-spacing: 0.08em; color: var(--brass-500); padding: 10px 0; }
.guestbook-body .guestbook-chapta { margin-top: 4px; }
.guestbook-body .error:empty { display: none; }

/* =====================================================================
   BOTTOM NAV
   ===================================================================== */

.panel-nav {
  flex: none;
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(16, 20, 29, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(205, 171, 103, 0.35);
}

.panel-nav-list {
  display: flex;
  justify-content: flex-start;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 620px;
  margin: 0 auto;
  /* Narrow screens: the tab strip scrolls sideways so every label stays
     fully readable; the active tab is scrolled into view by main.js. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 0 6px;
}

.panel-nav-list::-webkit-scrollbar { display: none; }

.panel-nav-item { flex: 0 0 auto; scroll-snap-align: start; }

@media (min-width: 768px) {
  .panel-nav-list {
    justify-content: center;
    gap: 6px;
    padding: 0;
    overflow: visible;
  }
  .panel-nav-item { flex: 1 1 0; min-width: 0; }
}

.panel-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 8px 4px 6px;
  border-radius: 12px;
  color: var(--envelope-muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.panel-nav-btn svg { width: 20px; height: 20px; }

.panel-nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.panel-nav-btn:hover { color: var(--envelope-text); }

.panel-nav-btn.is-active {
  color: var(--gold-200);
  background: rgba(205, 171, 103, 0.12);
}

/* Mobile prev/next pager — on phones the tab strip is a scrollable
   carousel, so main.js adds these stepping buttons (hidden on desktop and
   without JS). */
.panel-nav-pager {
  display: none;
  gap: 6px;
  flex: none;
}

@media (max-width: 767px) {
  .panel-nav-pager { display: flex; }
}

.panel-nav-prev,
.panel-nav-next {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(205, 171, 103, 0.45);
  background: rgba(16, 20, 29, 0.6);
  color: var(--envelope-text);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.panel-nav-prev svg,
.panel-nav-next svg { width: 20px; height: 20px; }

.panel-nav-prev:hover:not(:disabled),
.panel-nav-next:hover:not(:disabled) {
  border-color: var(--gold-300);
  color: var(--gold-200);
}

.panel-nav-prev:disabled,
.panel-nav-next:disabled { opacity: 0.35; cursor: default; }

.no-js .panel-nav-pager { display: none; }

/* =====================================================================
   FOOTER BRAND (platform placeholder)
   The platform swaps the text/logo. Sits beneath the bottom nav, pinned
   inside the app shell; hidden when printing.
   ===================================================================== */

.footer-brand {
  flex: none;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--envelope-muted);
  border-top: 1px solid rgba(205, 171, 103, 0.18);
  background: rgba(16, 20, 29, 0.92);
}

/* =====================================================================
   POWERED-BY (platform credit line)
   Full-width brand line beneath the footer brand placeholder. The text is
   host-editable through the platform's morph system; hidden when printing
   like the rest of the chrome.
   ===================================================================== */

.powered-by {
  flex: none;
  padding: 6px 16px calc(6px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--envelope-muted);
  background: rgba(16, 20, 29, 0.92);
}

/* =====================================================================
   NO-JS FALLBACK
   The shell needs JS for the panel app; without it the stacked page must
   still be usable: show the attending select, hide JS-only widgets.
   ===================================================================== */

.no-js .attending-btn { display: none; }
.no-js #attending {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  min-height: 48px;
  padding: 11px 14px;
  font-size: 1rem;
  color: var(--ink);
  background: #fffdf6;
  border: 1px solid rgba(143, 106, 39, 0.45);
  border-radius: 10px;
}
.no-js .panel-advance { display: none; }

/* The film stays a static poster without JS — hide the JS-only controls
   and say so plainly instead of offering dead buttons. */
.no-js .film-fullscreen,
.no-js .film-original { display: none; }
.no-js .film-play { cursor: default; }
.no-js .film-play-note { display: block; }

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fx-layer { display: none !important; }
  .js .panel { transform: none; }
}

/* =====================================================================
   PRINT
   All panels print as stacked pages; nav and effects are hidden.
   ===================================================================== */

@media print {
  @page { margin: 12mm; }

  html, body { background: #ffffff !important; }
  body { color: #111; }

  .js body,
  .js .shell { height: auto !important; overflow: visible !important; }

  .js .panel {
    position: static !important;
    inset: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    overflow: visible !important;
    padding: 0 !important;
    transition: none !important;
  }

  .panel + .panel { break-before: page; }

  .panel-scroll { max-width: none; padding: 6mm 0; }
  .card-scroll { justify-content: flex-start; }

  .panel-nav,
  .fx-layer,
  .photo-backdrop,
  .skip-link,
  .panel-advance,
  .rsvp-deadline,
  .footer-brand,
  .powered-by,
  .panel-nav-pager,
  .lightbox { display: none !important; }

  .card-actions { display: none; }

  /* Flatten the foil frame + card into plain print-friendly shapes. */
  .invite-card::before,
  .session-card::before,
  .moments-card::before,
  .rsvp-card::before,
  .guestbook-card::before,
  .flyer-card::before,
  .film-card::before,
  .free-card::before { display: none; }
  .card-frame { border-color: #bbb; }

  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="tel"],
  .form-group input[type="number"],
  .form-group select,
  .form-group textarea,
  .guestbook-body input,
  .guestbook-body textarea {
    background: #ffffff !important;
    color: #111 !important;
    border-color: #999 !important;
  }

  .moment-figure,
  .flyer-figure,
  .film-stage { break-inside: avoid; }

  .film-play,
  .film-fullscreen,
  .film-original { display: none; }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
