/* Legacy — signature memorial template */
.gbc-legacy {
  --legacy-ivory: #f7f3eb;
  --legacy-cream: #faf6f0;
  --legacy-sage: #6e8f72;
  --legacy-forest: #4e7051;
  --legacy-beige: #e8dfd0;
  --legacy-gold: #c4a574;
  --legacy-charcoal: #2a3530;
  --legacy-muted: #5c6b64;
  --legacy-accent: var(--legacy-sage);
  --legacy-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --legacy-sans: 'Outfit', 'Segoe UI', sans-serif;
  margin: 0;
  background: var(--legacy-ivory);
  color: var(--legacy-charcoal);
  font-family: var(--legacy-sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.gbc-legacy h1, .gbc-legacy h2, .gbc-legacy h3 {
  font-family: var(--legacy-serif);
  font-weight: 500;
  line-height: 1.15;
  color: #2f4f4f;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

.legacy-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.legacy-section {
  padding: clamp(64px, 9vw, 110px) 0;
}

.legacy-section--alt {
  background: linear-gradient(180deg, rgba(238, 244, 239, 0.45), rgba(247, 243, 235, 0.2));
}

.legacy-section-head {
  text-align: center;
  max-width: 34rem;
  margin: 0 auto 48px;
}

.legacy-section-head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 18px;
}

.legacy-kicker, .legacy-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--legacy-forest);
  font-weight: 500;
  margin: 0 0 12px;
}

.legacy-center { text-align: center; }

/* Hero */
.legacy-hero {
  position: relative;
  isolation: isolate;
  min-height: min(92vh, 860px);
  display: grid;
  place-items: end center;
  padding: 80px 20px 72px;
  overflow: hidden;
  background: linear-gradient(160deg, #e8efe6, var(--legacy-ivory) 55%, #efe8dc);
}

.legacy-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.legacy-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.04);
  filter: saturate(0.92);
}

.legacy-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(36, 56, 48, 0.28) 0%, rgba(36, 56, 48, 0.45) 42%, rgba(247, 243, 235, 0.92) 100%),
    linear-gradient(90deg, rgba(36, 56, 48, 0.25), transparent 55%);
}

.legacy-hero--noimage .legacy-hero-overlay {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(196, 165, 116, 0.22), transparent 50%),
    linear-gradient(165deg, #dfe8df, var(--legacy-ivory) 50%, #ebe3d4);
}

.legacy-hero-content {
  width: min(760px, 100%);
  text-align: center;
  color: #243830;
}

.legacy-hero:not(.legacy-hero--noimage) .legacy-hero-content {
  color: #f7f3eb;
}

.legacy-hero:not(.legacy-hero--noimage) .legacy-eyebrow,
.legacy-hero:not(.legacy-hero--noimage) .legacy-dates,
.legacy-hero:not(.legacy-hero--noimage) .legacy-descriptor {
  color: rgba(247, 243, 235, 0.88);
}

.legacy-hero:not(.legacy-hero--noimage) h1 {
  color: #f7f3eb;
}

.legacy-hero-portrait {
  width: 112px;
  height: 112px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 3px solid rgba(255, 252, 247, 0.9);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  margin: 0 auto 18px;
  display: block;
}

.legacy-hero-portrait--solo {
  width: 140px;
  height: 140px;
  box-shadow: 0 16px 40px rgba(47, 79, 79, 0.18);
}

.legacy-hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.legacy-dates {
  font-size: clamp(1rem, 2vw, 1.15rem);
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  font-weight: 300;
}

.legacy-descriptor {
  font-family: var(--legacy-serif);
  font-style: italic;
  font-size: 1.2rem;
  margin: 0 0 22px;
  opacity: 0.92;
}

.legacy-hero-quote {
  margin: 0 auto;
  max-width: 34rem;
  border: 0;
  padding: 0;
}

.legacy-hero-quote p {
  font-family: var(--legacy-serif);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-style: italic;
  line-height: 1.45;
  margin: 0;
}

