:root {
  --linen: #f4efe6;
  --parchment: #fffaf0;
  --paper: #fffdf8;
  --ink: #25231f;
  --soft-ink: #4d493f;
  --muted: #736c5f;
  --gold: #b98a3a;
  --gold-deep: #76531b;
  --olive: #66765f;
  --sage: #eef3ec;
  --clay: #a36f5f;
  --bluegrey: #60747a;
  --line: #e5d5bb;
  --line-strong: #cdb68f;
  --white: #ffffff;
  --shadow-soft: 0 18px 54px rgba(63, 50, 31, 0.1);
  --shadow-tight: 0 10px 30px rgba(43, 38, 27, 0.1);
  --admin-bg: #f4f1eb;
  --admin-panel: #fffefa;
  --admin-line: #ddd6ca;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(238,243,236,0.9), transparent 34%),
    linear-gradient(180deg, rgba(255,253,248,0.84), rgba(244,239,230,0.96)),
    var(--linen);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

h1, h2, h3 {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.02;
  margin: 0 0 14px;
}
h1 { font-size: clamp(48px, 7.5vw, 88px); }
h2 { font-size: clamp(32px, 4.8vw, 56px); }
h3 { font-size: 28px; }
p { margin: 0 0 14px; }

.eyebrow {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.site-header,
.admin-header {
  align-items: center;
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(183, 139, 61, 0.2);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 58px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand,
.admin-brand {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  text-decoration: none;
}
.brand span,
.admin-brand span { color: var(--gold-deep); }
.admin-brand em {
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.public-nav,
.admin-nav,
.row-actions,
.hero-actions,
.card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.public-nav {
  background: rgba(255,250,241,0.72);
  border: 1px solid rgba(183,139,61,0.18);
  border-radius: 999px;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 6px;
}

.public-nav a,
.admin-nav a,
.text-link,
.row-actions a {
  color: var(--gold-deep);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.public-nav a {
  border-radius: 999px;
  padding: 7px 9px;
}
.public-nav a:hover,
.public-nav a:focus-visible {
  background: rgba(183,139,61,0.12);
}

.button {
  align-items: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}
.button-primary {
  background: linear-gradient(135deg, #a97825, #d2ad68);
  color: #fff;
  box-shadow: 0 10px 24px rgba(151, 105, 27, 0.22);
}
.button-secondary {
  background: #eee4d4;
  color: var(--gold-deep);
}
.button-ghost {
  background: rgba(255, 250, 241, 0.16);
  border: 1px solid rgba(255, 250, 241, 0.55);
  color: var(--parchment);
}

.home-hero {
  display: grid;
  gap: clamp(28px, 5vw, 62px);
  grid-template-columns: minmax(0, 1fr);
  min-height: 720px;
  overflow: hidden;
  padding: 96px clamp(20px, 6vw, 100px) 108px;
  position: relative;
}
.home-hero::before {
  background:
    linear-gradient(90deg, rgba(23,22,20,0.72), rgba(35,34,30,0.34) 48%, rgba(35,34,30,0.06)),
    linear-gradient(180deg, rgba(23,22,20,0.08), rgba(23,22,20,0.3)),
    var(--hero-image);
  background-position: var(--hero-position);
  background-size: cover;
  border-bottom-left-radius: 45% 8%;
  border-bottom-right-radius: 45% 8%;
  content: "";
  inset: 0 0 54px;
  position: absolute;
  z-index: -2;
}
.hero-fade-layer {
  background-position: var(--hero-position);
  background-size: cover;
  border-bottom-left-radius: 45% 8%;
  border-bottom-right-radius: 45% 8%;
  inset: 0 0 54px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 520ms ease;
  z-index: -1;
}
.hero-fade-layer::after {
  background:
    linear-gradient(90deg, rgba(23,22,20,0.72), rgba(35,34,30,0.34) 48%, rgba(35,34,30,0.06)),
    linear-gradient(180deg, rgba(23,22,20,0.08), rgba(23,22,20,0.3));
  content: "";
  inset: 0;
  position: absolute;
}
.hero-fade-layer.is-visible {
  opacity: 1;
}
.home-hero::after {
  background: linear-gradient(180deg, transparent, rgba(244,239,230,0.95));
  bottom: 0;
  content: "";
  height: 180px;
  left: 0;
  position: absolute;
  right: 0;
  z-index: 0;
}
.home-hero-content {
  align-self: center;
  color: var(--parchment);
  max-width: 820px;
  position: relative;
  text-shadow: 0 2px 22px rgba(0,0,0,0.34);
  transition: opacity 260ms ease, transform 260ms ease;
  z-index: 1;
}
.home-hero-content.is-changing {
  opacity: 0;
  transform: translateY(6px);
}
.home-hero h1 { color: var(--parchment); }
.home-hero .eyebrow { color: #ead29f; }
.lead {
  color: rgba(255, 250, 241, 0.9);
  font-size: 20px;
  max-width: 710px;
}
.hero-arrow {
  align-items: center;
  background: rgba(255,253,248,0.18);
  border: 1px solid rgba(255,253,248,0.72);
  color: transparent;
  color: var(--parchment);
  cursor: pointer;
  display: flex;
  height: 50px;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  z-index: 2;
}
.hero-arrow::before {
  border-right: 2px solid var(--parchment);
  border-top: 2px solid var(--parchment);
  content: "";
  height: 13px;
  width: 13px;
}
.hero-arrow-left {
  left: 24px;
}
.hero-arrow-left::before {
  transform: rotate(-135deg);
}
.hero-arrow-right {
  right: 24px;
}
.hero-arrow-right::before {
  transform: rotate(45deg);
}
.hero-arrow:hover,
.hero-arrow:focus-visible {
  background: rgba(255,253,248,0.32);
}
.hero-dots {
  bottom: 76px;
  display: flex;
  gap: 7px;
  left: clamp(20px, 6vw, 100px);
  position: absolute;
  z-index: 2;
}
.hero-dot {
  background: rgba(255,253,248,0.48);
  border-radius: 999px;
  height: 8px;
  width: 8px;
}
.hero-dot.is-active {
  background: var(--parchment);
  width: 24px;
}

.showcase-card {
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(31, 26, 18, 0.28);
  color: var(--ink);
}
.memorial-preview {
  max-width: 360px;
  overflow: hidden;
  padding-bottom: 24px;
  text-align: center;
}
.preview-cover {
  background:
    linear-gradient(135deg, rgba(80,97,85,0.5), rgba(185,138,58,0.34)),
    url("https://images.pexels.com/photos/1919317/pexels-photo-1919317.jpeg?auto=compress&cs=tinysrgb&w=900");
  background-position: center;
  background-size: cover;
  height: 154px;
}
.preview-portrait {
  align-items: center;
  background: var(--olive);
  border: 7px solid var(--parchment);
  border-radius: 50%;
  box-shadow: var(--shadow-tight);
  color: #fff;
  display: flex;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 34px;
  font-weight: 700;
  height: 104px;
  justify-content: center;
  margin: -52px auto 12px;
  width: 104px;
}
.preview-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 0;
}
.memorial-preview span,
.qr-preview small {
  color: var(--muted);
  display: block;
}
.memorial-preview p:last-child {
  color: var(--muted);
  margin: 16px auto 0;
  max-width: 280px;
}
.qr-preview {
  padding: 20px;
  width: 210px;
}
.fake-qr {
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 14px;
  padding: 12px;
}
.fake-qr span {
  aspect-ratio: 1;
  background: #efe7da;
  border-radius: 2px;
}
.fake-qr .filled { background: var(--ink); }

.section,
.trust-band {
  padding: 66px clamp(20px, 6vw, 96px);
}
.section-heading {
  margin-bottom: 30px;
  max-width: 850px;
}
.steps-grid,
.memorial-card-grid,
.trust-grid,
.stat-grid {
  display: grid;
  gap: 22px;
}
.steps-grid,
.memorial-card-grid,
.trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.steps-grid article,
.memorial-card,
.content-card,
.qr-card,
.login-card,
.admin-panel,
.admin-form,
.stat-grid article,
.trust-grid article {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(183, 139, 61, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.steps-grid article,
.trust-grid article {
  position: relative;
  padding: 28px;
}
.steps-grid article::before,
.trust-grid article::before,
.content-card::before {
  background: linear-gradient(90deg, var(--gold), rgba(102,118,95,0.6));
  border-radius: 8px 8px 0 0;
  content: "";
  height: 3px;
  left: -1px;
  position: absolute;
  right: -1px;
  top: -1px;
}
.steps-grid article,
.trust-grid article,
.showcase-card,
.example-showcase-card,
.memorial-card,
.content-card,
.admin-panel,
.admin-form,
.stat-grid article,
.search-result-list a {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.steps-grid article:hover,
.trust-grid article:hover,
.showcase-card:hover,
.example-showcase-card:hover,
.example-showcase-card:focus-within,
.memorial-card:hover,
.content-card:hover,
.admin-panel:hover,
.admin-form:hover,
.stat-grid article:hover,
.search-result-list a:hover {
  border-color: rgba(183, 139, 61, 0.38);
  box-shadow: 0 22px 58px rgba(80, 61, 34, 0.16);
  transform: translateY(-3px);
}
.steps-grid span {
  align-items: center;
  background: var(--sage);
  border: 1px solid rgba(102,118,95,0.18);
  border-radius: 999px;
  color: var(--gold-deep);
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  margin-bottom: 18px;
  min-height: 38px;
  min-width: 46px;
  padding: 6px 11px;
}
.trust-band {
  background:
    linear-gradient(90deg, rgba(255,250,241,0.92), rgba(255,253,248,0.76)),
    linear-gradient(135deg, rgba(113,128,109,0.24), rgba(183,139,61,0.18));
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}
.trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trust-grid strong { color: var(--ink); }
.trust-grid p { color: var(--muted); margin-bottom: 0; }

.find-section {
  padding-top: 48px;
}
.find-panel {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255,253,248,0.98), rgba(238,243,236,0.74)),
    var(--paper);
  border: 1px solid rgba(183, 139, 61, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  padding: clamp(26px, 5vw, 46px);
}
.find-panel p {
  color: var(--muted);
}
.contact-page {
  padding-top: clamp(42px, 7vw, 78px);
}
.contact-panel {
  align-items: start;
  margin-left: auto;
  margin-right: auto;
  max-width: 980px;
}
.contact-intro {
  min-width: 0;
}
.contact-panel h1 {
  font-size: clamp(44px, 6vw, 74px);
}
.contact-panel .contact-email {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}
.contact-email a {
  overflow-wrap: anywhere;
}
.find-form {
  background: rgba(255, 250, 241, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 20px;
}
.form-honeypot {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}
.pricing-hero {
  padding-bottom: 34px;
}
.pricing-hero-copy {
  background:
    linear-gradient(135deg, rgba(255,253,248,0.94), rgba(238,243,236,0.72)),
    var(--paper);
  border: 1px solid rgba(183, 139, 61, 0.2);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  margin: 0 auto;
  max-width: 980px;
  padding: clamp(30px, 6vw, 62px);
  text-align: center;
}
.pricing-hero h1 {
  margin-left: auto;
  margin-right: auto;
  max-width: 840px;
}
.pricing-hero p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  margin-left: auto;
  margin-right: auto;
  max-width: 700px;
}
.pricing-section {
  padding-top: 26px;
}
.pricing-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pricing-grid-single {
  grid-template-columns: minmax(0, 620px);
  justify-content: center;
}
.pricing-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1060px;
}
.example-card-grid {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}
.example-showcase-section {
  padding-top: 24px;
}
.example-showcase-card {
  background: rgba(255,253,248,0.96);
  border: 1px solid rgba(183,139,61,0.22);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  margin: 0 auto;
  max-width: 760px;
  overflow: hidden;
  padding-bottom: 30px;
  text-align: center;
}
.example-showcase-cover {
  background:
    linear-gradient(180deg, rgba(25,24,21,0.1), rgba(25,24,21,0.28)),
    url("/images/generic-cover-photo-1.png");
  background-position: center;
  background-size: cover;
  height: 260px;
}
.example-showcase-portrait {
  background: var(--paper);
  border: 7px solid var(--paper);
  border-radius: 50%;
  box-shadow: var(--shadow-tight);
  height: 132px;
  margin: -66px auto 14px;
  overflow: hidden;
  position: relative;
  width: 132px;
}
.example-showcase-portrait img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.example-showcase-copy {
  margin: 0 auto 22px;
  max-width: 520px;
  padding: 0 22px;
}
.example-showcase-copy h2 {
  font-size: clamp(34px, 5vw, 48px);
}
.example-epitaph {
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-style: italic;
}
.example-gallery {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto 24px;
  max-width: 620px;
  padding: 0 22px;
}
.example-gallery img {
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  transition: filter 180ms ease, transform 180ms ease;
  width: 100%;
}
.example-gallery img:hover {
  filter: saturate(1.05) contrast(1.03);
  transform: translateY(-2px);
}
.pricing-card {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(183, 139, 61, 0.2);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 4vw, 34px);
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.pricing-card::before {
  background: linear-gradient(90deg, var(--gold), rgba(102,118,95,0.62));
  border-radius: 8px 8px 0 0;
  content: "";
  height: 3px;
  left: -1px;
  position: absolute;
  right: -1px;
  top: -1px;
}
.pricing-card:hover,
.pricing-card:focus-within {
  border-color: rgba(183, 139, 61, 0.38);
  box-shadow: 0 22px 58px rgba(80, 61, 34, 0.16);
  transform: translateY(-3px);
}
.pricing-card-featured {
  background:
    linear-gradient(180deg, rgba(255,253,248,0.98), rgba(255,250,241,0.96)),
    var(--paper);
  border-color: rgba(183, 139, 61, 0.42);
}
.pricing-kicker {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}
.pricing-card h2 {
  font-size: clamp(30px, 4vw, 42px);
  margin-bottom: 0;
}
.price {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(48px, 7vw, 66px);
  font-weight: 700;
  line-height: 1;
  margin: 2px 0;
}
.pricing-card p:not(.pricing-kicker):not(.price) {
  color: var(--muted);
}
.renewal-note,
.upgrade-note {
  background: rgba(255,250,241,0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}
.pricing-card ul {
  color: var(--soft-ink);
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 4px 0 12px;
  padding: 0;
}
.pricing-card li {
  padding-left: 22px;
  position: relative;
}
.pricing-card li::before {
  background: var(--olive);
  border-radius: 50%;
  content: "";
  height: 7px;
  left: 0;
  position: absolute;
  top: 0.72em;
  width: 7px;
}
.pricing-card .button {
  margin-top: auto;
}
.pricing-notes {
  padding-top: 28px;
}
.pricing-note-list {
  display: grid;
  gap: 12px;
}
.pricing-note-list article {
  background: rgba(255,250,241,0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.pricing-note-list article:hover,
.pricing-note-list article:focus-within {
  border-color: rgba(183, 139, 61, 0.38);
  box-shadow: 0 18px 42px rgba(80, 61, 34, 0.13);
  transform: translateY(-3px);
}
.pricing-note-list strong {
  color: var(--ink);
}
.pricing-note-list p {
  margin-bottom: 0;
}
.request-panel {
  align-items: start;
}
.order-options {
  display: grid;
  gap: 12px;
}
.order-option {
  align-items: center;
  background: rgba(255,250,241,0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 18px;
  grid-template-columns: auto 1fr;
  padding: 18px;
}
.order-option:has(input:checked) {
  border-color: rgba(183, 139, 61, 0.65);
  box-shadow: var(--shadow-tight);
}
.order-option input {
  height: 18px;
  margin: 0;
  width: 18px;
}
.order-option span {
  color: var(--muted);
  display: grid;
  gap: 4px;
}
.order-option strong {
  font-size: 18px;
}
.order-option strong,
.order-option em {
  color: var(--ink);
  font-style: normal;
}
.order-summary p {
  margin-bottom: 4px;
}
.request-submit-button {
  justify-self: start;
}
.request-price,
.request-summary-card {
  background: rgba(255,250,241,0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 22px;
  padding: 18px;
}
.request-price span {
  color: var(--ink);
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}
.request-price small {
  color: var(--muted);
  display: block;
  font-weight: 700;
  margin-top: 6px;
}
.request-summary-card {
  display: grid;
  gap: 12px;
}
.request-summary-card .price {
  margin-bottom: 0;
}
.thank-you-card .button {
  margin-top: 12px;
}
.details-page {
  padding: clamp(34px, 6vw, 78px) 20px;
}
.details-panel {
  display: block;
  margin: 0 auto;
  max-width: 880px;
}
.details-intro {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 26px;
  max-width: 720px;
  text-align: center;
}
.details-intro h1 {
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.98;
}
.details-intro p:not(.eyebrow) {
  font-size: 18px;
}
.details-form {
  gap: 18px;
  margin: 0 auto;
  max-width: 720px;
  padding: 0;
  background: transparent;
  border: 0;
}
.details-form-section {
  background: rgba(255,250,241,0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: clamp(18px, 4vw, 26px);
}
.details-date-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.permission-check {
  align-items: flex-start;
}
.search-results-page {
  min-height: 70vh;
  padding: clamp(34px, 6vw, 78px) 20px;
}
.search-results-card {
  margin: 0 auto;
  max-width: 760px;
}
.search-result-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}
.search-result-list a {
  background: rgba(246,239,227,0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 82px 1fr;
  padding: 16px;
  text-decoration: none;
}
.search-result-image {
  background: var(--olive);
  border: 4px solid rgba(255,250,241,0.92);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(80,61,34,0.14);
  display: grid;
  height: 82px;
  overflow: hidden;
  place-items: center;
  width: 82px;
}
.search-result-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.search-result-image span {
  color: #fff;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 800;
}
.search-result-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.search-result-list strong {
  color: var(--ink);
  font-size: 20px;
}
.search-result-list span,
.search-result-list small {
  color: var(--muted);
}
.search-result-list small {
  font-size: 13px;
  font-weight: 800;
}
.search-result-list p {
  color: var(--soft-ink);
  margin: 6px 0 0;
}
.search-again-link {
  display: inline-block;
  margin-top: 22px;
}

.service-section {
  padding-top: 36px;
}
.service-section .section-heading {
  background: rgba(255, 253, 248, 0.7);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  max-width: 1040px;
  padding: clamp(22px, 4vw, 34px);
}

.memorial-card { overflow: hidden; }
.memorial-card-image {
  background-position: center;
  background-size: cover;
  min-height: 230px;
}
.generated-cover {
  background:
    linear-gradient(180deg, rgba(45,41,34,0.06), rgba(45,41,34,0.32)),
    url("/images/generic-cover-photo-1.png");
  background-position: center;
  background-size: cover;
}
.memorial-card-body { padding: 26px; }
.card-kicker {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.dates,
.memorial-dates,
.muted,
.hint {
  color: var(--muted);
}
.subtle-link { color: var(--muted); }

.memorial-hero { text-align: center; }
.preview-banner {
  background: #efe4cf;
  border-bottom: 1px solid var(--line);
  color: var(--gold-deep);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  text-align: center;
  text-transform: uppercase;
}
.cover-wave {
  background-position: center;
  background-size: cover;
  border-bottom-left-radius: 50% 12%;
  border-bottom-right-radius: 50% 12%;
  height: clamp(300px, 44vw, 500px);
  position: relative;
}
.cover-wave::after {
  background: linear-gradient(180deg, rgba(45,41,34,0.12), rgba(45,41,34,0.42));
  content: "";
  inset: 0;
  position: absolute;
}
.memorial-identity {
  margin: -98px auto 0;
  max-width: 900px;
  padding: 0 20px 34px;
  position: relative;
}
.content-card {
  position: relative;
  overflow: hidden;
}
.portrait {
  background: var(--olive);
  border: 8px solid var(--parchment);
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  display: grid;
  height: 184px;
  margin: 0 auto 22px;
  overflow: hidden;
  place-items: center;
  width: 184px;
}
.portrait img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}
.portrait span {
  color: #fff;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 56px;
  font-weight: 700;
}
.epitaph {
  color: var(--soft-ink);
  font-size: 20px;
  margin: 0 auto 20px;
  max-width: 760px;
}
.memorial-meta-strip {
  align-items: center;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-tight);
  color: var(--muted);
  display: inline-flex;
  flex-wrap: wrap;
  font-weight: 700;
  gap: 10px;
  justify-content: center;
  padding: 10px 18px;
}
.memorial-meta-strip span + span::before {
  color: var(--gold);
  content: "/";
  margin-right: 10px;
}
.memorial-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 18px auto 0;
}
.memorial-quick-actions a {
  background: linear-gradient(135deg, #a97825, #d2ad68);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(151, 105, 27, 0.16);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  padding: 10px 14px;
  text-decoration: none;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 14px 20px 12px;
}
.tabs a {
  background: rgba(255,253,248,0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-deep);
  font-weight: 800;
  padding: 10px 18px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.tabs a:hover,
.tabs a:focus-visible {
  background: #fff;
  border-color: rgba(183,139,61,0.38);
  transform: translateY(-1px);
}
.memorial-content {
  margin: 0 auto;
  max-width: 1060px;
  padding: 24px 20px;
}
.content-card { padding: clamp(26px, 5vw, 46px); }
.card-heading {
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  padding-bottom: 12px;
}
.story-text {
  color: var(--soft-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.32;
}
.family-connections-card {
  background:
    linear-gradient(135deg, rgba(255,253,248,0.96), rgba(238,243,236,0.68)),
    var(--paper);
}
.family-connections-list {
  display: grid;
  gap: 10px;
}
.family-connections-list p {
  color: var(--muted);
  font-size: 17px;
  margin: 0;
}
.family-connections-list a {
  color: var(--gold-deep);
  font-weight: 900;
  text-decoration-color: rgba(118, 83, 27, 0.32);
  text-underline-offset: 4px;
}
.gallery-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.empty-state {
  background: linear-gradient(135deg, rgba(238,243,236,0.7), rgba(255,250,241,0.86));
  border: 1px dashed rgba(183,139,61,0.34);
  border-radius: 8px;
  color: var(--muted);
  padding: 22px;
}
.empty-state span {
  color: var(--gold-deep);
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.empty-state p {
  margin: 0;
}
.gallery-empty {
  grid-column: 1 / -1;
}
figure { margin: 0; }
.gallery-open {
  background: transparent;
  border: 0;
  cursor: zoom-in;
  display: block;
  padding: 0;
  width: 100%;
}
.image-lightbox-open,
.tribute-photo-button {
  background: transparent;
  border: 0;
  cursor: zoom-in;
  display: block;
  margin: 0 0 14px;
  padding: 0;
  text-align: left;
  width: fit-content;
}
.gallery-grid img,
.gallery-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  transition: filter 180ms ease, transform 180ms ease;
  width: 100%;
}
.gallery-open:hover img,
.gallery-open:focus-visible img,
.image-lightbox-open:hover img,
.image-lightbox-open:focus-visible img {
  filter: saturate(1.05) contrast(1.03);
  transform: translateY(-2px);
}
.gallery-open:focus-visible,
.image-lightbox-open:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(183,139,61,0.35);
  outline-offset: 4px;
}
.gallery-placeholder {
  background: linear-gradient(135deg, #c5aa79, #71806d);
}
figcaption {
  color: var(--muted);
  margin-top: 8px;
}
.lightbox-open {
  overflow: hidden;
}
.gallery-lightbox {
  align-items: center;
  background: rgba(24, 22, 18, 0.88);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 20px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  inset: 0;
  opacity: 0;
  padding: 72px clamp(18px, 5vw, 64px) 34px;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 60;
}
.gallery-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.gallery-lightbox-frame {
  display: grid;
  gap: 12px;
  justify-items: center;
  min-width: 0;
}
.gallery-lightbox-frame img {
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0,0,0,0.42);
  max-height: min(72vh, 760px);
  max-width: 100%;
  object-fit: contain;
}
.gallery-lightbox-frame figcaption {
  color: #fffaf1;
  font-size: 16px;
  margin: 0;
  max-width: 760px;
  text-align: center;
}
.gallery-lightbox-frame p {
  color: rgba(255,250,241,0.74);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}
.gallery-close,
.gallery-nav {
  background: rgba(255,250,241,0.96);
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}
.gallery-close {
  font-size: 30px;
  height: 46px;
  line-height: 1;
  position: fixed;
  right: 22px;
  top: 20px;
  width: 46px;
}
.gallery-nav {
  padding: 12px 16px;
}
.single-image-frame {
  grid-column: 2;
}
.tribute {
  background:
    linear-gradient(135deg, rgba(255,253,248,0.98), rgba(246,239,227,0.72)),
    var(--paper);
  border: 1px solid rgba(183,139,61,0.24);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(80, 61, 34, 0.08);
  margin-bottom: 18px;
  padding: 22px;
  position: relative;
}
.tribute::before {
  background: var(--gold);
  border-radius: 8px 0 0 8px;
  bottom: 14px;
  content: "";
  left: -1px;
  position: absolute;
  top: 14px;
  width: 3px;
}
.tribute > p {
  font-size: 18px;
  line-height: 1.65;
}
.tribute-photo {
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  margin-bottom: 14px;
  object-fit: cover;
  width: min(100%, 560px);
}
.tribute > div {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.report-toggle {
  background: transparent;
  border: 0;
  color: var(--gold-deep);
  cursor: pointer;
  font-weight: 800;
}
.report-form {
  display: none;
  gap: 12px;
  margin-top: 14px;
}
.report-form.is-open { display: grid; }
.tribute-form {
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin-top: 38px;
  padding: 24px;
  position: relative;
}
.tribute-form::before {
  background: var(--line);
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
  top: -20px;
}
.tribute-form p { color: var(--muted); }
.family-cta-card {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255,253,248,0.96), rgba(239,230,214,0.86)),
    var(--paper);
  display: flex;
  gap: 22px;
  justify-content: space-between;
}
.family-cta-card p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}
.detail-grid {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}
.detail-actions {
  align-items: flex-end;
  display: grid;
  gap: 10px;
  justify-items: end;
  max-width: 320px;
  text-align: right;
}
.detail-actions p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.location-card-grid {
  align-items: stretch;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(280px, 1fr) minmax(210px, 0.46fr);
  margin-top: 18px;
  max-width: 620px;
}
.w3w-box,
.map-box {
  align-content: start;
  background: rgba(246,239,227,0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}
.w3w-box span,
.map-box span {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.w3w-box a {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}
.map-box p {
  color: var(--soft-ink);
  margin: 0;
}
.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.map-button {
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-deep);
  font-size: 14px;
  font-weight: 900;
  padding: 8px 12px;
  text-decoration: none;
}
.share-location-button {
  background: transparent;
  border: 0;
  color: var(--gold-deep);
  cursor: pointer;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

label {
  color: var(--muted);
  display: grid;
  font-weight: 800;
  gap: 7px;
}
.field-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.image-control {
  display: grid;
  gap: 12px;
}
.current-image-preview {
  background: rgba(246,239,227,0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}
.current-image-preview img {
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}
.portrait-preview img {
  aspect-ratio: 1;
  max-width: 160px;
}
.cover-preview img {
  aspect-ratio: 2 / 1;
}
input,
textarea,
select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 12px 13px;
  width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(183,139,61,0.14);
  outline: none;
}

.flash {
  border-radius: 8px;
  font-weight: 800;
  margin: 18px auto;
  max-width: 980px;
  padding: 13px 18px;
}
.inline-flash {
  margin: 18px 0;
  max-width: none;
}
.flash-success {
  background: #e9f4e7;
  color: #3d6d35;
}
.flash-error {
  background: #f8e6df;
  color: #9d4b34;
}

.qr-page,
.login-page,
.family-login-page,
.not-found {
  display: grid;
  min-height: 70vh;
  padding: 44px 20px;
  place-items: center;
}
.not-found {
  align-content: center;
  gap: 18px;
  margin: 0 auto;
  max-width: 860px;
  text-align: center;
}
.not-found h1 {
  font-size: clamp(44px, 6vw, 74px);
  margin: 0 auto 10px;
  max-width: 760px;
}
.not-found p:not(.eyebrow) {
  color: var(--soft-ink);
  margin: 0 auto 24px;
  max-width: 460px;
}
.not-found .button {
  justify-self: center;
}
.qr-card,
.login-card,
.family-login-card {
  padding: clamp(26px, 5vw, 48px);
  text-align: center;
  width: min(620px, 100%);
}
.qr-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.family-login-card {
  background: rgba(255, 253, 248, 0.95);
  border: 1px solid rgba(183, 139, 61, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}
.family-login-card form {
  display: grid;
  gap: 14px;
  margin: 24px 0;
  text-align: left;
}
.security-note {
  background: rgba(246,239,227,0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  padding: 12px;
}
.family-hero {
  background:
    linear-gradient(135deg, rgba(45,41,34,0.78), rgba(45,41,34,0.48)),
    linear-gradient(135deg, #61735f, #c3a06d 62%, #efe1cc);
  color: var(--parchment);
  padding: clamp(58px, 9vw, 110px) 20px;
  text-align: center;
}
.family-hero h1,
.family-hero .eyebrow {
  color: var(--parchment);
}
.family-hero p {
  color: rgba(255, 250, 241, 0.86);
  font-size: 20px;
}
.private-tribute {
  background: rgba(255,250,241,0.9);
  border-left: 4px solid var(--gold);
}
.private-tribute span {
  color: var(--muted);
  font-size: 14px;
}
.qr-image {
  margin: 24px auto;
  width: 340px;
}
.qr-url {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-body {
  background:
    linear-gradient(180deg, rgba(244,241,235,0.94), rgba(239,234,225,1)),
    var(--admin-bg);
  color: #25251f;
}
.admin-header {
  background: rgba(255,255,255,0.88);
  border-bottom-color: var(--admin-line);
}
.admin-nav form,
.row-actions form { margin: 0; }
.admin-nav button,
.row-actions button,
.admin-gallery button {
  background: transparent;
  border: 0;
  color: #8d4f3f;
  cursor: pointer;
  font-weight: 800;
  padding: 0;
}
.admin-main {
  margin: 0 auto;
  max-width: 1220px;
  padding: 34px 20px 70px;
}
.admin-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255,253,248,0.96), rgba(239,230,214,0.9)),
    var(--admin-panel);
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  box-shadow: var(--shadow-tight);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 22px;
  padding: clamp(24px, 4vw, 38px);
}
.admin-hero.compact h1 { font-size: clamp(36px, 5vw, 58px); }
.admin-hero p {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 680px;
}
.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}
.stat-grid article {
  background: var(--admin-panel);
  padding: 22px;
}
.stat-grid span {
  color: var(--gold-deep);
  display: block;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-grid p { color: var(--muted); margin: 0; }
.admin-panel,
.admin-form {
  background: var(--admin-panel);
  border-color: var(--admin-line);
  margin-bottom: 22px;
  padding: 24px;
}
.panel-heading {
  align-items: center;
  border-bottom: 1px solid var(--admin-line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
}
.panel-heading.slim { margin-top: 8px; }
.admin-table {
  display: grid;
  gap: 10px;
}
.compact-table {
  margin-top: 18px;
}
.visit-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}
.visit-summary-grid article {
  background: rgba(255,250,241,0.72);
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  padding: 18px;
}
.visit-summary-grid strong {
  color: var(--ink);
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 42px;
  line-height: 1;
}
.visit-summary-grid span {
  color: var(--muted);
  font-weight: 800;
}
.visit-counts {
  min-width: 112px;
  text-align: right;
}
.visit-counts strong {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 32px;
  line-height: 1;
}
.visit-counts span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.muted-count strong,
.muted-count span {
  color: #7f8179;
}
.visit-note {
  margin: 14px 0 0;
}
.enquiry-status-line {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 10px 0;
}
.admin-records-panel summary {
  cursor: pointer;
  list-style: none;
}
.admin-records-panel summary::-webkit-details-marker {
  display: none;
}
.admin-records-panel summary > span {
  color: var(--muted);
  font-weight: 800;
}
.admin-records-panel[open] summary {
  margin-bottom: 18px;
}
.section-action {
  margin-bottom: 16px;
}
.admin-row,
.moderation-card {
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  padding: 16px;
}
.admin-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.admin-row-main {
  align-items: center;
  display: flex;
  gap: 13px;
  min-width: 0;
}
.admin-row strong { display: block; }
.admin-row span,
.moderation-card span {
  color: #6c6f66;
  display: block;
  overflow-wrap: anywhere;
}
.mini-avatar {
  align-items: center;
  background: #e9dfcd;
  border: 1px solid #d7c6a8;
  border-radius: 50%;
  color: var(--gold-deep);
  display: flex;
  flex: 0 0 auto;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  height: 48px;
  justify-content: center;
  width: 48px;
}
.status-chip {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  text-transform: uppercase;
}
.status-chip.is-live {
  background: #e7f2e5;
  color: #3e7434;
}
.status-chip.is-paused {
  background: #efe8dd;
  color: #85663a;
}
.moderation-card {
  border-left: 4px solid var(--gold);
  margin-top: 12px;
}
.moderation-photo {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: cover;
  width: min(100%, 420px);
}
.report-card { border-left-color: var(--clay); }
.private-admin-card { border-left-color: var(--olive); }
.enquiry-card { border-left-color: var(--bluegrey); }
.admin-address-block {
  background: #fbf6ed;
  border: 1px solid #e8d8bd;
  border-radius: 8px;
  margin: 12px 0;
  padding: 12px 14px;
}
.admin-address-block pre {
  color: var(--ink);
  font-family: inherit;
  line-height: 1.55;
  margin: 8px 0 0;
  white-space: pre-wrap;
}
.payment-card.is-overdue {
  background: #fff8ed;
  border-color: #e7b75d;
  border-left-color: #c98819;
}
.payment-card.is-cancelled {
  background: #fff4f1;
  border-color: #e4a293;
  border-left-color: #b2412c;
}
.payment-card.is-manually-closed {
  background: #fff0ec;
  border-color: #d37c68;
  border-left-color: #912f20;
  box-shadow: 0 20px 45px rgba(145, 47, 32, 0.12);
}
.payment-card.is-cancelled .payment-status-label {
  color: #a83320;
  font-weight: 900;
}
.payment-card.is-manually-closed .payment-status-label {
  color: #912f20;
  font-weight: 900;
}
.payment-card.is-overdue .payment-status-label {
  color: #9b6111;
  font-weight: 900;
}
.payment-alert {
  border-radius: 8px;
  font-weight: 900;
  margin-bottom: 14px;
  padding: 12px 14px;
}
.payment-alert-danger {
  background: #f8ddd7;
  color: #8f2c1d;
}
.payment-alert-warning {
  background: #f7e8c9;
  color: #83520e;
}
.payment-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 18px;
}
.payment-filter-tabs a {
  align-items: center;
  background: #f7efe2;
  border: 1px solid #e3d2b6;
  border-radius: 999px;
  color: var(--gold-deep);
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  padding: 9px 13px;
  text-decoration: none;
}
.payment-filter-tabs a.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.payment-filter-tabs span {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  color: inherit;
  min-width: 24px;
  padding: 2px 7px;
  text-align: center;
}
.admin-inline-action {
  background: #eee4d4;
  border-radius: 999px;
  color: var(--gold-deep);
  display: inline-flex;
  font-weight: 900;
  margin-top: 4px;
  padding: 9px 13px;
  text-decoration: none;
}
.details-admin-panel {
  background: #fffaf1;
  border: 1px solid #eadcc3;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 16px;
}
.details-admin-heading {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}
.details-admin-heading p {
  color: #6c6f66;
  margin: 4px 0 0;
}
.details-link-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.details-link-row .admin-inline-action {
  margin-top: 0;
}
.details-link-row input {
  background: #fff;
  border: 1px solid #dfcfb3;
  border-radius: 6px;
  color: #62665f;
  font: inherit;
  padding: 10px;
  width: 100%;
}
.submitted-details {
  background: #fbf7ee;
  border: 1px solid #e7d8bd;
  border-radius: 8px;
  margin: 12px 0;
  padding: 0;
}
.submitted-details summary {
  align-items: center;
  color: var(--gold-deep);
  cursor: pointer;
  display: flex;
  font-weight: 900;
  justify-content: space-between;
  padding: 16px;
}
.submitted-details summary small {
  color: #6c6f66;
  font-size: 13px;
}
.submitted-details-section {
  border-top: 1px solid #eadcc3;
  padding: 16px;
}
.submitted-details-section h4 {
  color: var(--ink);
  font-size: 18px;
  margin: 0 0 10px;
}
.submitted-details dl {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}
.submitted-details dl div {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid #eee2ce;
  border-radius: 8px;
  padding: 10px;
}
.submitted-details dl div.full {
  grid-column: 1 / -1;
}
.submitted-details dt {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.submitted-details dd {
  color: var(--ink);
  margin: 0;
  overflow-wrap: anywhere;
}
.submitted-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.submitted-photo-list a {
  background: #eee4d4;
  border-radius: 999px;
  color: var(--gold-deep);
  font-weight: 900;
  padding: 8px 12px;
  text-decoration: none;
}
.stripe-webhook-log {
  background: #fffaf1;
  border: 1px solid #e6d7bc;
  border-radius: 8px;
  margin-top: 18px;
  padding: 16px;
}
.stripe-webhook-log h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}
.stripe-webhook-log p {
  align-items: center;
  border-top: 1px solid #eadcc3;
  display: grid;
  gap: 8px;
  grid-template-columns: 100px 1fr auto;
  margin: 0;
  padding: 10px 0;
}
.stripe-webhook-log p:first-of-type {
  border-top: 0;
}
.stripe-webhook-log small {
  color: var(--muted);
}
.webhook-matched {
  color: #2f6f39;
}
.webhook-unmatched {
  color: #a83320;
}
@media (max-width: 700px) {
  .stripe-webhook-log p {
    grid-template-columns: 1fr;
  }
}
.enquiry-card.is-closed {
  opacity: 0.82;
}
.status-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.status-form button {
  background: #eee4d4;
  border: 0;
  border-radius: 999px;
  color: var(--gold-deep);
  cursor: pointer;
  font-weight: 900;
  padding: 9px 13px;
}
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}
.admin-form {
  display: grid;
  gap: 16px;
}
.checkbox-label {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 10px;
}
.checkbox-label input { width: auto; }
.family-admin-box {
  background: #fff;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}
.family-admin-box p {
  color: var(--muted);
  margin: 0;
}
.connection-grid {
  display: grid;
  gap: 12px;
}
.connection-row {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(160px, 0.45fr) minmax(220px, 1fr);
}
.gallery-upload {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr auto;
}
.admin-gallery {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}
.admin-gallery article {
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  padding: 10px;
}
.admin-gallery img {
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.login-shell {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  max-width: 1040px;
  width: 100%;
}
.login-intro {
  align-self: center;
  background:
    linear-gradient(135deg, rgba(50,48,41,0.82), rgba(50,48,41,0.58)),
    linear-gradient(135deg, #65765f, #b9935c 60%, #efe1cc);
  border-radius: 8px;
  color: var(--parchment);
  min-height: 430px;
  padding: clamp(28px, 5vw, 48px);
}
.login-intro h1,
.login-intro .eyebrow { color: var(--parchment); }
.login-intro p { color: rgba(255,250,241,0.86); }
.login-card {
  align-self: center;
  background: #fff;
  text-align: left;
}

.site-footer,
.admin-footer {
  color: var(--muted);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 18px clamp(20px, 6vw, 96px);
}
.footer-brand {
  display: inline-block;
  font-size: 22px;
  margin-bottom: 0;
}
.footer-meta {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-meta p { margin: 0; }
.footer-meta a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.footer-meta a:hover { color: var(--gold-deep); }
.legal-page {
  padding-top: clamp(34px, 6vw, 72px);
}
.legal-panel {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-tight);
  margin: 0 auto;
  max-width: 940px;
  padding: clamp(28px, 5vw, 58px);
}
.legal-panel h1 {
  font-size: clamp(42px, 8vw, 78px);
  margin-bottom: 8px;
}
.legal-panel h2 {
  font-family: var(--font-serif);
  font-size: clamp(25px, 4vw, 34px);
  margin: 34px 0 10px;
}
.legal-panel p,
.legal-panel li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}
.legal-panel ul {
  margin: 12px 0 20px;
  padding-left: 22px;
}
.legal-panel a {
  color: var(--gold-deep);
  font-weight: 700;
}
.legal-updated {
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  padding-bottom: 22px;
}
.admin-footer {
  border-top: 1px solid var(--admin-line);
  justify-content: center;
  padding: 24px;
}

@media (max-width: 900px) {
  .home-hero,
  .trust-band,
  .login-shell,
  .find-panel {
    grid-template-columns: 1fr;
  }
  .steps-grid,
  .memorial-card-grid,
  .trust-grid,
  .pricing-grid,
  .visit-summary-grid,
  .gallery-grid,
  .stat-grid,
  .admin-gallery {
    grid-template-columns: 1fr;
  }
  .admin-row {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .steps-grid article:hover,
  .trust-grid article:hover,
  .showcase-card:hover,
  .example-showcase-card:hover,
  .memorial-card:hover,
  .content-card:hover,
  .admin-panel:hover,
  .admin-form:hover,
  .stat-grid article:hover,
  .pricing-card:hover,
  .example-gallery img:hover,
  .search-result-list a:hover {
    transform: none;
  }
  .site-header,
  .admin-header,
  .admin-hero,
  .detail-grid,
  .detail-actions,
  .family-cta-card,
  .site-footer,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    justify-items: start;
    text-align: left;
  }
  .public-nav,
  .admin-nav { gap: 10px; }
  .footer-meta { align-items: flex-start; }
  .section,
  .trust-band {
    padding-left: 20px;
    padding-right: 20px;
  }
  .section-heading,
  .trust-band > div:first-child {
    margin-left: auto;
    margin-right: auto;
    max-width: 330px;
    text-align: center;
  }
  .steps-grid,
  .trust-grid {
    margin-left: auto;
    margin-right: auto;
    max-width: 330px;
    width: 100%;
  }
  .steps-grid article,
  .trust-grid article {
    text-align: left;
  }
  .find-panel {
    justify-items: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 330px;
    padding: 24px;
    text-align: center;
  }
  .find-panel > div {
    max-width: 100%;
  }
  .find-form {
    text-align: left;
    width: 100%;
  }
  .request-page {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 24px;
  }
  .request-panel {
    gap: 18px;
    max-width: 390px;
    padding: 22px 16px;
    text-align: left;
  }
  .request-panel > div:first-child {
    text-align: center;
  }
  .request-panel h1 {
    font-size: 40px;
    line-height: 1.04;
  }
  .request-panel p {
    font-size: 15px;
    line-height: 1.58;
  }
  .request-panel .find-form {
    gap: 12px;
    padding: 14px;
  }
  .order-options {
    gap: 10px;
  }
  .order-option {
    align-items: flex-start;
    gap: 12px;
    grid-template-columns: 20px minmax(0, 1fr);
    padding: 16px 14px;
  }
  .order-option input {
    margin-top: 4px;
  }
  .order-option span {
    font-size: 14px;
    line-height: 1.5;
  }
  .order-option strong {
    font-size: 17px;
    line-height: 1.25;
  }
  .order-option em {
    font-size: 15px;
  }
  .request-summary-card {
    margin-top: 4px;
    padding: 14px;
  }
  .request-panel input,
  .request-panel textarea {
    padding: 11px 12px;
  }
  .details-page {
    padding-left: 14px;
    padding-right: 14px;
  }
  .details-panel {
    max-width: 100%;
    padding: 22px 14px;
  }
  .details-intro {
    margin-bottom: 20px;
    max-width: 100%;
  }
  .details-intro h1 {
    font-size: 42px;
  }
  .details-intro p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1.62;
  }
  .details-date-grid {
    grid-template-columns: 1fr;
  }
  .details-form-section {
    padding: 16px;
  }
  .details-form input,
  .details-form textarea,
  .details-form select {
    min-width: 0;
    width: 100%;
  }
  .details-admin-heading,
  .details-link-row {
    grid-template-columns: 1fr;
  }
  .details-admin-heading {
    display: grid;
  }
  .submitted-details summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .submitted-details dl {
    grid-template-columns: 1fr;
  }
  .contact-page {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 34px;
  }
  .contact-panel {
    gap: 20px;
    max-width: 360px;
    padding: 22px 16px;
    text-align: center;
    width: 100%;
  }
  .contact-panel h1 {
    font-size: 42px;
    line-height: 1.02;
    margin-left: auto;
    margin-right: auto;
    max-width: 280px;
  }
  .contact-panel p:not(.eyebrow) {
    font-size: 15px;
    line-height: 1.55;
  }
  .contact-panel .contact-email {
    display: grid;
    gap: 2px;
    justify-content: center;
  }
  .contact-email a {
    font-size: 14px;
    line-height: 1.35;
  }
  .contact-panel .find-form {
    padding: 16px;
  }
  .contact-panel input,
  .contact-panel textarea {
    padding: 11px 12px;
  }
  .contact-panel input::placeholder,
  .contact-panel textarea::placeholder {
    font-size: 14px;
  }
  .not-found {
    min-height: auto;
    padding: 58px 24px 68px;
  }
  .not-found h1 {
    font-size: 40px;
    line-height: 1.08;
    max-width: 310px;
  }
  .not-found p:not(.eyebrow) {
    font-size: 15px;
    line-height: 1.55;
    max-width: 292px;
  }
  .not-found .button {
    margin-top: 8px;
  }
  .qr-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .request-submit-button {
    justify-self: center;
    min-height: 42px;
    padding: 9px 18px;
    width: auto;
  }
  .pricing-hero-copy {
    padding: 28px 22px;
    text-align: center;
  }
  .pricing-hero h1 {
    font-size: 36px;
  }
  .pricing-grid {
    margin-left: auto;
    margin-right: auto;
    max-width: 330px;
  }
  .example-showcase-card {
    max-width: 330px;
  }
  .example-showcase-cover {
    height: 180px;
  }
  .example-showcase-portrait {
    height: 112px;
    margin-top: -56px;
    width: 112px;
  }
  .example-gallery {
    gap: 10px;
    grid-template-columns: 1fr;
    max-width: 240px;
  }
  .pricing-card {
    padding: 24px;
  }
  .trust-band {
    gap: 24px;
  }
  .site-header {
    align-items: center;
    padding: 18px 18px;
    text-align: center;
  }
  .brand,
  .admin-brand {
    font-size: 30px;
  }
  .public-nav a,
  .admin-nav a {
    font-size: 13px;
  }
  .public-nav,
  .admin-nav {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .brand,
  .admin-brand {
    text-align: center;
    width: 100%;
  }
  .home-hero {
    min-height: 620px;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 62px;
  }
  .home-hero-content {
    max-width: calc(100vw - 40px);
    min-width: 0;
    text-align: center;
    width: 100%;
  }
  .home-hero h1 {
    font-size: 35px;
    line-height: 1.08;
  }
  .lead {
    font-size: 16px;
    line-height: 1.45;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-arrow {
    background: rgba(255,253,248,0.26);
    height: 38px;
    top: auto;
    transform: none;
    width: 38px;
  }
  .hero-arrow-left {
    bottom: 92px;
    left: 20px;
  }
  .hero-arrow-right {
    bottom: 92px;
    right: 20px;
  }
  .hero-arrow::before {
    height: 10px;
    width: 10px;
  }
  .hero-dots {
    bottom: 34px;
    justify-content: center;
    left: 0;
    right: 0;
  }
  .qr-preview { margin: 0 auto; }
  .memorial-preview { margin: 0 auto; }
  .memorial-preview,
  .qr-preview {
    max-width: calc(100vw - 74px);
  }
  .cover-wave {
    height: 270px;
    border-bottom-left-radius: 46% 8%;
    border-bottom-right-radius: 46% 8%;
  }
  .portrait {
    border-width: 7px;
    height: 132px;
    width: 132px;
  }
  .portrait span {
    font-size: 44px;
  }
  .memorial-identity {
    margin-top: -68px;
    max-width: 100vw;
    padding-bottom: 22px;
  }
  .memorial-identity h1 {
    font-size: 31px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    max-width: calc(100vw - 34px);
  }
  .memorial-dates {
    font-size: 15px;
    margin-bottom: 14px;
  }
  .epitaph {
    font-size: 18px;
    line-height: 1.45;
    max-width: 280px;
  }
  .memorial-meta-strip {
    align-items: center;
    border-radius: 8px;
    flex-direction: column;
    font-size: 15px;
    gap: 4px;
    max-width: 300px;
  }
  .memorial-meta-strip span + span::before { content: ""; margin: 0; }
  .memorial-quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 280px;
    width: calc(100vw - 80px);
  }
  .memorial-quick-actions a {
    text-align: center;
  }
  .tabs {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: auto;
    margin-right: auto;
    max-width: 300px;
    padding-top: 8px;
    width: calc(100vw - 40px);
  }
  .tabs a {
    font-size: 14px;
    padding: 9px 16px;
    text-align: center;
  }
  .memorial-content {
    max-width: 100vw;
    padding: 18px 0;
    width: 100%;
  }
  .content-card {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 26px;
    width: min(330px, calc(100vw - 28px));
  }
  .card-heading {
    margin-bottom: 20px;
    padding-bottom: 16px;
    text-align: center;
  }
  .card-heading h2 {
    font-size: 30px;
    line-height: 1.05;
    margin-left: auto;
    margin-right: auto;
    max-width: 250px;
  }
  .card-heading .eyebrow {
    margin-left: auto;
    margin-right: auto;
  }
  .story-text {
    font-size: 20px;
  }
  .story-text p {
    overflow-wrap: break-word;
  }
  .search-result-list a {
    gap: 12px;
    grid-template-columns: 64px 1fr;
    padding: 14px;
  }
  .search-result-image {
    height: 64px;
    width: 64px;
  }
  .search-result-image span {
    font-size: 23px;
  }
  .search-result-list strong {
    font-size: 18px;
  }
  .gallery-grid {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-lightbox {
    gap: 12px;
    grid-template-columns: 1fr 1fr;
    padding: 74px 14px 24px;
  }
  .gallery-lightbox-frame {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .gallery-lightbox-frame img {
    max-height: 68vh;
    width: 100%;
  }
  .gallery-nav {
    grid-row: 2;
    justify-self: stretch;
    padding: 13px 16px;
  }
  .gallery-prev { grid-column: 1; }
  .gallery-next { grid-column: 2; }
  .gallery-close {
    height: 44px;
    right: 14px;
    top: 14px;
    width: 44px;
  }
  .tribute-form,
  .family-cta-card,
  .detail-grid {
    gap: 16px;
  }
  .form-grid,
  .connection-row,
  .gallery-upload,
  .location-card-grid {
    grid-template-columns: 1fr;
  }
  .location-card-grid {
    max-width: 100%;
  }
  .map-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .map-button,
  .share-location-button {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 42px;
    text-align: center;
    width: 100%;
  }
  .share-location-button {
    background: #fffaf1;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
  }
  .site-footer {
    align-items: center;
    gap: 8px;
    padding-bottom: 18px;
    padding-top: 18px;
    text-align: center;
  }
  .footer-brand {
    font-size: 22px;
  }
  .site-footer > div {
    width: 100%;
  }
  .footer-meta {
    align-items: center;
  }
  .footer-meta,
  .site-footer > p {
    width: 100%;
  }
}

@media print {
  .site-header,
  .site-footer,
  .print-button,
  .flash {
    display: none;
  }
  body { background: white; }
  .qr-card {
    border: 0;
    box-shadow: none;
  }
}
