/* ════════════════════════════════════════════════════════════════════
   business-networking-common-ground-flyer — styles.css

   Design language: modern editorial / professional networking poster.
   Warm paper + deep ink + one confident cobalt accent. Instrument Serif
   (editorial serif) for display, Inter (clean sans) for body and UI.
   Inspired by the clean, typographic invitation cards used by premium
   online stationers: generous whitespace, hairline rules, small-caps
   labels, a monogram mark — no stock photography.

   Shell contract:
     - Default (no JS): normal stacked document flow.
     - html.shell-on (added by main.js): single-viewport 100dvh shell where
       only the active panel scrolls internally.
   ════════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --paper:      #f6f4ee;   /* warm paper ground */
  --paper-2:    #efebe1;
  --card:       #fffdf9;
  --ink:        #1b1e23;   /* near-black, warm */
  --ink-2:      #454b54;
  --ink-3:      #767d87;
  --line:       rgba(27, 30, 35, .14);
  --line-soft:  rgba(27, 30, 35, .08);
  --accent:     #1e4fe0;   /* cobalt */
  --accent-deep:#163bb0;
  --accent-soft:#e9eefb;
  --accent-ink: #12308f;
  --danger:     #b3382a;
  --ok:         #1e7a46;

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius:   14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow:   0 18px 44px -26px rgba(27, 30, 35, .32);
  --shadow-btn: 0 10px 22px -12px rgba(30, 79, 224, .55);
  --topbar-h: 56px;
  --navbar-h: 64px;
}

/* ── Fonts (bundled locally so the template stays self-contained) ──── */
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif_400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif_italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