.legacy-animate {
  animation: legacy-rise 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes legacy-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.legacy-scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 28px;
  height: 42px;
  border: 1.5px solid rgba(47, 79, 79, 0.35);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  text-decoration: none;
}

.legacy-hero:not(.legacy-hero--noimage) .legacy-scroll {
  border-color: rgba(247, 243, 235, 0.55);
}

.legacy-scroll span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  color: #4e7051;
  animation: legacy-bounce 1.6s ease-in-out infinite;
}

.legacy-hero:not(.legacy-hero--noimage) .legacy-scroll span { color: #f7f3eb; }

@keyframes legacy-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* Nav */
.legacy-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(110, 143, 114, 0.14);
}

.legacy-nav-inner {
  width: min(1080px, calc(100% - 24px));
  margin: 0 auto;
  padding: 10px 0;
}

.legacy-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.legacy-nav-list a {
  display: inline-block;
  padding: 10px 14px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--legacy-muted);
  font-size: 0.9rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.legacy-nav-list a:hover,
.legacy-nav-list a:focus-visible,
.legacy-nav-list a.is-active {
  background: rgba(110, 143, 114, 0.12);
  color: var(--legacy-forest);
  outline: none;
}

.legacy-nav-select-wrap { display: none; }
.legacy-nav-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(110, 143, 114, 0.25);
  background: #fffcf7;
  font: inherit;
}

/* Story */
.legacy-story-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.legacy-story-copy h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 20px;
}

.legacy-pullquote {
  margin: 0 0 24px;
  padding: 0 0 0 18px;
  border-left: 3px solid var(--legacy-gold);
}

.legacy-pullquote p {
  font-family: var(--legacy-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-style: italic;
  line-height: 1.35;
  margin: 0;
  color: #2f4f4f;
}

.legacy-prose p {
  margin: 0 0 1.1em;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--legacy-charcoal);
}

.legacy-prose[data-collapsed="true"] .legacy-prose-more { display: none; }

.legacy-story-photo img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center top;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(47, 79, 79, 0.12);
}

.legacy-text-btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--legacy-forest);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legacy-text-btn:focus-visible {
  outline: 2px solid var(--legacy-sage);
  outline-offset: 3px;
}

/* Timeline */
.legacy-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  max-width: 860px;
  margin-inline: auto;
}

.legacy-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--legacy-sage), rgba(110, 143, 114, 0.15));
  transform: translateX(-50%);
}

.legacy-timeline-item {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 18px;
  margin-bottom: 28px;
  position: relative;
  align-items: start;
}

.legacy-timeline-marker {
  grid-column: 2;
  width: 14px;
  height: 14px;
  margin: 8px auto 0;
  border-radius: 50%;
  background: #fffcf7;
  border: 3px solid var(--legacy-accent);
  box-shadow: 0 0 0 4px rgba(110, 143, 114, 0.12);
}

.legacy-timeline-card {
  background: #fffcf7;
  border: 1px solid rgba(110, 143, 114, 0.12);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 12px 36px rgba(47, 79, 79, 0.06);
}

.legacy-timeline-item:not(.is-alt) .legacy-timeline-card { grid-column: 1; text-align: right; }
.legacy-timeline-item.is-alt .legacy-timeline-card { grid-column: 3; text-align: left; }

.legacy-timeline-year {
  display: inline-block;
  font-family: var(--legacy-serif);
  font-size: 1.35rem;
  color: var(--legacy-forest);
  margin-bottom: 6px;
}

.legacy-timeline-card h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.legacy-timeline-card p {
  margin: 0;
  font-weight: 300;
  color: var(--legacy-muted);
}

.legacy-timeline-card img {
  margin-top: 12px;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

/* Memorial stats */
.legacy-stats {
  background: rgba(255, 252, 247, 0.92);
  border-bottom: 1px solid rgba(110, 143, 114, 0.12);
}
.legacy-stats-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 36px;
  padding: 18px 0;
}
.legacy-stat {
  text-align: center;
  min-width: 72px;
}
.legacy-stat strong {
  display: block;
  font-family: var(--legacy-serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--legacy-charcoal);
  line-height: 1.1;
}
.legacy-stat span {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--legacy-muted);
}

