
:root {
  --cream: #f8f4ec;
  --warm-white: #fffdf8;
  --navy: #0d2238;
  --deep-green: #435f46;
  --soft-green: #e8efe5;
  --gold: #b98645;
  --rust: #a85f35;
  --text: #263646;
  --muted: #68727d;
  --border: #ddd2bf;
  --shadow: 0 12px 30px rgba(13, 34, 56, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(184, 134, 70, 0.10), transparent 34%),
    linear-gradient(180deg, var(--cream), #ffffff);
  color: var(--text);
  line-height: 1.7;
}

a { color: var(--deep-green); }
a:hover { color: var(--rust); }

.topbar {
  background: var(--navy);
  color: white;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.site-header {
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 4px solid var(--deep-green);
  box-shadow: 0 6px 18px rgba(13, 34, 56, 0.08);
}

.header-inner {
  max-width: 1120px;
  margin: auto;
  padding: 1.4rem 1.2rem;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.4rem;
  align-items: center;
}

.logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--border);
  padding: 0.35rem;
  box-shadow: var(--shadow);
}

.site-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.site-subtitle {
  margin: 0.6rem 0 0;
  color: var(--deep-green);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-style: italic;
}

.site-nav {
  border-top: 1px solid var(--border);
  background: var(--soft-green);
}

.nav-inner {
  max-width: 1120px;
  margin: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--navy);
  border: 1px solid rgba(67, 95, 70, 0.28);
  background: rgba(255,255,255,0.65);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: white;
  background: var(--deep-green);
  border-color: var(--deep-green);
}

main {
  max-width: 1120px;
  margin: auto;
  padding: 2rem 1.2rem 3rem;
}

.hero, .page-hero {
  background:
    linear-gradient(135deg, rgba(67, 95, 70, 0.92), rgba(13, 34, 56, 0.94)),
    linear-gradient(180deg, var(--deep-green), var(--navy));
  color: white;
  padding: clamp(1.8rem, 4vw, 3.25rem);
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::after, .page-hero::after {
  content: "🐾";
  position: absolute;
  right: 1.4rem;
  bottom: -0.4rem;
  font-size: 6rem;
  opacity: 0.10;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: #f0d7b4;
  margin: 0 0 0.6rem;
  font-family: Arial, sans-serif;
}

.hero h1, .page-hero h1 {
  margin: 0;
  color: white;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  max-width: 900px;
}

.hero .lead, .page-hero .lead {
  max-width: 820px;
  margin: 1rem 0 0;
  font-size: 1.08rem;
  color: white;
}

.hero-actions, .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: bold;
  font-family: Arial, sans-serif;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: white;
  border-color: rgba(255,255,255,0.55);
}

.section { margin: 0 0 1.5rem; }
.section.alt {
  background: rgba(232, 239, 229, 0.55);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.4rem;
}

.section > .container,
.container { width: 100%; }

.band {
  background: var(--soft-green);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 18px rgba(13, 34, 56, 0.06);
}

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-left: 7px solid var(--deep-green);
  border-radius: 18px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 8px 18px rgba(13, 34, 56, 0.06);
}

.card h2, .card h3,
.section h2, .section h3 {
  color: var(--navy);
}

h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.2;
}