@font-face { font-family: "Inter"; src: url("../fonts/inter_400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter_500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter_600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter_700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ── Reset / base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 400 clamp(15px, 1.6vw, 17px)/1.65 var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

img { max-width: 100%; height: auto; }

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

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

button { font: inherit; color: inherit; }

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

::selection { background: var(--accent); color: #fff; }

.muted { color: var(--ink-3); }

/* ── Skip link ──────────────────────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ── Shell ────────────────────────────────────────────────────────────
   Default (html:not(.shell-on)): normal document flow — every panel is
   stacked and the page scrolls as a whole. This is the no-JS fallback. */
.shell { min-height: 100dvh; }

html:not(.shell-on) .shell-topbar,
html:not(.shell-on) .shell-nav { display: none; } /* clean scroll in no-JS mode */

/* JS enabled: fixed single-viewport shell, only active panel scrolls. */
html.shell-on .shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh; /* fallback for older browsers */
  min-height: 0;
  overflow: hidden;
}

html.shell-on .panels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

html.shell-on .panel {
  flex: 0 0 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ── Top bar ────────────────────────────────────────────────────────── */
.shell-topbar {
  flex: 0 0 auto;
  height: var(--topbar-h);
  background: var(--card);
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  padding-top: env(safe-area-inset-top);
  z-index: 20;
}

.topbar-inner {
  max-width: 1080px;
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 40px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-brand {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.4vw, 21px);
  letter-spacing: .01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-edition {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  font-size: .55em;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-left: .35em;
}
.topbar-progress {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.page-count { color: var(--ink); }
.topbar-cta {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-deep);
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
}
.topbar-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.js-rsvp-cta.is-hidden { display: none; }

/* ── Panel scaffolding ──────────────────────────────────────────────── */
.panel-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding:
    clamp(30px, 6vw, 76px)
    clamp(20px, 6vw, 56px)
    calc(clamp(28px, 5vw, 56px) + var(--navbar-h));
}

.panel-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.panel-head { margin-bottom: clamp(26px, 4vw, 44px); }
.panel-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.panel-desc {
  margin-top: 12px;
  max-width: 62ch;
  color: var(--ink-2);
}

.panel-note {
  margin-top: clamp(22px, 3vw, 34px);
  font-size: .92em;
  color: var(--ink-3);
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

/* ── Cover / poster ─────────────────────────────────────────────────── */
.cover-inner { display: flex; flex-direction: column; }

.cover-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}

.cover-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(46px, 9vw, 104px);
  line-height: .98;
  letter-spacing: -.02em;
  margin-top: 14px;
}

.cover-title::after {
  content: "";
  display: block;
  width: 74px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin-top: 22px;
}

.cover-subtitle {
  margin-top: 22px;
  max-width: 62ch;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-2);
}

.cover-greeting {
  margin-top: clamp(26px, 4vw, 44px);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(19px, 2.6vw, 24px);
  color: var(--ink);
}

.private-note {
  margin-top: 10px;
  font-size: .92em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  max-width: 560px;
}

.cover-meta {
  margin-top: clamp(26px, 4vw, 40px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 36px);
  padding-top: 22px;
  max-width: 860px;
}
.meta-item dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.meta-item dd {
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
}

.cover-actions {
  margin-top: clamp(28px, 4.5vw, 46px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cover-hosts {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.avatar-row { display: flex; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 2px solid var(--card);
  margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }
.avatar-more { background: var(--paper-2); color: var(--ink-3); }
.cover-hosts-note {
  font-size: .95em;
  color: var(--ink-2);
}
.cover-hosts-note .organizer-name { font-weight: 600; color: var(--ink); }

.cover-footnote {
  margin-top: 26px;
  font-size: .95em;
  color: var(--ink-3);
}
.cover-footnote strong { color: var(--ink); }

/* ── Cover venue backdrop (optional photo feature) ────────────────────
   Full-bleed photo behind the poster, veiled by a paper gradient so the
   typography stays legible. Ships with an SVG placeholder; hide the whole
   feature by removing the .cover-photo block or setting
   showCoverPhoto: false in main.js. */
.panel-cover { position: relative; }
.cover-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--paper-2); /* holds while the image loads */
}
.cover-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* the scrim below does the legibility work; a gentle soft-focus keeps
     busy photos from visually competing with the poster typography — tap
     the photo to see the original sharp and full size */
  filter: blur(1.5px) saturate(.92) brightness(.97);
}
.cover-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(246, 244, 238, .95) 0%,
    rgba(246, 244, 238, .82) 30%,
    rgba(246, 244, 238, .6) 52%,
    rgba(246, 244, 238, .93) 100%);
}
.cover-photo-btn {
  position: absolute;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 12.5px/1 var(--font-sans);
  color: var(--ink);
  background: rgba(255, 253, 249, .92);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(27, 30, 35, .35);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.cover-photo-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.cover-photo-btn:active { transform: translateY(1px); }
.cover-zoom-icon { font-size: 14px; line-height: 1; }
.cover-inner { position: relative; z-index: 1; }

/* ── Value cards (format) ───────────────────────────────────────────── */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.4vw, 26px);
}
.value-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px 22px 26px;
  box-shadow: var(--shadow);
}
.value-index {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.value-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.value-text {
  margin-top: 8px;
  font-size: .93em;
  color: var(--ink-2);
}

/* ── Room / who you'll meet ─────────────────────────────────────────── */
.room-block {
  margin-top: clamp(30px, 4.5vw, 50px);
}
.room-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 400;
}
.room-desc {
  margin-top: 8px;
  color: var(--ink-2);
  max-width: 58ch;
}
.room-chips {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.room-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 5px 14px 5px 6px;
  background: var(--card);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.room-chips li:hover { border-color: var(--accent); color: var(--accent-deep); }
.room-chip-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--accent-ink);
  background: var(--accent-soft);
}
.room-note {
  margin-top: 14px;
  font-size: .9em;
  color: var(--ink-3);
  max-width: 64ch;
}