/* Photo carousel (replaces static masonry for Legacy) */
.legacy-carousel {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}
.legacy-carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--legacy-beige);
  aspect-ratio: 16 / 10;
  min-height: 280px;
}
.legacy-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.legacy-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s ease, visibility 1.1s ease;
  display: flex;
  flex-direction: column;
}
.legacy-carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}
.legacy-carousel-open {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  border-radius: 16px;
  display: block;
}
.legacy-carousel-open:focus-visible {
  outline: 3px solid var(--legacy-sage);
  outline-offset: 2px;
}
.legacy-carousel-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.legacy-carousel-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 18px 16px;
  background: linear-gradient(transparent, rgba(36, 56, 48, 0.72));
  color: #f7f3eb;
  text-align: left;
}
.legacy-carousel-cap-text {
  display: block;
  font-family: var(--legacy-serif);
  font-size: 1.1rem;
}
.legacy-carousel-cap-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  opacity: 0.88;
}
.legacy-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}
.legacy-carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(110, 143, 114, 0.28);
  background: #fffcf7;
  color: var(--legacy-forest);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.legacy-carousel-btn:hover,
.legacy-carousel-btn:focus-visible {
  background: rgba(110, 143, 114, 0.12);
  border-color: var(--legacy-sage);
  outline: none;
}
.legacy-carousel-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(110, 143, 114, 0.28);
}
.legacy-carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 60%;
}
.legacy-carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(110, 143, 114, 0.28);
  cursor: pointer;
}
.legacy-carousel-dot.is-active {
  background: var(--legacy-forest);
  transform: scale(1.15);
}
.legacy-carousel-dot:focus-visible {
  outline: 2px solid var(--legacy-sage);
  outline-offset: 2px;
}

/* Keep old gallery utilities for lightbox targeting */
.legacy-gallery-item {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--legacy-beige);
}

/* Videos */
.legacy-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.legacy-video-card {
  border: 1px solid rgba(110, 143, 114, 0.14);
  background: #fffcf7;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  padding: 0;
  font: inherit;
  box-shadow: 0 10px 30px rgba(47, 79, 79, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.legacy-video-card.is-featured {
  border-color: rgba(110, 143, 114, 0.4);
  box-shadow: 0 14px 36px rgba(47, 79, 79, 0.1);
}

.legacy-video-card:hover,
.legacy-video-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(47, 79, 79, 0.1);
  outline: none;
}

.legacy-video-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16/10;
  background:
    radial-gradient(circle at 30% 30%, rgba(196, 165, 116, 0.35), transparent 45%),
    linear-gradient(145deg, #3d5a45, #243830);
}

.legacy-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 252, 247, 0.92);
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.legacy-play::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 18px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #2f4f4f;
}

.legacy-video-meta {
  display: grid;
  gap: 4px;
  padding: 14px 16px 16px;
}

.legacy-video-meta small { color: var(--legacy-muted); }

/* Memories */
.legacy-memory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.legacy-memory-card {
  background: #fffcf7;
  border: 1px solid rgba(110, 143, 114, 0.12);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 36px rgba(47, 79, 79, 0.05);
}

.legacy-memory-card.is-featured {
  grid-column: 1 / -1;
  background: linear-gradient(165deg, #fffcf7, #eef4ef);
  border-color: rgba(110, 143, 114, 0.22);
}

.legacy-memory-card.is-hidden { display: none; }

.legacy-memory-text {
  font-family: var(--legacy-serif);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.45;
  margin: 0 0 16px;
  color: #2f4f4f;
}

.legacy-memory-card footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--legacy-muted);
}

.legacy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--legacy-accent);
  color: #fff !important;
  text-decoration: none;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(110, 143, 114, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}