h3 {
  margin: 0 0 0.7rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

p:first-child { margin-top: 0; }

.stat {
  color: var(--navy);
  font-size: 1.65rem;
  font-weight: bold;
}

.checklist { padding-left: 1.25rem; }
.checklist li { margin: 0.45rem 0; }

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.pill {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.40);
  color: white;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

.callout {
  background: #fff7ed;
  border: 1px solid #e2c29a;
  border-left: 7px solid var(--gold);
  border-radius: 18px;
  padding: 1.2rem 1.4rem;
}

.callout h2, .callout h3 { color: #6c3f1f; }

form { display: grid; gap: 1rem; }
label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--navy);
  font-weight: bold;
}
input, select, textarea {
  width: 100%;
  border: 1px solid #c9b99f;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--text);
  background: white;
}
textarea { min-height: 175px; resize: vertical; }
button { cursor: pointer; }
.form-message {
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}
.form-message.success { background: #e8f3e8; border: 1px solid #8cb28f; }
.form-message.error { background: #fff0eb; border: 1px solid #d69a7c; }

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: white;
  background: var(--navy);
  font-size: 0.95rem;
}
.site-footer a { color: white; font-weight: bold; }

@media (max-width: 800px) {
  .header-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .logo { margin: auto; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media print {
  body { background: white; }
  .topbar, .site-nav { display: none; }
  .site-header, .hero, .page-hero, .card, .band, .callout { box-shadow: none; }
}


/* Feline Memorial Wall */
.memorial-intro {
  max-width: 780px;
}

.memorial-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 1.25rem;
}

.memorial-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.memorial-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(13, 34, 56, 0.06);
  break-inside: avoid;
  position: relative;
  overflow: hidden;
}

.memorial-card::before {
  content: "♥";
  position: absolute;
  top: 0.55rem;
  right: 0.75rem;
  color: var(--gold);
  font-size: 1.15rem;
}

.memorial-photo,
.memorial-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  margin-bottom: 0.85rem;
}

.memorial-photo {
  display: block;
  object-fit: cover;
  border: 1px solid var(--border);
}

.memorial-photo-placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(185, 134, 69, 0.16), transparent 38%),
    var(--soft-green);
  border: 1px dashed #aebcae;
  color: var(--deep-green);
  font-size: 3rem;
}

.memorial-name {
  margin: 0;
  color: var(--navy);
  font-size: 1.45rem;
}

.memorial-dates {
  color: var(--rust);
  font-style: italic;
  margin: 0.15rem 0 0.7rem;
}

.memorial-message {
  white-space: pre-line;
  margin-bottom: 0.7rem;
}