/* ── Agenda / timeline ──────────────────────────────────────────────── */
.agenda {
  border-top: 1px solid var(--line);
}
.agenda-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: clamp(12px, 2.5vw, 28px);
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}
.agenda-time {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.6vw, 24px);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.agenda-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.agenda-detail {
  margin-top: 3px;
  font-size: .92em;
  color: var(--ink-2);
}
.agenda-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  white-space: nowrap;
}
.tag-arrival { background: var(--accent-soft); color: var(--accent-ink); }
.tag-welcome { background: #e6f1ec; color: #1e6a45; }
.tag-rounds  { background: #fdeee7; color: #b04a1c; }
.tag-mingle  { background: #f4efe2; color: #8a6a1e; }
.tag-close   { background: #eee9f5; color: #5b3f96; }

/* ── RSVP / signup ──────────────────────────────────────────────────── */
.reg-includes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 22px;
  margin-bottom: clamp(22px, 3vw, 34px);
}
.reg-includes li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-2);
  font-size: .96em;
}
.reg-includes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* countdown (hidden until the platform injects rsvpDeadline) */
.rsvp-countdown {
  margin-bottom: clamp(24px, 3.5vw, 40px);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 22px;
}
.rsvp-countdown-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 10px;
}
.rsvp-countdown-grid {
  display: flex;
  gap: 18px;
}
.count-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}
.count-box span {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.count-box small {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .8;
  margin-top: 4px;
}

/* conversation-goals picker (outside the form — no inputs) */
.goals-picker {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  margin-bottom: 24px;
}
.goals-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.goals-label .muted { font-weight: 400; font-size: .92em; }
.goals-chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.goal-chip {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.goal-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.goal-chip.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.goals-hint {
  margin-top: 12px;
  font-size: .86em;
  color: var(--ink-3);
}

/* form */
.rsvp-form {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow);
}
.rsvp-form-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 22px;
}
.form-group { min-width: 0; }
.form-group-wide { grid-column: 1 / -1; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.form-group .req { color: var(--accent); font-style: normal; }
.form-control {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--card);
}
.form-control::placeholder { color: var(--ink-3); opacity: .8; }
select.form-control { appearance: none; cursor: pointer; }
.form-control-narrow { max-width: 140px; }
.form-helper {
  margin-top: 6px;
  font-size: .85em;
  color: var(--ink-3);
}

/* validation errors — filled by the platform's rsvp_user.js */
.error {
  display: block;
  margin-top: 5px;
  font-size: .85em;
  font-weight: 500;
  color: var(--danger);
}
.error:empty { display: none; }

/* attending = no → soften the fields that only matter if attending */
.rsvp-form.not-attending .party-size,
.rsvp-form.not-attending .form-group:has(#meal_preference) {
  opacity: .45;
  filter: grayscale(.4);
  transition: opacity .25s ease, filter .25s ease;
}

/* submit + loading */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 15px/1.2 var(--font-sans);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 14px 26px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-block { width: 100%; }

#rsvp-form .loading,
.loading-guestbook {
  text-align: center;
  font-size: .9em;
  font-weight: 500;
  color: var(--ink-3);
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
#rsvp-form .loading::before,
.loading-guestbook::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.rsvp-footnote { border-top-color: var(--line); }

/* thank-you / RSVP-closed states injected by the platform */
.thank-you-message h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
}
.thank-you-message p { color: var(--ink-2); margin-top: 6px; }

/* ── Guest book ─────────────────────────────────────────────────────── */
.guestbook-hint {
  font-size: .92em;
  color: var(--ink-3);
  margin-bottom: 22px;
  padding: 12px 16px;
  background: var(--paper-2);
  border-radius: var(--radius-sm);
}

/* the platform replaces .guestbook-body with its live form + list;
   style its markup so it inherits the family look */
.guestbook-body .form-group { margin-bottom: 16px; }
.guestbook-body #guestbookForm { max-width: 640px; }
#guestbookForm button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 15px/1.2 var(--font-sans);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 26px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background .18s ease, transform .18s ease;
}
#guestbookForm button[type="submit"]:hover { background: var(--accent-deep); transform: translateY(-1px); }
#guestbookForm .ph-send { display: none; } /* icon font not bundled */

.guestbook-wrap { margin-top: 26px; }
.guestbook-entry {
  border-top: 1px solid var(--line-soft);
  padding: 14px 0;
}
.guestbook-entry h5 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.guestbook-entry p { font-size: .95em; color: var(--ink-2); margin-top: 4px; }
.guestbook-entry small { font-size: .82em; color: var(--ink-3); }
/* injected list container: give the bare border-top a family hairline colour
   (the inline style from the platform only sets `border-top:1px solid`). */