.legacy-btn:hover { transform: translateY(-2px); background: var(--legacy-forest); }
.legacy-btn:focus-visible { outline: 3px solid rgba(110, 143, 114, 0.45); outline-offset: 2px; }

.legacy-btn--ghost {
  background: transparent;
  color: var(--legacy-forest) !important;
  border-color: rgba(110, 143, 114, 0.4);
  box-shadow: none;
}

.legacy-section-head .legacy-btn { margin-top: 8px; }

.legacy-share-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.legacy-empty-note {
  text-align: center;
  color: var(--legacy-muted);
  font-weight: 300;
}

/* Essence / family / service */
.legacy-essence-grid,
.legacy-family-grid,
.legacy-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.legacy-essence-card,
.legacy-family-card,
.legacy-service-card {
  background: #fffcf7;
  border: 1px solid rgba(110, 143, 114, 0.12);
  border-radius: 16px;
  padding: 20px;
}

.legacy-essence-card h3,
.legacy-family-card h3,
.legacy-service-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.legacy-essence-card p,
.legacy-family-card p,
.legacy-service-card p {
  margin: 0;
  font-weight: 300;
  color: var(--legacy-muted);
}

.legacy-family-role {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--legacy-gold);
  margin-bottom: 6px;
}

.legacy-family-note {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 28px;
  font-family: var(--legacy-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: #2f4f4f;
}

/* Guestbook */
.legacy-guestbook {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

.legacy-guest-entry {
  background: #fffcf7;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(110, 143, 114, 0.1);
}

.legacy-guest-entry p { margin: 0 0 10px; font-weight: 300; }
.legacy-guest-entry footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--legacy-muted);
}

/* Keep / QR */
.legacy-keep {
  display: grid;
  grid-template-columns: 1.3fr auto;
  gap: 36px;
  align-items: center;
}

.legacy-keep h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin: 0 0 12px;
}

.legacy-keep-copy {
  color: var(--legacy-muted);
  font-weight: 300;
  max-width: 36rem;
}

.legacy-keep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 14px;
}

.legacy-link-display {
  font-size: 0.92rem;
  word-break: break-all;
}

.legacy-link-display a { color: var(--legacy-forest); }

.legacy-copy-status {
  display: inline-block;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--legacy-forest);
}

.legacy-qr-card {
  background: #fffcf7;
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(110, 143, 114, 0.14);
  box-shadow: 0 16px 40px rgba(47, 79, 79, 0.08);
}

.legacy-qr-card img {
  display: block;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: #fff;
}

.legacy-qr-card p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--legacy-muted);
}

/* Closing */
.legacy-closing {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: clamp(80px, 12vw, 130px) 20px;
  color: #f7f3eb;
  background: #243830;
  overflow: hidden;
}

.legacy-closing-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(160deg, rgba(36, 56, 48, 0.88), rgba(36, 56, 48, 0.94)),
    var(--closing-image) center / cover no-repeat;
  filter: saturate(0.85);
}

.legacy-closing-mark {
  font-family: var(--legacy-serif);
  font-style: italic;
  font-size: 1.35rem;
  margin: 0 0 10px;
  color: var(--legacy-gold);
}

.legacy-closing h2 {
  color: #f7f3eb;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 16px;
}

.legacy-closing p {
  max-width: 28rem;
  margin: 0 auto 28px;
  font-weight: 300;
  color: rgba(247, 243, 235, 0.88);
}

.legacy-closing-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.legacy-closing .legacy-btn--ghost {
  color: #f7f3eb !important;
  border-color: rgba(247, 243, 235, 0.4);
}

.legacy-attribution {
  font-size: 0.85rem !important;
  opacity: 0.75;
  margin: 0 !important;
}

.legacy-attribution a { color: #f7f3eb; }

/* Lightbox / modal */
.legacy-lightbox,
.legacy-video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.legacy-lightbox[hidden],
.legacy-video-modal[hidden] { display: none !important; }

.legacy-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 34, 30, 0.82);
}