.memorial-signed {
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

.memorial-form-note {
  background: #fff7ed;
  border: 1px solid #e2c29a;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-size: 0.94rem;
}

.field-help {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

@media (max-width: 850px) {
  .memorial-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .memorial-wall {
    grid-template-columns: 1fr;
  }
}

@media print {
  .memorial-submit,
  .memorial-toolbar .btn,
  .site-header,
  .topbar,
  .site-nav,
  .site-footer {
    display: none !important;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .page-hero {
    color: var(--navy);
    background: white;
    border: 1px solid var(--border);
    padding: 1rem;
  }

  .page-hero h1,
  .page-hero .lead,
  .page-hero .eyebrow {
    color: var(--navy);
  }

  .memorial-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memorial-card {
    box-shadow: none;
  }
}


/* MySQL-backed memorial wall additions */
.memorial-anchor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 1rem;
  background: var(--soft-green);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.memorial-anchor-list a {
  display: inline-block;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  background: white;
  border: 1px solid rgba(67, 95, 70, 0.35);
  text-decoration: none;
  font-weight: bold;
}

.memorial-anchor-list a:hover,
.memorial-anchor-list a:focus {
  color: white;
  background: var(--deep-green);
}

.memorial-card {
  scroll-margin-top: 1.5rem;
}

.memorial-card:target {
  outline: 4px solid rgba(185, 134, 69, 0.55);
  box-shadow: 0 12px 32px rgba(13, 34, 56, 0.16);
}

.memorial-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-family: Arial, sans-serif;
  font-size: 0.86rem;
}

.memorial-permalink {
  font-weight: bold;
}

.memorial-print-one {
  appearance: none;
  border: 1px solid var(--deep-green);
  color: var(--deep-green);
  background: white;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font: inherit;
  font-weight: bold;
}

.memorial-print-one:hover {
  color: white;
  background: var(--deep-green);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-label input {
  width: auto;
  margin-top: 0.35rem;
  flex: 0 0 auto;
}

.honeypot-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.memorial-system-message {
  margin-bottom: 1rem;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media print {
  @page {
    margin: 0.5in;
  }

  body {
    background: white !important;
  }

  .topbar,
  .site-header,
  .site-nav,
  .site-footer,
  .memorial-index-section,
  .memorial-submit,
  .memorial-system-message,
  .memorial-card-actions,
  .print-wall-button {
    display: none !important;
  }

  main {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .page-hero {
    display: block !important;
    background: white !important;
    color: var(--navy) !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 0 0.2in !important;
    margin: 0 !important;
  }

  .page-hero h1,
  .page-hero .lead,
  .page-hero .eyebrow {
    color: var(--navy) !important;
  }

  .page-hero::after {
    display: none !important;
  }

  .memorial-print-area {
    display: block !important;
    margin: 0 !important;
  }

  .memorial-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.18in !important;
  }

  .memorial-card {
    box-shadow: none !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.print-single-memorial .page-hero,
  body.print-single-memorial .print-wall-title {
    display: none !important;
  }

  body.print-single-memorial .memorial-wall {
    display: block !important;
  }

  body.print-single-memorial .memorial-card {
    display: none !important;
  }

  body.print-single-memorial .memorial-card.print-target {
    display: block !important;
    max-width: 7.25in;
    margin: 0 auto;
    font-size: 13pt;
  }
}


/* Individual memorial pages */
.memorial-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}
.memorial-gallery-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(13,34,56,.06);
}
.memorial-gallery-card img,
.memorial-detail-photo {
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.memorial-gallery-card img { aspect-ratio: 4/3; }
.memorial-detail-photo { max-height: 620px; }
.memorial-detail {
  max-width: 860px;
  margin: 0 auto;
}
.memorial-detail .memorial-message {
  font-size: 1.12rem;
}
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1rem;
}
.share-status {
  min-height: 1.3em;
  color: var(--deep-green);
  font-size: .92rem;
}
.admin-shell {
  max-width: 1080px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}
.admin-table th,
.admin-table td {
  padding: .75rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: .25rem .6rem;
  font-size: .82rem;
  font-weight: bold;
}
.status-pending { background:#fff2cc; }
.status-approved { background:#dff2df; }
.status-rejected { background:#f8dddd; }

@media (max-width:850px) {
  .memorial-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .memorial-gallery { grid-template-columns:1fr; }
}
@media print {
  .share-row,
  .back-to-wall,
  .site-header,
  .site-nav,
  .site-footer,
  .topbar {
    display:none !important;
  }
  .memorial-detail {
    max-width:none !important;
  }
}

/* Client memorial hierarchy */
.memorial-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.memorial-gallery-card{background:var(--warm-white);border:1px solid var(--border);border-radius:18px;padding:1rem;box-shadow:0 8px 18px rgba(13,34,56,.06)}
.memorial-gallery-card img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:14px;border:1px solid var(--border)}
.memorial-photo-placeholder{width:100%;aspect-ratio:4/3;display:grid;place-items:center;border-radius:14px;background:var(--soft-green);border:1px dashed #aebcae;font-size:3rem}
.memorial-detail{max-width:860px;margin:0 auto}.memorial-detail-photo{width:100%;max-height:650px;object-fit:contain;background:#fff;border:1px solid var(--border);border-radius:18px}
.memorial-anchor-list{display:flex;flex-wrap:wrap;gap:.55rem;padding:1rem;background:var(--soft-green);border:1px solid var(--border);border-radius:18px}
.memorial-anchor-list a{padding:.42rem .82rem;border-radius:999px;background:#fff;border:1px solid rgba(67,95,70,.35);text-decoration:none;font-weight:bold}
.share-row,.admin-actions{display:flex;flex-wrap:wrap;gap:.65rem;align-items:center}.share-status{min-height:1.25em;color:var(--deep-green)}
.admin-shell{max-width:1100px;margin:2rem auto;padding:0 1rem}.admin-table{width:100%;border-collapse:collapse;background:#fff}
.admin-table th,.admin-table td{border:1px solid var(--border);padding:.75rem;vertical-align:top}
.status-badge{display:inline-block;border-radius:999px;padding:.25rem .6rem;font-size:.82rem;font-weight:bold}.status-pending{background:#fff2cc}.status-approved{background:#dff2df}.status-rejected{background:#f8dddd}
.honeypot-field{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.checkbox-label{display:flex;align-items:flex-start;gap:.5rem}.checkbox-label input{width:auto;margin-top:.35rem}
@media(max-width:850px){.memorial-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.memorial-gallery{grid-template-columns:1fr}}
@media print{.topbar,.site-header,.site-nav,.site-footer,.hero-actions,.share-row,.back-to-wall,.memorial-toolbar button{display:none!important}main{max-width:none!important;margin:0!important;padding:0!important}.page-hero{background:#fff!important;color:var(--navy)!important;box-shadow:none!important;border:0!important}.page-hero h1,.page-hero .lead,.page-hero .eyebrow{color:var(--navy)!important}.memorial-detail{max-width:none!important}.memorial-gallery-card{box-shadow:none!important;break-inside:avoid}}

/* Expanded About Boobahs, LLC page */
.original-boobahs-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.mini-boobah{text-align:center}.mini-boobah strong,.mini-boobah span{display:block}
.mini-boobah span{color:var(--rust);font-style:italic;font-size:.92rem}
.mini-photo-placeholder{min-height:150px;display:grid;place-items:center;background:var(--soft-green);border:1px dashed #aebcae;border-radius:14px;margin-bottom:.65rem;color:var(--deep-green)}
.logo-letter-map{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1.2rem}
.letter-map-card{display:grid;grid-template-columns:90px 1fr;gap:1rem;align-items:center;background:var(--warm-white);border:1px solid var(--border);border-radius:18px;padding:1rem}
.letter-image-placeholder{width:90px;height:90px;display:grid;place-items:center;border-radius:18px;background:var(--navy);color:var(--gold);font-size:2.4rem;font-weight:bold;box-shadow:var(--shadow)}
.boobah-profile-list{display:grid;gap:1.2rem;margin-top:1.5rem}
.boobah-profile-card{display:grid;grid-template-columns:minmax(220px,32%) 1fr;gap:1.35rem;align-items:stretch;background:var(--warm-white);border:1px solid var(--border);border-left:7px solid var(--deep-green);border-radius:20px;padding:1.1rem;box-shadow:0 8px 18px rgba(13,34,56,.06)}
.boobah-photo-placeholder{min-height:280px;display:grid;place-items:center;text-align:center;background:radial-gradient(circle at center,rgba(185,134,69,.15),transparent 40%),var(--soft-green);border:1px dashed #aebcae;border-radius:16px;color:var(--deep-green);font-size:1.1rem}
.boobah-profile-copy h3{margin-top:0;font-size:1.7rem}.boobah-profile-copy h4{margin:1rem 0 .25rem;color:var(--rust);font-size:1rem}
.placeholder-copy{color:var(--muted);font-style:italic}.boobah-badge{display:inline-block;margin-bottom:.55rem;padding:.25rem .65rem;border-radius:999px;background:rgba(185,134,69,.18);border:1px solid rgba(185,134,69,.45);color:#6c3f1f;font-size:.82rem;font-weight:bold;font-family:Arial,sans-serif}
.founder-photo{min-height:440px}
@media(max-width:760px){.logo-letter-map,.original-boobahs-grid{grid-template-columns:1fr}.boobah-profile-card{grid-template-columns:1fr}.boobah-photo-placeholder{min-height:240px}}
@media print{.boobah-profile-card,.letter-map-card{box-shadow:none;break-inside:avoid}}


/* =========================================================
   SITE-WIDE MOBILE AND CELL-PHONE RESPONSIVENESS
   ========================================================= */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

button,
.btn,
.site-nav a,
.memorial-anchor-list a {
  min-height: 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mobile-nav-toggle {
  display: none;
  width: min(92%, 1120px);
  min-height: 48px;
  margin: 0 auto 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(67, 95, 70, 0.42);
  border-radius: 12px;
  background: var(--deep-green);
  color: white;
  font: 700 1rem/1 Arial, sans-serif;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
}

.mobile-nav-icon {
  width: 22px;
  display: grid;
  gap: 4px;
}

.mobile-nav-icon span {
  display: block;
  height: 2px;
  border-radius: 10px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-label {
  white-space: nowrap;
}

.admin-shell,
main,
.container,
.header-inner,
.nav-inner {
  min-width: 0;
}

.admin-table {
  min-width: 760px;
}

.admin-shell > div[style*="overflow"],
.admin-shell .section > div[style*="overflow"] {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

input,
select,
textarea {
  min-height: 46px;
}

textarea {
  min-height: 150px;
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1rem;
    text-align: left;
  }

  .logo {
    width: 104px;
    height: 104px;
    margin: 0;
    border-radius: 14px;
  }

  .site-title {
    font-size: clamp(1.65rem, 7vw, 2.55rem);
    overflow-wrap: anywhere;
  }

  .site-subtitle {
    font-size: 1rem;
    line-height: 1.4;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  html.nav-ready .site-nav {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    border-top: 0;
    transition: grid-template-rows 0.22s ease;
  }

  html.nav-ready .site-nav.is-open {
    grid-template-rows: 1fr;
    border-top: 1px solid var(--border);
  }

  html.nav-ready .site-nav .nav-inner {
    min-height: 0;
    overflow: hidden;
  }

  .nav-inner {
    width: min(94%, 680px);
    padding: 0.8rem 0 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .site-nav a {
    width: 100%;
    padding: 0.7rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
    text-align: center;
  }

  main {
    padding: 1.25rem 0.85rem 2.25rem;
  }

  .hero,
  .page-hero {
    padding: 1.55rem 1.1rem;
    margin-bottom: 1.25rem;
    border-radius: 18px;
  }

  .hero::after,
  .page-hero::after {
    font-size: 4.25rem;
    right: 0.65rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.75rem);
    overflow-wrap: anywhere;
  }

  .hero .lead,
  .page-hero .lead {
    font-size: 1rem;
  }

  .section,
  .section.alt {
    margin-bottom: 1.15rem;
  }

  .section.alt {
    padding: 1rem;
    border-radius: 16px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .card,
  .callout,
  .band {
    padding: 1rem;
    border-radius: 16px;
  }

  .hero-actions,
  .button-row,
  .share-row,
  .admin-actions,
  .memorial-toolbar {
    align-items: stretch;
  }

  .hero-actions .btn,
  .button-row .btn {
    flex: 1 1 210px;
  }

  .memorial-toolbar {
    gap: 0.9rem;
  }

  .memorial-toolbar > * {
    width: 100%;
  }

  .memorial-toolbar button,
  .memorial-toolbar .btn {
    width: 100%;
  }

  .memorial-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boobah-profile-card {
    grid-template-columns: minmax(170px, 30%) 1fr;
  }

  .logo-letter-map {
    grid-template-columns: 1fr;
  }

  .letter-map-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .letter-image-placeholder {
    width: 74px;
    height: 74px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 640px) {
  .header-inner {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 0.8rem;
  }

  .logo {
    width: 82px;
    height: 82px;
  }

  .site-title {
    font-size: clamp(1.45rem, 7.5vw, 2rem);
  }

  .site-subtitle {
    font-size: 0.87rem;
  }

  .nav-inner {
    grid-template-columns: 1fr;
  }

  main {
    padding-inline: 0.7rem;
  }

  .hero,
  .page-hero {
    padding: 1.3rem 0.95rem;
  }

  h2 {
    font-size: clamp(1.5rem, 7.5vw, 2rem);
  }

  h3 {
    overflow-wrap: anywhere;
  }

  .hero-actions,
  .button-row,
  .share-row,
  .admin-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions .btn,
  .button-row .btn,
  .share-row .btn,
  .admin-actions .btn,
  .admin-actions form,
  .admin-actions a {
    width: 100%;
  }

  .memorial-gallery {
    grid-template-columns: 1fr;
  }

  .memorial-anchor-list {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0.75rem;
  }

  .memorial-anchor-list a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .boobah-profile-card {
    grid-template-columns: 1fr;
    padding: 0.9rem;
  }

  .boobah-photo-placeholder,
  .founder-photo {
    min-height: 220px;
  }

  .original-boobahs-grid {
    grid-template-columns: 1fr;
  }

  .letter-map-card {
    grid-template-columns: 62px minmax(0, 1fr);
    padding: 0.8rem;
  }

  .letter-image-placeholder {
    width: 62px;
    height: 62px;
    font-size: 1.85rem;
  }

  form .grid-2,
  form .grid-3 {
    grid-template-columns: 1fr;
  }

  /* 16px prevents automatic iPhone zoom on focus. */
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  input,
  select {
    min-height: 48px;
  }

  .checkbox-label {
    line-height: 1.45;
  }

  .checkbox-label input[type="checkbox"] {
    min-width: 22px;
    width: 22px;
    height: 22px;
  }

  .memorial-detail-photo {
    max-height: none;
  }

  .admin-shell {
    margin: 1rem auto;
    padding: 0 0.65rem;
  }

  .admin-table {
    min-width: 680px;
    font-size: 0.91rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.55rem;
  }

  .topbar {
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
    line-height: 1.35;
  }
}

@media (max-width: 390px) {
  .header-inner {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 0.65rem;
  }

  .logo {
    width: 70px;
    height: 70px;
  }

  .site-title {
    font-size: 1.35rem;
  }

  .site-subtitle {
    font-size: 0.8rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 1.8rem;
  }

  .card,
  .callout,
  .band,
  .section.alt {
    padding: 0.85rem;
  }
}

/* iOS safe-area support */
@supports (padding: max(0px)) {
  .topbar,
  .site-header,
  main,
  .site-footer {
    padding-left: max(env(safe-area-inset-left), 0px);
    padding-right: max(env(safe-area-inset-right), 0px);
  }

  .site-footer {
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Version 1.0 moderator enhancements */
.admin-search-form{margin:1rem 0;padding:1rem;background:var(--soft-green);border:1px solid var(--border);border-radius:16px}
.admin-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.6rem;align-items:end}
.admin-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.pagination{display:flex;justify-content:center;align-items:center;gap:1rem;margin:1rem 0;flex-wrap:wrap}
.pagination a{display:inline-flex;min-height:44px;align-items:center;padding:.55rem .8rem;border:1px solid var(--border);border-radius:10px;background:#fff;text-decoration:none;font-weight:bold}
@media(max-width:640px){.admin-search-row{grid-template-columns:1fr}.admin-search-row .btn{width:100%}}

.memorial-entry-list{display:grid;gap:1rem}
.memorial-entry{margin:0}
select{width:100%;min-height:46px;padding:.7rem;border:1px solid var(--border);border-radius:10px;background:#fff;font:inherit}
#newCatFields{margin:1.25rem 0;padding:1rem;border:1px solid var(--border);border-radius:14px;background:var(--soft-green)}


.client-heading{
    display:flex;
    align-items:center;
    gap:.85rem;
    flex-wrap:wrap;
}

.client-heading h1,
.client-heading p{
    margin:0;
}

.client-heading-small{
    margin-bottom:.5rem;
}

.client-logo-thumb{
    width:64px;
    height:64px;
    object-fit:contain;
    border-radius:14px;
    background:#fff;
    border:1px solid var(--border);
    padding:.35rem;
    flex:0 0 auto;
}

.client-heading-small .client-logo-thumb{
    width:42px;
    height:42px;
    border-radius:10px;
}

@media (max-width:600px){
    .client-logo-thumb{
        width:54px;
        height:54px;
    }
}


/* Client logo and name must always stay together on one line. */
.client-title-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: nowrap;
    max-width: 100%;
}

.client-title-row h1,
.client-title-row .client-context {
    margin: 0;
}

.client-identity {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    flex: 0 0 auto;
    white-space: nowrap;
}

.client-name {
    display: inline-block;
    white-space: nowrap;
    font-weight: 700;
    line-height: 1.1;
}

.client-title-row-small {
    margin-bottom: .5rem;
}

.client-title-row-small .client-logo-thumb {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.client-context {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .client-title-row {
        gap: .45rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .client-title-row::-webkit-scrollbar {
        display: none;
    }

    .client-title-row h1 {
        font-size: clamp(1.35rem, 7vw, 2rem);
        white-space: nowrap;
    }

    .client-name,
    .client-context {
        font-size: .92rem;
    }
}
