/* ==========================================================================
   Loving Memoirs — design system, matched to the Figma app design
   Bricolage Grotesque + Parisienne · gold #DAA520 on black & white · soft curves
   (originally Lexend per the Figma; swapped to Bricolage Grotesque 6 Aug 2026)
   ========================================================================== */

:root {
  /* App palette (from Figma: Loving Memoirs) */
  --gold:       #DAA520;
  --gold-deep:  #C4941D;
  --gold-soft:  #FEDD88;
  --gold-tint:  #FFF2D0;
  --black:      #0B0B0B;
  --ink:        #1A1A1A;
  --muted:      #696974;
  --panel-dark: #505050;
  --bg:         #FFFFFF;
  --bg-soft:    #F7F7F5;
  --line:       #E2E2E2;
  --white:      #FFFFFF;

  /* Curves */
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --pill: 999px;

  /* Depth */
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, .05), 0 2px 10px rgba(10, 10, 10, .06);
  --shadow-md: 0 2px 6px rgba(10, 10, 10, .05), 0 12px 32px rgba(10, 10, 10, .12);
  --shadow-lg: 0 4px 12px rgba(10, 10, 10, .08), 0 24px 60px rgba(10, 10, 10, .18);
  --glow-gold: 0 6px 20px rgba(218, 165, 32, .35);

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Parisienne", cursive;
  --container: 1180px;

  /* Gradients from the design */
  --grad-gold: linear-gradient(180deg, var(--gold-soft) 0%, #FFFFFF 100%);
  --grad-gold-rev: linear-gradient(0deg, var(--gold-soft) 0%, #FFFFFF 100%);
}

/* Fonts are self-hosted: no fonts.googleapis.com stylesheet to block rendering,
   no third-party connection, nothing leaving the visitor's browser. Lexend is
   the variable file, so one request covers weights 300-700. */
@font-face {
  font-family: "Lexend";
  src: url("/assets/fonts/lexend-variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Parisienne";
  src: url("/assets/fonts/parisienne.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Garlich Grow — the display serif from the live site's hero */
@font-face {
  font-family: "Garlich Grow";
  src: url("/assets/fonts/garlich-grow.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Bricolage Grotesque — replaced Lexend as the site font 6 Aug 2026 (Danny's
   call, after comparing both). Variable weight 400-700; split into the same
   latin/latin-ext subsets Google Fonts itself serves, so a page only pays
   for the accented-character set (names like Sévern, Mukutu) when it's
   actually used. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
/* Sticky footer: on short pages (e.g. product pages with no add-ons), #main
   grows to fill the viewport so the black footer never leaves white space
   exposed beneath it. */
#main { flex: 1 0 auto; display: flex; flex-direction: column; }
/* Opt-in: centers a section vertically within #main's leftover space instead
   of sitting at the top — use on pages where a short amount of content
   would otherwise look stranded near the header. */
.center-in-main { margin-block: auto; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

/* Script accent headings — "In loving memory of", "Tributes", "Gallery" */
.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; }
h2.script, .script-lg { font-size: clamp(2.2rem, 4.5vw, 3rem); line-height: 1.25; }

/* Uppercase letterspaced label — "FAVOURITE MEMORY" */
.caps-label {
  font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  font-size: .95rem; color: var(--ink);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--black); color: #fff; padding: 10px 18px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border-radius: var(--pill); border: 0;
  font-weight: 600; font-size: .98rem; line-height: 1.2; letter-spacing: .02em;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: var(--glow-gold); }
.btn-primary:hover { background: var(--gold-deep); color: #fff; box-shadow: 0 10px 26px rgba(218, 165, 32, .45); }
.btn-ghost { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--gold); }
.btn-ghost:hover { background: var(--gold); color: #fff; }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #222; color: #fff; }
.btn-soft { background: var(--gold-tint); color: var(--ink); }
.btn-soft:hover { background: var(--gold-soft); }
.btn-sm { padding: 9px 20px; font-size: .88rem; }
.btn-lg { padding: 17px 38px; font-size: 1.05rem; }

/* ---------- Header (black, like the app) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--black);
}
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 84px; }
.brand img { width: 150px; height: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > a, .nav-drop > button {
  padding: 10px 16px; border-radius: var(--pill); color: rgba(255, 255, 255, .85);
  font-weight: 400; font-size: .95rem; background: none; border: 0;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s ease, color .15s ease;
}
.main-nav > a:hover, .nav-drop > button:hover { color: var(--gold-soft); }
.main-nav > a.active, .nav-drop.active > button { color: var(--gold); }
.btn-nav { margin-left: 12px; padding: 11px 24px; }
/* .main-nav > a {background:none} is more specific than .btn-primary's gold
   fill, so it was winning and leaving this button transparent — re-assert it
   here. Header sits on solid black, so dark ink text reads better than white. */
.btn-nav.btn-primary {
  background: var(--gold); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(218, 165, 32, .5), 0 0 24px rgba(218, 165, 32, .55);
}
.btn-nav.btn-primary:hover {
  background: var(--gold-deep); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(218, 165, 32, .65), 0 0 30px rgba(218, 165, 32, .75);
}

.nav-drop { position: relative; }
.drop-menu {
  position: absolute; top: calc(100% + 14px); left: 0; min-width: 250px;
  background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-drop.open .drop-menu, .nav-drop:focus-within .drop-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.drop-menu a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 16px; border-radius: var(--r-md); color: var(--ink);
}
.drop-menu a:hover { background: var(--gold-tint); }
.drop-menu strong { font-weight: 600; }
.drop-menu span { font-size: .82rem; color: var(--muted); }

.basket-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; color: #fff; margin-left: 6px;
  transition: background .15s ease, color .15s ease;
}
.basket-link:hover { background: rgba(255, 255, 255, .1); color: var(--gold-soft); }
.basket-link.active { color: var(--gold); }
/* Search/account: icons in the header bar on desktop, text links inside the
   popup menu on mobile — three icons plus a hamburger overlap the centred logo.
   Needs the `.main-nav > a` prefix to outrank that rule's display:inline-flex. */
.main-nav > a.nav-mobile-only { display: none; }
.basket-link svg { width: 22px; height: 22px; }
.basket-count {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px;
  background: var(--gold); color: #fff; border-radius: var(--pill);
  font-size: .68rem; font-weight: 700; display: grid; place-items: center; padding-inline: 4px;
}

.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-left: auto; }
.nav-toggle span {
  display: block; width: 24px; height: 2.5px; border-radius: 2px;
  background: #fff; margin: 5px 0; transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Flash ---------- */
.flash {
  background: var(--gold-tint); color: var(--ink); padding: 14px 0;
  font-weight: 500; border-bottom: 1px solid var(--gold-soft);
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad-gold);
  padding: 72px 0 48px;
}
/* v2: the live site's Aug-2025 hero — near-white, Garlich Grow display type,
   faint infinity watermark behind */
.hero-v2 { background: #FFFEFB; }
.hero-v2::before {
  content: ""; position: absolute; left: 50%; top: 8%; width: 62%; height: 84%;
  transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 230 110' fill='none' stroke='%23DAA520' stroke-width='7' stroke-linecap='round'%3E%3Cpath d='M105 55c0 25-18 45-42 45S18 80 18 55s21-45 45-45 42 20 42 45zm0 0c0-25 18-45 42-45s45 20 45 45-21 45-45 45-42-20-42-45z'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: .05; pointer-events: none;
}
.hero-eyebrow {
  /* Was "Garlich Grow", serif — moved to the site font (Bricolage) 6 Aug 2026. */
  font-family: var(--font); font-weight: 600; color: var(--gold-deep);
  font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 10px;
}
.hero-v2 h1 {
  /* Was "Garlich Grow", serif with a text-stroke to fake a bold weight (that
     font only ships one weight) — moved to the site font 6 Aug 2026, which
     has a real bold, so the stroke hack is no longer needed. */
  font-family: var(--font); font-weight: 700;
  font-size: clamp(2.9rem, 6.8vw, 4.8rem); line-height: 1.02; letter-spacing: 0;
}
.hero-v2 h1 .accent { color: var(--gold); }
/* The hero mockups have white backgrounds and their own baked-in shadows —
   no frames, radii or shadows on top, so they blend into the near-white hero. */
.hero-v2 .hero-img img { border-radius: 0; filter: none; }
.hero-v2 .hero-img .float { border: 0; box-shadow: none; border-radius: 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero .eyebrow { margin-bottom: 18px; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 34rem; margin: 20px 0 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-img { position: relative; }
.hero-img img { border-radius: var(--r-xl); filter: drop-shadow(0 30px 60px rgba(10, 10, 10, .22)); }
.hero-img .float {
  position: absolute; right: -4%; bottom: -6%; width: 46%;
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  border: 5px solid var(--white);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--gold-soft);
  color: var(--gold-deep); font-weight: 600; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 18px; border-radius: var(--pill); box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-soft); }
.section-dark { background: var(--panel-dark); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255, 255, 255, .82); }
.section-head { text-align: center; max-width: 46rem; margin: 0 auto 52px; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin-top: 14px; }

/* Dove divider (like the app's line—dove—line motif) */
.dove-divider {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: 34px auto; max-width: 30rem;
}
.dove-divider::before, .dove-divider::after {
  content: ""; flex: 1; height: 1.5px; background: var(--ink); opacity: .6;
}
.dove-divider img { width: 44px; opacity: .9; }
.section-dark .dove-divider::before, .section-dark .dove-divider::after,
.on-gold .dove-divider::before, .on-gold .dove-divider::after { background: currentColor; }

/* Type cards (loved one / legacy / pet) */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.type-card {
  background: var(--white); border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.type-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
/* Matches the source images' near-square shape (1512×1542) so nothing crops */
.type-card img { aspect-ratio: 1512 / 1542; object-fit: cover; width: 100%; }
.type-card .body { padding: 26px 26px 30px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.type-card h3 { color: var(--ink); }
.type-card p { color: var(--muted); flex: 1; }
.type-card .price { font-weight: 700; color: var(--gold-deep); }
.type-card .btn { align-self: flex-start; }

/* Split feature rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse > .split-img { order: 2; }
.split-img img { border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.split h2 { margin-bottom: 16px; }
.split p { color: var(--muted); font-size: 1.04rem; margin-bottom: 14px; }
.split .btn { margin-top: 12px; }

.check-list { list-style: none; padding: 0; margin: 18px 0 8px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.check-list li::before {
  content: ""; flex: 0 0 22px; height: 22px; margin-top: 2px;
  background: var(--gold-tint); border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DAA520' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-10'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}
.section-dark .check-list li { color: rgba(255, 255, 255, .85); }

/* Feature trio */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card {
  background: var(--white); border-radius: var(--r-lg); padding: 28px;
  text-align: center; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-card img { border-radius: var(--r-md); margin-bottom: 22px; aspect-ratio: 1 / 1.06; object-fit: cover; width: 100%; }
.feature-img-stack { position: relative; margin-bottom: 22px; }
.feature-img-stack > img { margin-bottom: 0; }
.feature-img-stack .dove-overlay {
  position: absolute; inset: 0; margin: auto; width: 44%; height: auto;
  aspect-ratio: auto; object-fit: contain; opacity: .85;
}
.feature-card h3 { margin-bottom: 10px; color: var(--ink); }
.feature-card p { color: var(--muted); }

/* Gold banner — like the app's "SCAN THIS" panel */
.price-banner {
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--gold) 130%);
  border-radius: var(--r-xl); color: var(--ink); padding: 56px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center;
  box-shadow: var(--shadow-md);
}
.price-banner h2 { color: var(--ink); }
.price-banner p { color: rgba(26, 26, 26, .78); font-size: 1.04rem; margin-top: 12px; }
.price-banner .big-price { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 700; line-height: 1; }
.price-banner .big-price small { font-size: 40%; font-weight: 600; opacity: .75; }
.price-banner .btn { background: var(--black); color: #fff; margin-top: 18px; }
.price-banner .btn:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.price-side { text-align: center; }

/* App section (black, like the app's dark panels) */
.app-section {
  background: var(--black); color: #fff; border-radius: var(--r-xl);
  padding: 56px; display: grid; grid-template-columns: 1fr .9fr; gap: 40px; align-items: center;
  overflow: hidden; position: relative;
}
.app-section .badge { display: inline-block; margin-bottom: 14px; }
.app-section h2 { color: #fff; }
.app-section p { color: rgba(255, 255, 255, .75); font-size: 1.04rem; margin: 14px 0 24px; }
.store-badges { display: flex; gap: 14px; flex-wrap: wrap; }
.store-badges img { height: 52px; width: auto; border-radius: var(--r-sm); }
.app-section img.app-shot { border-radius: var(--r-lg); }

/* ---------- Store ---------- */
.filter-pills { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.filter-pills a {
  padding: 10px 24px; border-radius: var(--pill); background: var(--gold);
  color: #fff; font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em;
  transition: background .15s ease, transform .15s ease;
}
.filter-pills a:hover { background: var(--gold-deep); transform: translateY(-2px); }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.product-card {
  background: var(--white); border-radius: var(--r-lg); overflow: hidden;
  border: 1.5px solid var(--gold-soft); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.product-card img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; background: var(--bg-soft); }
.product-card .body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card h3 { font-size: 1.18rem; }
.product-card .desc { color: var(--muted); font-size: .93rem; flex: 1; }
.product-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; flex-wrap: wrap; }
.product-card .price { font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.badge {
  display: inline-block; padding: 5px 12px; border-radius: var(--pill);
  font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: 14px;
}
.badge-gold  { background: var(--gold-tint); color: var(--gold-deep); }
.badge-soft  { background: var(--gold-tint); color: var(--ink); }
.badge-sky   { background: #EAF4FF; color: #1b5c8f; }
.badge-green { background: #E4F5E6; color: #1d6b2a; }
.badge-dark  { background: var(--black); color: var(--gold-soft); }
.badge-red   { background: #FBE4E4; color: #A32424; }

/* ---------- Product details page ---------- */
.product-carousel {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.product-carousel img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: none; }
.product-carousel img.active { display: block; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--gold); color: #fff; font-size: 1.4rem; line-height: 1;
  box-shadow: var(--glow-gold);
}
.car-btn.prev { left: 12px; }
.car-btn.next { right: 12px; }
.car-dots { position: absolute; bottom: 12px; inset-inline: 0; display: flex; gap: 7px; justify-content: center; }
.car-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.car-dots span.active { background: var(--gold); }

.price-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.qty-stepper { display: inline-flex; align-items: center; gap: 6px; }
.qty-stepper button {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--gold);
  background: var(--white); color: var(--gold-deep); font-size: 1.2rem; font-weight: 700;
}
.qty-stepper button:hover { background: var(--gold); color: #fff; }
.qty-stepper input {
  width: 56px; text-align: center; padding: 8px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); font-weight: 700;
}
.unit-price { font-size: 1.5rem; font-weight: 700; display: flex; gap: 10px; align-items: baseline; }
.unit-price s { color: var(--muted); font-weight: 500; font-size: 1.05rem; }

.arrow-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.arrow-list li { display: flex; gap: 10px; color: var(--ink); font-size: .95rem; }
.arrow-list li::before { content: "→"; color: var(--gold-deep); font-weight: 700; flex: 0 0 auto; }

.addon-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
  box-shadow: var(--shadow-sm); margin-bottom: 20px; display: grid; gap: 18px;
}
.addon { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.addon p { color: var(--muted); font-size: .86rem; margin-top: 4px; max-width: 34rem; }
.addon-choice label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.addon-choice input { width: 20px; height: 20px; accent-color: var(--gold); }
.addon-choice span { color: var(--gold-deep); }

.total-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.total-table td { padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.total-table td:last-child { text-align: right; font-weight: 700; }
.total-table .total-row td { border-bottom: 0; background: var(--gold-tint); font-weight: 700; }

.extra-info { border-top: 1px solid var(--line); padding-top: 16px; }
.extra-info summary { font-weight: 700; cursor: pointer; }
.extra-info p { color: var(--muted); font-size: .93rem; margin-top: 12px; }

/* ---------- Memorial pages ----------
   Desktop: split hero — framed portrait left, name/quote right on gold gradient.
   Mobile: the app frame — edge-to-edge photo, centred title below. */
.memorial-hero { position: relative; background: var(--grad-gold); padding: 64px 0 52px; }
.memorial-hero .hero-wrap {
  display: grid; grid-template-columns: minmax(300px, 420px) 1fr;
  gap: clamp(36px, 6vw, 80px); align-items: center;
}
.memorial-hero.no-photo .hero-wrap { grid-template-columns: 1fr; text-align: center; }
.memorial-photo { position: relative; }
.memorial-photo > img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%;
  border-radius: var(--r-xl); border: 6px solid var(--white); box-shadow: var(--shadow-lg);
}
.age-badge {
  position: absolute; left: -28px; bottom: 34px;
  width: 116px; height: 116px; border-radius: 50%; padding: 10px;
  background: var(--white); box-shadow: var(--shadow-md);
  display: grid; place-items: center; text-align: center; line-height: 1.05; z-index: 2;
}
.age-badge .inner { display: grid; gap: 4px; justify-items: center; }
.age-badge .age { font-size: 1.7rem; font-weight: 700; }
.age-badge .years { font-size: .72rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.memorial-title { text-align: left; }
.memorial-title .in-loving { font-family: var(--script); font-size: clamp(1.8rem, 3.6vw, 2.5rem); color: var(--ink); }
.memorial-title h1, .memorial-title .preview-name {
  color: var(--gold-deep); text-transform: uppercase; letter-spacing: .14em;
  font-size: clamp(1.7rem, 3.8vw, 2.7rem); font-weight: 700; margin-top: 8px;
}
/* Demo pages reproduce the memorial hero inside a preview, where the name
   can't be an <h1> — the page already has one. Same look, no second H1. */
.memorial-title .preview-name { font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.2; }
.memorial-title .dates { color: var(--muted); font-size: 1.05rem; font-weight: 500; margin-top: 8px; }
.memorial-actions { margin-top: 26px; display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; }
/* .btn-soft's fill is var(--gold-tint), which a memorial's own custom
   background colour can override to something nearly white (mixed 55%
   toward white from whatever the customer picked) — on a light custom
   background the button then has no visible fill at all. Give the hero's
   "Leave a tribute" button a background that isn't theme-dependent, so it
   always reads as a button regardless of what colours this page has set. */
.memorial-actions .btn-soft { background: rgba(0, 0, 0, .07); }
.memorial-actions .btn-soft:hover { background: rgba(0, 0, 0, .12); }
/* Redundant everywhere now — the real Share Memories FAB (icon + QR modal)
   already covers this: fixed in the corner on desktop, anchored to the
   photo on mobile (or still fixed, on a no-photo page). */
.btn-share-hero { display: none; }
.memorial-quote { max-width: 34rem; margin-top: 18px; font-size: 1.1rem; font-style: italic; color: var(--muted); }

/* Admin-only "custom memorial" touches — a couple of small decorative badges
   (a club crest, a hobby icon) reflecting something the person loved. */
.memorial-flourishes { display: flex; gap: 14px; margin-top: 16px; }
.memorial-flourishes img {
  width: 76px; height: 76px; object-fit: contain; border-radius: var(--r-md);
  background: var(--white); padding: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.memorial-hero.no-photo .memorial-flourishes { justify-content: center; }
.memorial-title .dove-divider { margin: 32px 0 0; max-width: 280px; }
.memorial-hero.no-photo .memorial-actions { justify-content: center; }
.memorial-hero.no-photo .memorial-quote, .memorial-hero.no-photo .memorial-title .dove-divider { margin-inline: auto; }

/* Tab cards — white rounded cards, active gold (app style) */
.tab-bar { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 0 auto 44px; }
.tab-bar button {
  border: 1px solid var(--line); background: var(--white);
  padding: 14px 22px; border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  font-weight: 600; font-size: .92rem; color: var(--ink); white-space: nowrap;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.tab-bar button:hover { transform: translateY(-2px); }
.tab-bar button.active { background: var(--gold); color: #fff; border-color: var(--gold); box-shadow: var(--glow-gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.prose { max-width: 46rem; margin-inline: auto; }
.prose h3 {
  color: var(--ink); margin: 34px 0 12px;
  text-transform: uppercase; letter-spacing: .12em; font-size: 1.05rem; font-weight: 600;
}
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--muted); font-size: 1.02rem; margin-bottom: 16px; white-space: pre-line; }

/* Gold gradient content card — app's "Remembering" / tribute panels */
.gold-card {
  background: var(--grad-gold);
  border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow-sm);
}
.gold-card > .script-head { text-align: center; font-family: var(--script); font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 26px; }

/* Legacy fact rows — label | value, alternating cream (app style) */
.fact-grid { display: grid; gap: 0; max-width: 46rem; margin: 0 auto 26px;
  background: var(--white); border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.fact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; padding: 14px 20px; align-items: center; }
.fact:nth-child(even) { background: var(--gold-tint); }
.fact .label { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.fact .value { font-weight: 600; font-size: .95rem; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-grid figure {
  position: relative; border-radius: var(--r-md); overflow: hidden; cursor: zoom-in;
  aspect-ratio: 1 / 1; background: var(--bg-soft);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-grid figure:hover img { transform: scale(1.05); }
.gallery-grid figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgba(10, 10, 10, .72));
  color: #fff; font-size: .85rem; font-weight: 500;
}

/* Gallery — edit mode (memorial form) */
.media-item-edit { display: flex; flex-direction: column; gap: 6px; }
.gallery-remove {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(10, 10, 10, .72); color: #fff; border: none; font-size: 1.15rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.gallery-remove:hover { background: var(--gold); }
.gallery-grid-edit .gallery-remove { position: absolute; top: 6px; right: 6px; }
.gallery-grid-edit .media-item-edit.marked-removed { opacity: .35; }
.gallery-grid-edit .media-item-edit.marked-removed .gallery-remove { background: var(--gold); }

.media-caption-input {
  width: 100%; padding: 6px 8px; border-radius: var(--r-sm); border: 1px solid var(--line);
  font-size: .8rem; font-family: inherit; background: var(--white); color: var(--ink);
}

/* Videos already have real content (a poster frame), so they don't need the
   square crop — let them keep their natural aspect ratio instead of leaving
   empty space below a 16:9 clip forced into a 1:1 box. */
.video-item-edit figure { aspect-ratio: auto; background: none; }
.video-item-edit video { width: 100%; height: auto; display: block; }

/* Audio tracks have no visual content at all, so the grid-of-squares
   treatment was just an empty box — a compact icon + name row instead. */
.audio-list-edit { display: flex; flex-direction: column; gap: 8px; }
.audio-row {
  display: flex; align-items: center; gap: 10px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 8px;
}
.audio-row.marked-removed { opacity: .5; }
.audio-row.marked-removed .media-caption-input { text-decoration: line-through; color: var(--muted); }
.audio-row.marked-removed .gallery-remove { background: var(--gold); }
.audio-icon {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold-tint); color: var(--gold-deep);
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.audio-row .media-caption-input { flex: 1 1 auto; border-color: transparent; background: transparent; }
.audio-row .media-caption-input:hover, .audio-row .media-caption-input:focus { border-color: var(--line); background: var(--white); }

/* Staged uploads — files picked but not yet saved, added one at a time */
.stage-list:empty { display: none; }
.stage-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.stage-item {
  display: flex; align-items: center; gap: 12px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px;
}
.stage-thumb {
  width: 56px; height: 56px; flex: 0 0 auto; border-radius: var(--r-sm);
  overflow: hidden; background: #000;
}
.stage-thumb img, .stage-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.stage-item.kind-audio .stage-thumb { width: auto; height: auto; background: none; }
.stage-item.kind-audio audio { width: 200px; max-width: 45vw; }
.stage-item .media-caption-input { flex: 1 1 auto; }

/* Media */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.media-card {
  background: var(--white); border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.media-card video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #000; }
.media-card .cap { padding: 14px 18px; font-weight: 500; font-size: .93rem; }
.audio-list { display: grid; gap: 14px; max-width: 46rem; margin-inline: auto; }
.audio-card {
  background: var(--gold); border-radius: var(--pill);
  padding: 12px 22px; box-shadow: var(--glow-gold);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.audio-card .cap { font-weight: 600; color: #fff; font-size: .92rem; flex: 1 1 200px; }
.audio-card audio { flex: 2 1 280px; height: 40px; }

.map-embed {
  margin-top: 18px; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 9; max-height: 420px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Tributes */
.tribute-list { display: grid; gap: 18px; max-width: 46rem; margin-inline: auto; }
.tribute {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px 28px; box-shadow: var(--shadow-sm);
}
.tribute .who { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tribute .avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.tribute .name { font-weight: 700; }
.tribute .date { font-size: .82rem; color: var(--muted); }
.tribute p { color: var(--muted); }

/* Tributes — masonry columns + "Leave a tribute" modal */
.tf-panel { max-width: 1080px; margin-inline: auto; text-align: center; }
.tf-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.tf-head svg { width: 26px; height: 26px; color: var(--gold-deep); flex: 0 0 auto; }
.tf-head h2 { margin: 0; }
.tf-sub { color: var(--muted); max-width: 30rem; margin: 6px auto 4px; }
.tf-count {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gold-deep); margin-bottom: 20px;
}
/* Masonry via CSS multi-columns: cards keep their natural height instead of
   stretching to the tallest in the row. Collapses to one column on its own. */
.tf-list { columns: 3 300px; column-gap: 16px; margin-top: 30px; text-align: left; }
.tf-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px; margin: 0 0 16px; box-shadow: var(--shadow-sm);
  break-inside: avoid; -webkit-column-break-inside: avoid;
}
.tf-item[hidden] { display: none; }
.tf-avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .95rem;
}
.tf-body { flex: 1; min-width: 0; }
.tf-item strong { display: block; font-size: .95rem; }
/* pre-line so tributes written as poems keep their line breaks */
.tf-item p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; line-height: 1.6; white-space: pre-line; word-wrap: break-word; }
.tf-date { display: block; margin-top: 8px; font-size: .76rem; color: var(--muted); opacity: .8; }
.tf-empty { column-span: all; color: var(--muted); font-style: italic; padding: 20px 0; }
.tf-more {
  margin: 14px auto 0; background: var(--white); color: var(--gold-deep);
  border: 1.5px solid var(--gold-soft);
}
.tf-more:hover { border-color: var(--gold); }

.tf-modal {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(10, 10, 10, .7); place-items: center; padding: 24px;
}
.tf-modal.open { display: grid; }
.tf-card {
  position: relative; background: var(--white); border-radius: var(--r-xl);
  padding: 34px 30px 30px; max-width: 440px; width: 100%; box-shadow: var(--shadow-lg);
  text-align: left; max-height: 90vh; overflow-y: auto;
}
.tf-card .close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  border-radius: 50%; border: 0; background: var(--bg-soft); font-size: 1rem;
}
.tf-card h3 { font-family: var(--script); font-weight: 400; font-size: 1.9rem; margin-bottom: 18px; }
.tf-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Write-your-tribute — dark panel with white inputs (app style) */
.tribute-write {
  background: linear-gradient(160deg, #202020 0%, var(--black) 100%);
  border: 1px solid rgba(218, 165, 32, .2);
  border-radius: var(--r-xl);
  padding: clamp(30px, 5vw, 52px); color: #fff;
  box-shadow: var(--shadow-lg);
}
.tribute-write h3 { font-family: var(--script); font-size: clamp(1.8rem, 3.6vw, 2.4rem); font-weight: 400; color: #fff; margin-bottom: 22px; }
.tribute-write .field label { color: rgba(255, 255, 255, .82); font-size: .88rem; text-transform: uppercase; letter-spacing: .05em; }
.tribute-write .field input,
.tribute-write .field select,
.tribute-write .field textarea {
  background: rgba(255, 255, 255, .98);
  border: 1.5px solid rgba(255, 255, 255, .1);
  color: var(--ink);
  box-shadow: none;
}
.tribute-write .field input:focus,
.tribute-write .field select:focus,
.tribute-write .field textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 4px rgba(218, 165, 32, .22);
}
.tribute-write .icon-field > svg { color: var(--muted); }
.tribute-write .hint { color: rgba(255, 255, 255, .55); }
.tribute-write .form-row-2 { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 620px) {
  .tribute-write .form-row-2 { grid-template-columns: 1fr 1fr; gap: 20px; }
}
.tribute-write .form-footnote {
  text-align: center; margin-top: 22px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .7); font-size: .92rem;
}

/* Fund card */
.fund-card {
  background: var(--gold-tint); border: 1px solid var(--gold-soft); border-radius: var(--r-xl);
  padding: 30px; text-align: center; max-width: 46rem; margin: 30px auto 0;
}
.fund-card h3 { margin-bottom: 8px; }
.fund-card p { color: var(--muted); margin-bottom: 16px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 40px; box-shadow: var(--shadow-md); max-width: 560px; margin-inline: auto;
}
.form-wide { max-width: 760px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; font-size: .95rem; }
.field .hint { font-size: .84rem; color: var(--muted); font-weight: 400; margin-top: 4px; }
.input, .field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="url"], .field input[type="file"], .field input[type="date"], .field input[type="tel"],
.field select, .field textarea {
  width: 100%; padding: 13px 20px; border-radius: var(--r-md);
  border: 1.5px solid var(--gold-soft); background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(218, 165, 32, .15);
}
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
.form-note { text-align: center; margin-top: 20px; color: var(--muted); font-size: .95rem; }

/* Inputs with a leading line-icon, like the app's forms */
.icon-field { position: relative; }
.icon-field > svg {
  position: absolute; left: 16px; top: 14px; width: 20px; height: 20px;
  color: var(--muted); pointer-events: none; z-index: 1;
}
.icon-field input, .icon-field select, .icon-field textarea,
.field .icon-field input[type="text"], .field .icon-field input[type="email"],
.field .icon-field input[type="password"], .field .icon-field input[type="url"],
.field .icon-field input[type="file"], .field .icon-field input[type="date"],
.field .icon-field input[type="tel"],
.field .icon-field select, .field .icon-field textarea {
  padding-left: 48px;
}

/* Accent colour picker (Choose Theme Colour) */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatches label { cursor: pointer; }
.swatches input[type="radio"] { position: absolute; opacity: 0; }
.swatches .swatch {
  display: block; width: 54px; height: 30px; border-radius: var(--pill);
  border: 2.5px solid transparent; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, border-color .15s ease;
}
.swatches label:hover .swatch { transform: translateY(-2px); }
.swatches input:checked + .swatch { border-color: var(--ink); }
.swatches input:focus-visible + .swatch { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

/* Custom colour picker pill — sits alongside the presets. A hidden radio
   (same name/group as the presets) tracks selection state; picking a colour
   checks it, which natively unchecks whichever preset was selected. */
.swatch-custom { position: relative; display: inline-block; cursor: pointer; }
.swatch-custom .custom-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch-custom .custom-picker {
  display: block; width: 54px; height: 30px; padding: 0; cursor: pointer;
  border: 2.5px solid var(--line); border-radius: var(--pill); background: var(--bg-soft);
  box-shadow: var(--shadow-sm); transition: transform .15s ease, border-color .15s ease;
}
.swatch-custom:hover .custom-picker { transform: translateY(-2px); }
.swatch-custom .custom-radio:checked ~ .custom-picker { border-color: var(--ink); }
.swatch-custom .custom-radio:focus-visible ~ .custom-picker { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.swatch-custom .custom-picker::-webkit-color-swatch-wrapper { padding: 3px; }
.swatch-custom .custom-picker::-webkit-color-swatch { border: none; border-radius: var(--pill); }
.swatch-custom .custom-picker::-moz-color-swatch { border: none; border-radius: var(--pill); }

/* Multi-step */
.steps { display: flex; gap: 8px; margin-bottom: 34px; flex-wrap: wrap; }
.steps .step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--pill); font-size: .85rem; font-weight: 600;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line);
}
.steps .step.done { background: var(--gold-tint); color: var(--ink); border-color: var(--gold-soft); }
.steps .step.current { background: var(--gold); color: #fff; border-color: transparent; box-shadow: var(--glow-gold); }
.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeUp .3s ease; }

/* ---------- Page headers ---------- */
.page-head { padding: 60px 0 44px; text-align: center; background: linear-gradient(180deg, var(--gold-tint) 0%, #FFFFFF 100%); }
.page-head p { color: var(--muted); max-width: 40rem; margin: 14px auto 0; font-size: 1.06rem; }
.page-head.script-head h1 { font-family: var(--script); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.4rem); }

/* ---------- Account dashboard ---------- */
.gold-panel { background: var(--grad-gold); border-radius: var(--r-xl); padding: clamp(22px, 4vw, 40px); }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dash-card {
  background: var(--white); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dash-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.dash-card img { aspect-ratio: 16 / 11; object-fit: cover; width: 100%; background: var(--bg-soft); }
.dash-card .body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.dash-card .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.empty-state {
  text-align: center; background: var(--gold-tint); border: 2px dashed var(--gold-soft);
  border-radius: var(--r-xl); padding: 60px 30px; max-width: 620px; margin-inline: auto;
}
.empty-state p { color: var(--muted); margin: 10px 0 22px; }

/* ---------- Admin ---------- */
.admin-body { background: #F4F5F7; min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.admin-side {
  background: var(--black); color: #fff; padding: 26px 18px;
  display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
  /* The nav has grown past what always fits a fixed 100vh box on a shorter
     screen — without this, the bottom-most items (the Website/Sign out row)
     silently overflow past the viewport and become unreachable rather than
     visibly scrollable. */
  overflow-y: auto;
}
.admin-side-top { display: flex; align-items: center; }
.admin-nav-links { display: flex; flex-direction: column; gap: 4px; }
.admin-side .brand { padding: 4px 12px 22px; }
.admin-side .brand img { width: 150px; }
.admin-side a {
  color: rgba(255, 255, 255, .72); padding: 11px 16px; border-radius: var(--r-md);
  font-weight: 500; display: flex; align-items: center; gap: 10px;
  transition: background .15s ease, color .15s ease;
}
.admin-side a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-nav-label {
  color: rgba(255, 255, 255, .4); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: 16px 16px 2px;
}
.admin-side a.admin-nav-btn {
  background: rgba(255, 255, 255, .1); color: #fff; justify-content: center;
  text-align: center; margin: 6px 0 4px; width: 100%;
}
.admin-side a.admin-nav-btn:hover { background: rgba(255, 255, 255, .18); }
.admin-nav-utility { display: flex; gap: 4px; }
.admin-nav-utility a {
  flex: 1; flex-direction: column; gap: 4px; padding: 10px 6px;
  font-size: .74rem; text-align: center; justify-content: center;
}
.admin-nav-utility a svg { width: 18px; height: 18px; }
.admin-side a.active { background: var(--gold); color: #fff; }
.admin-side .spacer { flex: 1; }
.admin-main { padding: 36px 40px; }
.admin-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.admin-head h1 { font-size: 1.8rem; }
.admin-head .btn { margin-left: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 34px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 24px; box-shadow: var(--shadow-sm); }
.stat .num { font-size: 2rem; font-weight: 700; color: var(--gold-deep); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-weight: 500; font-size: .9rem; }

.table-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.admin-table th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.admin-table td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: #FAFAF8; }
.admin-table td.actions { white-space: nowrap; }
.admin-table td.actions form, .admin-table td.actions > a {
  display: inline-block; margin: 3px 6px 3px 0; vertical-align: middle;
}
.customer-actions {
  display: flex; flex-wrap: wrap; gap: 6px; max-width: 460px;
}
.customer-actions .btn-sm { padding: 6px 12px; font-size: .76rem; }
.admin-table form { display: inline; }
.code-chip {
  font-weight: 700; letter-spacing: .1em; background: var(--gold-tint);
  border: 1px solid var(--gold-soft); padding: 4px 12px; border-radius: var(--r-sm);
}

/* ---------- Auth (minimal white, centred wordmark — app style) ---------- */
.auth-wrap { padding: 60px 0 90px; }
.auth-logo { display: block; margin: 0 auto 34px; width: 250px; }
.auth-wrap .form-card { text-align: left; border: 0; box-shadow: none; padding: 0; }
.auth-wrap h1 { text-align: left; margin-bottom: 6px; font-size: 1.7rem; }
.auth-sub { text-align: left; color: var(--muted); margin-bottom: 28px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(10, 10, 10, .88); place-items: center; padding: 30px;
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 84vh; max-width: 90vw; width: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.lightbox .cap { color: #fff; text-align: center; margin-top: 14px; font-weight: 500; }
.lightbox .close {
  position: absolute; top: 22px; right: 26px; background: rgba(255, 255, 255, .14);
  color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem;
}

/* ---------- Share Memories FAB + QR modal ---------- */
.fab-share {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--pill); border: 0;
  background: var(--gold); color: #fff; font-weight: 700; font-size: .95rem;
  box-shadow: var(--glow-gold), var(--shadow-md);
  transition: transform .15s ease, background .15s ease;
}
.fab-share:hover { transform: translateY(-3px); background: var(--gold-deep); }
.fab-share svg { width: 20px; height: 20px; }

.qr-modal {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(10, 10, 10, .7); place-items: center; padding: 24px;
}
.qr-modal.open { display: grid; }
.qr-card {
  position: relative; background: var(--white); border-radius: var(--r-xl);
  padding: 34px 30px 30px; max-width: 360px; width: 100%; box-shadow: var(--shadow-lg);
}
.qr-card .close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  border-radius: 50%; border: 0; background: var(--bg-soft); font-size: 1rem;
}
.qr-box { display: grid; place-items: center; }
.qr-box svg { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; }

/* ---------- Footer (black, gold headings — like the app) ---------- */
.site-footer { background: var(--black); color: #fff; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h2 { font-size: 1rem; color: var(--gold); margin-bottom: 16px; text-transform: uppercase; letter-spacing: .08em; }
.site-footer nav { display: flex; flex-direction: column; gap: 10px; }
.site-footer nav a, .site-footer p { color: rgba(255, 255, 255, .72); }
.site-footer nav a:hover { color: var(--gold-soft); }
.footer-brand img { margin-bottom: 14px; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: #fff;
  transition: background .15s ease, transform .15s ease, color .15s ease;
}
.socials a:hover { background: var(--gold); transform: translateY(-3px); color: #fff; }
.socials svg { width: 20px; height: 20px; }
.footer-bottom {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .9rem; color: rgba(255, 255, 255, .5);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .type-grid, .feature-grid, .product-grid, .dash-grid, .media-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero-grid, .split, .price-banner, .app-section { grid-template-columns: 1fr; }
  .split.reverse > .split-img { order: 0; }
  .hero { padding-top: 48px; }
  .section { padding: 60px 0; }
  .admin-body { grid-template-columns: 1fr; }
  /* Collapsed behind a hamburger by default, same pattern as the public
     site header — an always-open sidebar pushed the actual page content
     below the fold on a phone. */
  .admin-side { position: static; height: auto; width: 100%; padding: 12px 16px; }
  .admin-side-top { justify-content: space-between; align-items: center; min-height: 0; }
  .admin-side .brand { padding: 0; display: flex; align-items: center; }
  /* The logo file is a wide 1920x746 banner, so at the desktop sidebar's
     150px width it renders ~58px tall — taller than it needs to be as a
     one-line mobile header. Shrunk to keep the collapsed bar compact. */
  .admin-side .brand img { display: block; width: 96px; }
  /* The public header's toggle rules (order/margin) don't apply in here —
     keep the default block button, the parent flexbox centres it. */
  .admin-side-top .nav-toggle { order: 0; margin: 0; display: block; }
  .admin-nav-links { display: none; padding: 10px 0 4px; }
  .admin-nav-links.open { display: flex; }
  .admin-side .spacer { display: none; }
  .admin-main { padding: 24px 20px; max-width: 100%; overflow-x: hidden; }

  /* Tables become tap-to-expand cards: the first column stays visible as the
     summary, the rest reveal on tap. Beats horizontal scrolling, which hides
     the actions column off-screen entirely on a phone. Labels come from the
     matching <th> (added as data-label by main.js), so no per-table markup. */
  .table-card { overflow-x: visible; }
  table.admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: auto; min-width: 0; }
  .admin-table thead { display: none; }
  .admin-table tr { border-bottom: 1px solid var(--line); padding: 4px 0; }
  .admin-table tr:last-child { border-bottom: 0; }
  .admin-table td { border-bottom: 0; padding: 6px 18px; }
  .admin-table tr:hover td { background: transparent; }

  .admin-table td:first-child {
    position: relative; padding: 14px 46px 14px 18px; cursor: pointer; font-weight: 600;
  }
  .admin-table td:first-child::after {
    content: ''; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
  }
  .admin-table tr.open td:first-child::after { transform: translateY(-20%) rotate(-135deg); }
  .admin-table tr.open td:first-child { background: var(--gold-tint); }

  .admin-table td:not(:first-child) { display: none; }
  .admin-table tr.open td:not(:first-child) { display: block; }
  .admin-table tr.open td:not(:first-child)::before {
    content: attr(data-label); display: block;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 600; margin-bottom: 2px;
  }
  .admin-table tr.open td:last-child { padding-bottom: 16px; }

  /* App-style mobile header: hamburger left, centred logo, basket right.
     Scoped to .header-inner .brand — a bare .brand rule here was also
     hijacking the admin sidebar's logo, pinning it on top of the nav links. */
  .nav-toggle { display: block; order: -1; margin-left: 0; margin-right: auto; }
  .header-inner { justify-content: flex-end; position: relative; }
  .header-inner .brand { position: absolute; left: 50%; transform: translateX(-50%); }
  .header-inner .brand img { width: 132px; }
  .nav-icon-only { display: none; }
  .main-nav > a.nav-mobile-only { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black); border-bottom: 1px solid rgba(255, 255, 255, .12);
    flex-direction: column; align-items: stretch; padding: 16px 20px 22px; gap: 4px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav > a, .nav-drop > button { width: 100%; justify-content: flex-start; color: #fff; }
  .drop-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: rgba(255, 255, 255, .06); display: none; }
  .drop-menu a, .drop-menu span { color: #fff; }
  .drop-menu a:hover { background: rgba(255, 255, 255, .1); }
  .nav-drop.open .drop-menu { display: block; }
  .btn-nav { margin: 10px 0 0; justify-content: center; }

  /* App-style memorial hero on mobile: full-bleed photo, centred title */
  .memorial-hero { padding: 0 0 44px; }
  .memorial-hero .hero-wrap { grid-template-columns: 1fr; gap: 0; padding-inline: 0; }
  .memorial-photo > img {
    aspect-ratio: auto; max-height: 480px; width: 100%;
    object-fit: cover;
    border-radius: 0; border: 0; box-shadow: none;
  }
  .age-badge { left: 20px; bottom: -30px; width: 100px; height: 100px; padding: 8px; }
  .age-badge .age { font-size: 1.5rem; }
  .age-badge .years { font-size: .66rem; }
  /* When a portrait exists, the real Share Memories FAB (with its QR modal)
     is rendered inside .memorial-photo instead of standalone — anchor it
     to the photo like the age badge, in place of its usual viewport-fixed
     position, so it scrolls away with the picture rather than floating
     over the whole page. Desktop is untouched: .fab-share stays fixed
     there regardless of where it sits in the DOM. */
  .memorial-photo .fab-share {
    position: absolute; right: 20px; bottom: 20px; left: auto; top: auto; z-index: 2;
  }
  .memorial-title { text-align: center; padding: 56px 24px 0; }
  .memorial-actions { justify-content: center; }
  .memorial-quote { margin-inline: auto; }
  .memorial-flourishes { justify-content: center; }
  .memorial-title .dove-divider { margin: 28px auto 0; }
}
@media (max-width: 560px) {
  .type-grid, .feature-grid, .product-grid, .dash-grid, .media-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .price-banner, .app-section { padding: 34px 26px; }
  .form-card { padding: 28px 22px; }
  .stat-grid { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 1fr 1.2fr; }
}

/* ---------- "What's new" landing page ---------- */
/* Sticky pill row under the sticky site-header (84px tall) so it stacks
   below it rather than overlapping. */
.jump-nav {
  position: sticky; top: 84px; z-index: 40;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.jump-nav .container { display: flex; gap: 6px; padding: 12px 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.jump-nav a {
  flex: 0 0 auto; padding: 8px 16px; border-radius: var(--pill);
  font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.jump-nav a:hover { background: var(--gold-tint); }
.jump-nav a.active { background: var(--gold); color: #fff; }

/* Then/now contrast rows — the honest "what changed" pairing used instead of
   old screenshots (the old WordPress site is retired, nothing to screenshot). */
.then-now { display: grid; gap: 10px; margin: 20px 0 30px; max-width: 44rem; }
.then-now .row { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; line-height: 1.5; }
.then-now .tag {
  flex: 0 0 68px; font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 4px 0; border-radius: var(--pill); text-align: center; margin-top: 1px;
}
.then-now .then .tag { background: #EFEDE7; color: var(--muted); }
.then-now .now .tag { background: var(--gold-tint); color: var(--gold-deep); }
.then-now p { margin: 0; color: var(--ink); }
.then-now .then p { color: var(--muted); text-decoration: line-through; text-decoration-color: #C9C6BD; }