.legacy-lightbox-dialog,
.legacy-video-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 90vh;
}

.legacy-lightbox-dialog figure {
  margin: 0;
  text-align: center;
}

.legacy-lightbox-dialog img,
.legacy-video-dialog video {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 12px;
  background: #111;
}

.legacy-lightbox-dialog figcaption,
.legacy-video-dialog p {
  color: #f7f3eb;
  margin-top: 12px;
  text-align: center;
}

.legacy-lightbox-close,
.legacy-lightbox-prev,
.legacy-lightbox-next {
  position: absolute;
  border: 0;
  background: rgba(255, 252, 247, 0.92);
  color: #243830;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.legacy-lightbox-close { top: -8px; right: -8px; }
.legacy-lightbox-prev { left: -8px; top: 50%; transform: translateY(-50%); }
.legacy-lightbox-next { right: -8px; top: 50%; transform: translateY(-50%); }

.legacy-lightbox-close:focus-visible,
.legacy-lightbox-prev:focus-visible,
.legacy-lightbox-next:focus-visible {
  outline: 3px solid var(--legacy-gold);
}

/* Preview banner tweak */
.gbc-legacy .preview-banner {
  background: #fff4d6;
  color: #856404;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Responsive */
@media (max-width: 900px) {
  .legacy-story-grid,
  .legacy-keep {
    grid-template-columns: 1fr;
  }

  .legacy-timeline::before { left: 14px; }
  .legacy-timeline-item {
    grid-template-columns: 28px 1fr;
  }
  .legacy-timeline-marker { grid-column: 1; margin-left: 7px; }
  .legacy-timeline-item:not(.is-alt) .legacy-timeline-card,
  .legacy-timeline-item.is-alt .legacy-timeline-card {
    grid-column: 2;
    text-align: left;
  }

  .legacy-memory-grid { grid-template-columns: 1fr; }

  .legacy-nav-list { display: none; }
  .legacy-nav-select-wrap { display: block; }
}

@media (max-width: 560px) {
  .legacy-hero { min-height: 78vh; padding-bottom: 64px; }
  .legacy-carousel-viewport { aspect-ratio: 4 / 5; min-height: 240px; }
  .legacy-lightbox-prev { left: 4px; }
  .legacy-lightbox-next { right: 4px; }
  .legacy-stats-inner { gap: 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-animate,
  .legacy-scroll span,
  .legacy-gallery-item img,
  .legacy-carousel-slide,
  .legacy-btn,
  .legacy-video-card {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

html { scroll-behavior: smooth; }

/* Timeline extras */
.legacy-timeline-meta {
  font-size: 0.88rem;
  color: var(--legacy-muted);
  margin: 6px 0 0;
}
.legacy-timeline-extra {
  margin-top: 10px;
}
.legacy-timeline-extra img,
.legacy-timeline-extra video {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
}

/* Related memorials */
.legacy-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.legacy-related-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px;
  border-radius: 14px;
  background: #fffcf7;
  border: 1px solid rgba(110, 143, 114, 0.14);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.legacy-related-card:hover,
.legacy-related-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(47, 79, 79, 0.08);
  outline: none;
}
.legacy-related-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
.legacy-related-role {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--legacy-forest);
}
.legacy-related-card strong {
  font-family: var(--legacy-serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.legacy-memory-title {
  font-family: var(--legacy-serif);
  font-size: 1.15rem;
  margin: 0 0 8px;
  color: var(--legacy-charcoal);
}
.legacy-lightbox-meta {
  margin-top: 8px;
  font-size: 0.88rem;
  color: rgba(247, 243, 235, 0.78);
  text-align: center;
  max-width: 640px;
}
.legacy-video-desc {
  color: rgba(247, 243, 235, 0.75);
  font-size: 0.9rem;
  text-align: center;
  margin: 0 0 8px;
}
.legacy-audio-future[hidden],
.legacy-qr-downloads[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