.guestbook-body #comments-container { border-top-color: var(--line-soft); padding-top: 6px; }
/* injected "Load More" button — matches the .btn-outline family so it never
   renders as a default browser button. */
.guestbook-body .more-guestbook-wrap { margin-top: 26px; text-align: center; }
.guestbook-body #load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 15px/1.2 var(--font-sans);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 26px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.guestbook-body #load-more:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }

/* ── Moments / photo gallery (optional photo feature) ──────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.4vw, 24px);
}
.photo-card { margin: 0; }
.photo-open {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.photo-open .photo-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3; /* any photo crops neatly into the tile */
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.photo-open:hover .photo-img {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 24px 52px -24px rgba(27, 30, 35, .4);
}
.photo-open:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.photo-card figcaption {
  margin-top: 9px;
  font-size: .9em;
  color: var(--ink-2);
}
.gallery-hint {
  margin-top: 18px;
  font-size: .88em;
  color: var(--ink-3);
}

/* photo lightbox (used by the gallery) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 30, 35, .92);
  padding: clamp(16px, 4vw, 48px);
}
.lightbox-backdrop { position: absolute; inset: 0; }
.lightbox-figure {
  position: relative;
  max-width: min(920px, 92vw);
  margin: 0;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 82dvh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .65);
  background: var(--card);
}
.lightbox-cap {
  margin-top: 12px;
  text-align: center;
  font-size: .95em;
  color: var(--paper);
}
.lightbox-count {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: rgba(246, 244, 238, .75);
  font-variant-numeric: tabular-nums;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(246, 244, 238, .35);
  background: rgba(27, 30, 35, .55);
  color: var(--paper);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.lightbox-nav:disabled { opacity: .35; cursor: default; }
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* ── Poster / official flyer (optional photo feature) ──────────────── */
.poster-open {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.poster-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.poster-open:hover .poster-img {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 24px 52px -24px rgba(27, 30, 35, .4);
}
.poster-open:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ── Free page (optional, repeatable free blocks) ───────────────────
   A host-written page: each block = title + free text + optional photo.
   The platform clones .free-block per block the host writes; when the
   host has added no blocks (or toggles the Free Page section off) the
   whole .panel-free section is removed and its nav label disappears
   with it. The .free-media figure collapses when it has no photo, so a
   text-only block renders cleanly. Photos open full size in the
   lightbox (main.js). */
.free-blocks {
  display: grid;
  gap: clamp(18px, 3vw, 30px);
}
.free-block {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 36px);
  box-shadow: var(--shadow);
}
.free-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.01em;
  color: var(--ink);
}
.free-title:focus { outline: none; }
.free-media { margin-top: 18px; }
.free-media:empty { display: none; } /* text-only block: no photo, no gap */
.free-media img {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}
.free-media img:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 24px 52px -24px rgba(27, 30, 35, .4);
}
.free-media img:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.free-content {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 1.02em;
  line-height: 1.7;
  max-width: 72ch;
}

/* ── Video (optional feature — panel hidden until a URL is set) ────── */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow);
}
.video-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  background: linear-gradient(160deg, #163bb0 0%, #1e4fe0 55%, #4d6fe8 100%);
  transition: filter .18s ease;
}
.video-play:hover { filter: brightness(1.08); }
.video-play-icon {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .45);
  transition: transform .22s ease;
}
.video-play:hover .video-play-icon { transform: scale(1.06); }
.video-play-icon::after {
  content: "";
  border-left: 22px solid var(--accent);
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  margin-left: 5px;
}
.video-play-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  text-shadow: 0 2px 8px rgba(27, 30, 35, .35);
}
.video-embed.is-playing .video-play { display: none; }
.video-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 40px);
  text-align: center;
  font-size: .95em;
  color: var(--paper);
  background: var(--ink);
}
.video-error code { color: var(--paper-2); }

/* printed invitations can't play film — say so instead of a blank box */
.print-only { display: none; }

/* ── Lightbox ───────────────────────────────────────────────────────── */
.lightbox-count.is-hidden { display: none; }

