/* ==========================================================================
   Eternal Timekeeper: public memorial page
   Load AFTER wizard.css (it reuses the tokens, .etk-wizard base, buttons and fields).
   Breakpoint: 760px (phone layout below).
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
.mem-skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--etk-surface); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.mem-skip:focus { top: 12px; }
#mem-main:focus { outline: none; }

/* Header */
.mem-header { max-width: 1280px; margin: 0 auto; padding: 20px 40px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.mem-header img { height: 56px; width: auto; display: block; }
.mem-header nav { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; font-size: 15px; }
.etk-wizard .mem-header nav a { color: var(--etk-charcoal); text-decoration: none; }
.etk-wizard .mem-header nav a:hover { color: var(--etk-gold-text); }
.etk-wizard .mem-header .mem-edit { color: var(--etk-gold-text); font-weight: 600; border: 2px solid var(--etk-gold-button); border-radius: 999px; padding: 9px 18px; display: inline-flex; gap: 8px; align-items: center; }
.mem-header__phone { display: none; gap: 8px; }
.etk-wizard .mem-header__icon { background: var(--etk-secondary); border: 0; color: var(--etk-charcoal); }
.mem-flash { max-width: 1200px; margin: 0 auto 16px; padding: 0 40px; display: flex; flex-direction: column; gap: 8px; }
.mem-flash:empty { display: none; }

/* Hero */
.mem-cover { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.mem-cover__img { height: 300px; border-radius: 20px; overflow: hidden; background: var(--etk-champagne); }
.mem-cover__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mem-cover__img--tile { background-repeat: repeat; background-size: auto; }
.mem-hero { max-width: 900px; margin: -96px auto 0; padding: 0 40px; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.mem-hero--no-cover { margin-top: 24px; }
.mem-portrait { width: 184px; height: 184px; border-radius: 50%; object-fit: cover; border: 6px solid var(--etk-cream); box-shadow: 0 6px 24px rgba(45,45,45,.15); background: var(--etk-muted); }
.mem-portrait--initials { display: flex; align-items: center; justify-content: center; font-family: var(--etk-font-heading); font-size: 64px; color: var(--etk-gold-text); background: var(--etk-champagne); }
.mem-kicker { font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--etk-gold-text); margin-top: 6px; }
.mem-hero h1 { font-size: 56px; line-height: 1.1; overflow-wrap: anywhere; }
.mem-dates { font-family: var(--etk-font-heading); font-size: 22px; }
.mem-dates__sep { color: var(--etk-gold); padding: 0 8px; }
.mem-facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; font-size: 15px; color: var(--etk-muted-fg); }
.mem-facts li { display: inline-flex; align-items: center; gap: 8px; }
.mem-facts svg { color: var(--etk-gold); flex: none; }
.mem-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.mem-actions .etk-btn--secondary { padding-left: 26px; padding-right: 26px; }

/* Social / web links: their own centered row of pills that wraps neatly */
.mem-socials { list-style: none; margin: 4px 0 0; padding: 0; max-width: 680px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.etk-wizard .mem-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 999px; color: var(--etk-gold-text); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.etk-wizard .mem-pill:hover { border-color: var(--etk-gold-button); }

/* Desktop share popup (phones use the native share sheet) */
.mem-share { position: relative; }
.mem-share-btn { min-height: 52px; padding-left: 22px; padding-right: 22px; cursor: pointer; border: 0; }
.mem-share__menu { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; width: 300px; background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 16px; box-shadow: 0 12px 32px rgba(45,45,45,.14); padding: 10px; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.mem-share__head { padding: 8px 14px 10px; display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--etk-secondary); margin-bottom: 4px; }
.mem-share__title { font-family: var(--etk-font-heading); font-size: 18px; }
.mem-share__url { font-size: 13px; color: var(--etk-muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etk-wizard .mem-share__item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 10px; color: var(--etk-charcoal); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; background: transparent; border: 0; cursor: pointer; text-align: left; }
.etk-wizard .mem-share__item:hover, .etk-wizard .mem-share__item:focus-visible { background: var(--etk-champagne); }

/* Sticky in-page navigation */
.mem-nav { position: sticky; top: 0; z-index: 5; margin-top: 48px; background: rgba(248,245,241,.96); border-top: 1px solid var(--etk-muted); border-bottom: 1px solid var(--etk-muted); }
.mem-nav__inner { max-width: 1280px; margin: 0 auto; padding: 0 40px; display: flex; justify-content: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.mem-nav__inner::-webkit-scrollbar { display: none; }
.etk-wizard .mem-nav a { flex: none; padding: 16px; font-size: 15px; font-weight: 600; color: var(--etk-charcoal); text-decoration: none; border-bottom: 3px solid transparent; }
.etk-wizard .mem-nav a[aria-current="true"] { color: var(--etk-gold-text); border-bottom-color: var(--etk-gold-button); }
.mem-nav-spacer { height: 32px; }
.mem-section { scroll-margin-top: 64px; }

/* Section heading */
.mem-heading { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 32px; text-align: center; }
.mem-heading h2 { font-size: 40px; }
.mem-heading p { color: var(--etk-muted-fg); font-size: 16px; line-height: 1.6; }
.mem-family .mem-heading h2, .mem-media .mem-heading h2, .mem-tributes .mem-heading h2 { font-size: 36px; }

/* Life story: left-aligned, readable measure */
.mem-story { max-width: 720px; margin: 0 auto; padding: 72px 40px 24px; }
.mem-story .mem-heading { margin-bottom: 36px; }
.mem-story__body { position: relative; font-size: 18px; line-height: 1.8; overflow-wrap: break-word; }
.etk-wizard .mem-story__body > * + * { margin-top: 20px; }   /* prefixed to beat `.etk-wizard p { margin: 0 }` */
.mem-story__body > p:first-child { font-family: var(--etk-font-heading); font-size: 23px; line-height: 1.6; }
.mem-story__body h2, .mem-story__body h3 { font-size: 26px; }
.etk-wizard .mem-story__body > h2:not(:first-child) { margin-top: 36px; }
.mem-story__body ul, .mem-story__body ol { padding-left: 1.4em; margin-bottom: 0; }
.mem-story.is-collapsed .mem-story__body { max-height: 820px; overflow: hidden; }
.mem-story.is-collapsed .mem-story__body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(rgba(248,245,241,0), var(--etk-cream)); }
.mem-story__toggle { display: flex; justify-content: center; margin-top: 24px; }
.mem-story__toggle .etk-btn { min-height: 48px; padding: 0 24px; font-size: 15px; }

/* Family */
.mem-family { max-width: 960px; margin: 0 auto; padding: 64px 40px; }
.mem-family ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.mem-family li { flex: 0 1 260px; background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 16px; padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; text-align: center; min-width: 0; }
.mem-family__name { font-family: var(--etk-font-heading); font-size: 20px; overflow-wrap: anywhere; }
.mem-family__rel { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--etk-gold-text); }

/* Photos */
.mem-photos { background: var(--etk-champagne); padding: 72px 40px; }
.mem-photos__inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.mem-photos__head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.mem-photos__head h2 { font-size: 36px; }
.mem-slideshow-btn { min-height: 48px; padding: 0 24px; font-size: 15px; }
.mem-photos .etk-tabs { border-bottom-color: var(--etk-chip-border); margin-bottom: -8px; }
.mem-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mem-grid button { padding: 0; border: 0; background: var(--etk-muted); border-radius: 14px; overflow: hidden; aspect-ratio: 1 / 1; cursor: zoom-in; display: block; width: 100%; }
.mem-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.mem-grid button:hover img { transform: scale(1.03); }

/* Music / video */
.mem-media { max-width: 960px; margin: 0 auto; padding: 72px 40px 32px; }
.mem-media iframe { width: 100%; border: 0; border-radius: 16px; display: block; }
.mem-music .mem-heading { gap: 6px; margin-bottom: 28px; }
.mem-spotify { margin-bottom: 12px; background: var(--etk-charcoal); }
.mem-videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.mem-videos--one { max-width: 760px; margin: 0 auto; grid-template-columns: 1fr; }
.mem-video { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #2A2F3A; }
.mem-video iframe { width: 100%; height: 100%; border-radius: 0; }
.mem-video-title { font-size: 15px; font-weight: 600; margin-top: 8px; }

/* Resting place */
.mem-place { max-width: 1120px; margin: 0 auto; padding: 72px 40px; }
.mem-place__card { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 20px; overflow: hidden; display: flex; flex-wrap: wrap; }
.mem-place__text { flex: 1 1 340px; min-width: 0; padding: 40px; display: flex; flex-direction: column; gap: 16px; }
.mem-place__text h2 { font-size: 36px; }
.mem-place__map { flex: 1.4 1 420px; min-height: 380px; background: var(--etk-secondary); position: relative; }
.mem-place__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.mem-place__map--none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(90deg, transparent 21%, #fff 21%, #fff 22%, transparent 22%, transparent 81%, #fff 81%, #fff 82.5%, transparent 82.5%), linear-gradient(0deg, transparent 29%, #fff 29%, #fff 31.5%, transparent 31.5%), #EAE6E0; font-weight: 600; }
.mem-place__map-pin { width: 72px; height: 72px; border-radius: 50%; background: var(--etk-surface); color: var(--etk-gold-button); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(45,45,45,.12); }
.mem-place__map--none a { background: var(--etk-surface); padding: 8px 16px; border-radius: 999px; text-decoration: none; font-size: 15px; }
.mem-place__badge { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--etk-success); }
.mem-place__badge svg { flex: none; }
.mem-place__badge--cemetery { color: var(--etk-muted-fg); }
.mem-place__name { display: flex; flex-direction: column; gap: 2px; line-height: 1.55; overflow-wrap: anywhere; }
.mem-place__name strong { font-family: var(--etk-font-heading); font-weight: 500; font-size: 20px; }
.mem-place__name span { font-size: 16px; color: var(--etk-muted-fg); }
.mem-place__details { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; line-height: 1.5; background: var(--etk-cream-light); border-radius: 12px; padding: 14px 16px; }
.mem-place__details dt { color: var(--etk-muted-fg); }
.mem-place__details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mem-place__details dd.is-strong { font-weight: 600; }
.mem-place__explain { font-size: 15px; line-height: 1.6; color: var(--etk-muted-fg); }
.mem-place__actions { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 6px; }
.mem-place__actions .etk-btn--primary { padding: 0 26px; }
.mem-place__copy { padding: 0 12px; cursor: pointer; border: 0; font-size: 16px; }
.mem-only-phone { display: none; }

/* Owner-only nudges */
.mem-owner-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--etk-gold-text); }
.mem-owner-strip { margin-top: 14px; background: var(--etk-champagne); border: 1px solid #E8D5BE; border-radius: 14px; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; font-size: 15px; }
.mem-owner-strip__text { display: flex; flex-direction: column; gap: 2px; line-height: 1.5; }
.mem-owner-strip .etk-btn { min-height: 44px; padding: 0 20px; }
.mem-owner-empty { border: 2px dashed var(--etk-dashed); background: var(--etk-cream-light); border-radius: 20px; padding: 36px 40px; display: flex; flex-wrap: wrap; gap: 20px 18px; align-items: center; }
.mem-owner-empty__icon { flex: none; align-self: flex-start; width: 52px; height: 52px; border-radius: 50%; background: var(--etk-champagne); color: var(--etk-gold-button); display: flex; align-items: center; justify-content: center; }
.mem-owner-empty__text { flex: 1 1 380px; display: flex; flex-direction: column; gap: 6px; }
.mem-owner-empty__text h2 { font-size: 24px; }
.mem-owner-empty__text p { color: var(--etk-muted-fg); font-size: 15px; line-height: 1.6; }
.mem-owner-empty > .etk-btn { margin-left: auto; }

/* Tributes */
.mem-tributes { max-width: 760px; margin: 0 auto; padding: 24px 40px 80px; }
.mem-tributes .mem-heading { margin-bottom: 28px; }
.mem-tribute-flash { margin-bottom: 16px; }
.mem-tribute-form { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.mem-tribute-form .etk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mem-tribute-form .etk-textarea { line-height: 1.6; resize: vertical; min-height: 140px; }
.mem-tribute-form .etk-field.has-error .etk-textarea { border: 2px solid var(--etk-required); }
.mem-tribute-form__foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.mem-tribute-form__photo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mem-photo-label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--etk-gold-text); font-weight: 600; cursor: pointer; border-radius: 8px; }
.mem-photo-label svg { flex: none; }
.mem-photo-label [data-photo-name] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.mem-tribute-form__photo input:focus-visible + .mem-photo-label { box-shadow: var(--etk-focus); }
.mem-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mem-tribute-list { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.mem-tribute { background: var(--etk-surface); border: 1px solid var(--etk-muted); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.mem-tribute__text { font-family: var(--etk-font-heading); font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
.mem-tribute__by { font-size: 14px; color: var(--etk-muted-fg); }
.mem-tribute__by strong { color: var(--etk-charcoal); font-weight: 600; }
.mem-tribute__photo { padding: 0; border: 0; background: var(--etk-secondary); border-radius: 12px; overflow: hidden; cursor: zoom-in; align-self: flex-start; max-width: 100%; }
.mem-tribute__photo img { display: block; max-width: 100%; max-height: 320px; width: auto; height: auto; }
.mem-empty { margin-top: 24px; text-align: center; font-family: var(--etk-font-heading); font-style: italic; font-size: 18px; color: var(--etk-muted-fg); }

/* Create-a-memorial band */
.mem-cta { background: var(--etk-charcoal); color: var(--etk-cream); padding: 64px 40px; }
.mem-cta__inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.mem-cta h2 { font-size: 32px; }
.mem-cta p { font-size: 16px; line-height: 1.6; opacity: .85; }
/* Charcoal on brand gold #C4781C is ~4:1, which passes WCAG only as LARGE text (>=18.66px bold). Keep 19px bold. */
.etk-wizard .mem-cta .etk-btn { background: var(--etk-gold); color: var(--etk-charcoal); font-size: 19px; margin-top: 6px; padding: 0 30px; }
.etk-wizard .mem-cta .etk-btn:hover { background: #D58A2E; color: var(--etk-charcoal); }

/* Footer */
.mem-footer__links { display: flex; flex-wrap: wrap; gap: 28px; }
.mem-page .etk-footer__inner { padding: 36px 40px; }
.mem-page .etk-footer__inner img { height: 48px; }

/* Photo viewer (native <dialog>) */
.mem-lightbox { border: 0; padding: 16px; background: rgba(20,20,20,.94); max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; inset: 0; color: #fff; }
.mem-lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.mem-lightbox::backdrop { background: rgba(20,20,20,.6); }
.mem-lightbox__frame { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 92vw; }
.mem-lightbox__frame img { max-width: 92vw; max-height: calc(100vh - 150px); display: block; border-radius: 12px; object-fit: contain; }
.mem-lightbox__frame figcaption { font-size: 15px; line-height: 1.5; text-align: center; max-width: 720px; opacity: .9; }
.mem-lightbox__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.mem-lightbox__btn { min-width: 48px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.mem-lightbox__btn:hover { background: rgba(255,255,255,.18); }
.etk-wizard .mem-lightbox__btn:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.6); }
.mem-lightbox__count { min-width: 64px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; opacity: .85; }
.mem-lightbox.is-single [data-lightbox-prev], .mem-lightbox.is-single [data-lightbox-next],
.mem-lightbox.is-single [data-lightbox-play], .mem-lightbox.is-single [data-lightbox-count] { display: none; }

/* Copy / share feedback for buttons without a text label */
.mem-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--etk-charcoal); color: var(--etk-cream); padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* ---------- Phone ---------- */
@media (max-width: 759.98px) {
  .mem-header { padding: 12px 16px; flex-wrap: nowrap; }
  .mem-header img { height: 36px; }
  .mem-header nav { display: none; }
  .mem-header__phone { display: flex; }
  .mem-flash { padding: 0 16px; }
  .mem-cover { padding: 0; }
  .mem-cover__img { height: 190px; border-radius: 0; }
  .mem-hero { margin-top: -68px; padding: 0 20px; gap: 10px; }
  .mem-hero--no-cover { margin-top: 16px; }
  .mem-portrait { width: 136px; height: 136px; border-width: 5px; }
  .mem-portrait--initials { font-size: 48px; }
  .mem-kicker { font-size: 12px; letter-spacing: 2.5px; margin-top: 4px; }
  .mem-hero h1 { font-size: 36px; line-height: 1.15; }
  .mem-dates { font-size: 18px; }
  .mem-dates__sep { padding: 0 4px; }
  .mem-facts { font-size: 14px; gap: 8px 18px; margin-top: 8px; }
  .mem-facts svg { display: none; }
  .mem-actions { flex-direction: column; width: 100%; margin-top: 14px; }
  .mem-actions .etk-btn { width: 100%; }
  .mem-actions .mem-share { display: none; } /* share lives in the phone header */
  .mem-socials { gap: 8px; max-width: 100%; }
  .mem-nav { margin-top: 28px; background: var(--etk-cream); }
  .mem-nav__inner { justify-content: flex-start; padding: 10px 16px; gap: 8px; }
  .etk-wizard .mem-nav a { padding: 0 16px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; background: #fff; border: 1px solid var(--etk-muted); font-size: 14px; }
  .etk-wizard .mem-nav a[aria-current="true"] { background: var(--etk-gold-button); color: #fff; border-color: var(--etk-gold-button); }
  .mem-section { scroll-margin-top: 72px; }
  .mem-heading { margin-bottom: 20px; }
  .mem-heading h2, .mem-family .mem-heading h2 { font-size: 30px; }
  .mem-media .mem-heading h2, .mem-tributes .mem-heading h2 { font-size: 28px; }
  .mem-heading p { font-size: 15px; }
  .mem-story { padding: 40px 22px 8px; }
  .mem-story .mem-heading { margin-bottom: 24px; }
  .mem-story__body { font-size: 17px; line-height: 1.75; }
  .mem-story__body > p:first-child { font-size: 20px; line-height: 1.55; }
  .mem-story.is-collapsed .mem-story__body { max-height: 640px; }
  .mem-story__toggle { margin-top: 16px; }
  .mem-story__toggle .etk-btn { width: 100%; min-height: 50px; }
  .mem-family { padding: 44px 22px 12px; }
  .mem-family .mem-heading { margin-bottom: 18px; }
  .mem-family ul { display: block; background: #fff; border: 1px solid var(--etk-muted); border-radius: 16px; padding: 0 18px; }
  .mem-family li { flex: none; background: none; border: 0; border-radius: 0; padding: 14px 0; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; text-align: left; border-bottom: 1px solid var(--etk-secondary); }
  .mem-family li:last-child { border-bottom: 0; }
  .mem-family__name { font-size: 18px; }
  .mem-family__rel { font-size: 12px; flex: none; }
  .mem-photos { padding: 40px 16px; margin-top: 44px; }
  .mem-photos__inner { gap: 16px; }
  .mem-photos__head { align-items: center; flex-wrap: nowrap; }
  .mem-photos__head h2 { font-size: 28px; }
  .mem-slideshow-btn { flex: none; width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%; }
  .mem-photos .etk-tabs { gap: 4px; margin-bottom: 0; }
  .mem-photos .etk-tab { font-size: 14px; padding: 10px 12px; }
  .mem-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mem-grid button { border-radius: 8px; }
  .mem-media { padding: 44px 16px 8px; }
  .mem-music .mem-heading { margin-bottom: 18px; }
  .mem-videos { grid-template-columns: 1fr; gap: 16px; }
  .mem-place { padding: 44px 16px 8px; }
  .mem-place__card { border-radius: 16px; }
  .mem-place__text { padding: 22px 20px; order: 2; gap: 12px; flex-basis: 100%; }
  .mem-place__text h2 { font-size: 28px; }
  .mem-place__name strong { font-size: 19px; }
  .mem-place__name span { font-size: 15px; }
  .mem-place__map { order: 1; min-height: 210px; flex-basis: 100%; }
  .mem-place__explain { display: none; }
  .mem-place__actions { justify-content: center; }
  .mem-place__actions .etk-btn--primary { width: 100%; padding-left: 16px; padding-right: 16px; }
  .mem-place__copy { padding: 0 10px; }
  .mem-hide-phone { display: none; }
  .mem-only-phone { display: inline; }
  .mem-place__details { grid-template-columns: 1fr; gap: 2px; }
  .mem-place__details dt { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-top: 6px; }
  .mem-place__details dt:first-child { margin-top: 0; }
  .mem-owner-strip { flex-direction: column; align-items: stretch; padding: 16px; }
  .mem-owner-strip__text { gap: 6px; }
  .mem-owner-strip .etk-btn { min-height: 48px; }
  .mem-owner-label { font-size: 11px; }
  .mem-owner-empty { padding: 24px 20px; flex-direction: column; text-align: center; gap: 14px; }
  .mem-owner-empty__icon { align-self: center; }
  .mem-owner-empty__text { flex-basis: auto; }
  .mem-owner-empty__text h2 { font-size: 22px; }
  .mem-owner-empty > .etk-btn { width: 100%; margin-left: 0; }
  .mem-tributes { padding: 44px 16px 48px; }
  .mem-tribute-form { padding: 20px; }
  .mem-tribute-form .etk-grid { grid-template-columns: 1fr; }
  .mem-tribute-form .etk-btn--primary { width: 100%; }
  .mem-tribute-form__photo { width: 100%; }
  .mem-photo-label [data-photo-name] { max-width: 260px; }
  .mem-tribute { padding: 20px; }
  .mem-tribute__text { font-size: 17px; }
  .mem-empty { font-size: 17px; margin-top: 20px; }
  .mem-cta { padding: 44px 22px; }
  .mem-cta h2 { font-size: 26px; }
  .mem-cta p { font-size: 15px; }
  .etk-wizard .mem-cta .etk-btn { width: 100%; }
  .mem-page .etk-footer__inner { padding: 24px 16px; justify-content: center; gap: 16px 24px; }
  .mem-page .etk-footer__inner img { display: none; }
  .mem-footer__links { justify-content: center; gap: 24px; font-size: 14px; }
  .mem-page .etk-footer__bar { text-align: center; padding: 16px; font-size: 12px; }
  .mem-lightbox__frame img { max-height: calc(100vh - 190px); border-radius: 8px; }
  .mem-lightbox__close span { display: none; }
}

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

/* ---------- Photos: 3 x 3 preview of small copies, then the full-screen viewer ---------- */
.mem-album { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.mem-album[hidden] { display: none; }
/* 3 columns of about 290px on desktop, so the 3 x 3 grid fits about one screen */
.mem-photos__inner { max-width: 920px; }
.mem-album .mem-grid { width: 100%; }
.mem-grid button { position: relative; }
.mem-grid__more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(30,24,16,.55); color: #fff; font-family: var(--etk-font-heading); font-size: 40px; pointer-events: none; }
/* "Load 27 more" next to "View all N photos", and "Showing 36 of 339 photos" */
.mem-album__more { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 10px; }
.mem-album__status { margin: -4px 0 0; font-size: 14px; color: var(--etk-muted-fg); }
.mem-lightbox { height: 100dvh; max-height: 100dvh; }
.mem-lightbox__frame { touch-action: pan-y pinch-zoom; }
.mem-lightbox__frame img { max-height: calc(100dvh - 150px); transition: transform .18s ease, opacity .2s; touch-action: pan-y pinch-zoom; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.mem-lightbox.is-loading .mem-lightbox__frame img { opacity: .35; }
@media (max-width: 759.98px) {
  .mem-album { gap: 16px; }
  .mem-grid__more { font-size: 26px; }
  .mem-album__more { width: 100%; flex-direction: column; gap: 12px; margin-top: 8px; }
  .mem-album__more .etk-btn { width: 100%; }
  .mem-album__status { margin-top: -2px; }
  .mem-lightbox { padding: 12px 0; }
  .mem-lightbox__frame { max-width: 100vw; }
  .mem-lightbox__frame img { max-width: 100vw; max-height: calc(100dvh - 170px); border-radius: 0; }
  .mem-lightbox__frame figcaption { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .mem-lightbox__frame img { transition: none; }
}