/* ── Details ────────────────────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2.4vw, 26px);
}
.detail-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.detail-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.detail-card p { font-size: .95em; color: var(--ink-2); }
.detail-card p + p { margin-top: 8px; }
.detail-card .venue-address { color: var(--ink); font-weight: 500; }

/* footer */
.shell-footer {
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
/* footer brand placeholder — bind the template's brand text here */
.footer-brand {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .01em;
  color: var(--ink);
}
.shell-footer p { font-size: .9em; color: var(--ink-3); }
.shell-footer .organizer-name { font-weight: 600; color: var(--ink); }

/* ── Powered-by brand line (full-width footer strip) ─────────────────
   A slim brand strip under the navigation bar. The engine swaps the
   literal "Kundangi" token inside .link-footer for the platform name at
   render; the cockpit's Free Powered By field can override the whole
   line. Stays visible even when the free page is hidden. */
.powered-by {
  flex: 0 0 auto;
  width: 100%;
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink-3);
  background: var(--card);
  border-top: 1px solid var(--line-soft);
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
}
.powered-by .link-footer {
  font-weight: 600;
  color: var(--accent-deep);
}

/* ── Panel navigation: text labels, horizontally scrollable ──────────
   Every section has a visible name (no anonymous dots). On small screens
   the label strip scrolls sideways between the prev/next buttons; the
   active label is kept in view by main.js. */
.shell-nav {
  flex: 0 0 auto;
  height: var(--navbar-h);
  background: var(--card);
  border-top: 1px solid var(--line-soft);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 20;
}
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, color .18s ease, border-color .18s ease, opacity .18s ease;
}
.nav-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav-btn:disabled { opacity: .3; cursor: default; }
.nav-prev { left: max(14px, env(safe-area-inset-left)); }
.nav-next { right: max(14px, env(safe-area-inset-right)); }

.nav-labels {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 64px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none; /* Firefox */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  height: 100%;
}
.nav-labels::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.nav-label {
  flex: 0 0 auto;
  scroll-snap-align: center;
  font: 600 12.5px/1 var(--font-sans);
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 9px 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-label:hover { border-color: var(--accent); color: var(--accent-deep); }
.nav-label.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.04);
}

/* ── Responsive tweaks ──────────────────────────────────────────────── */
@media (max-width: 820px) {
  .cover-meta { grid-template-columns: 1fr; gap: 14px; }
  .value-grid { grid-template-columns: 1fr; }
  .reg-includes { grid-template-columns: 1fr; }
  .rsvp-form-display { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .agenda-row { grid-template-columns: 74px 1fr; }
  .agenda-tag { grid-column: 2; justify-self: start; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .nav-labels { padding: 0 56px; gap: 6px; }
  .nav-label { font-size: 12px; padding: 8px 13px; }
  .brand-edition { display: none; }
  .topbar-cta { font-size: 12px; padding: 8px 12px; }
  .cover-photo-btn .cover-zoom-label { display: none; } /* icon-only pill on tiny screens */
  .cover-photo-btn { padding: 11px; }
}

@media (max-width: 480px) {
  .photo-grid { grid-template-columns: 1fr; }
  .topbar-progress { display: none; }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  html.shell-on .panels { transition: none; }
  .skip-link { transition: none; }
}

/* ── Print: every panel becomes its own page, chrome suppressed ─────── */
@media print {
  html.shell-on .shell { height: auto; overflow: visible; display: block; }
  html.shell-on .panels { transform: none !important; display: block; }
  html.shell-on .panel { height: auto !important; overflow: visible !important; page-break-after: always; }
  html:not(.shell-on) .panel { page-break-after: always; }
  .panel-inner { max-width: none; padding: 24px; }
  .shell-topbar, .shell-nav, .skip-link, .powered-by { display: none !important; }
  .cover-photo, .lightbox, .video-embed { display: none !important; }
  .print-only { display: block; margin-top: 12px; font-size: .9em; color: var(--ink-3); }
  body { background: #fff; }
  .panel { background: #fff !important; }
  .btn { border: 1px solid #999; box-shadow: none; }
  .btn-primary, .goal-chip.is-selected, .rsvp-countdown { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; }
}
