:root {
  --terracotta: #c87855;
  --terracotta-soft: #d99a7f;
  --brown: #3b2e26;
  --cream: #faf7f3;
  --soft: #fdfbf8;
  --line: #eadfd5;
  --muted: #76675d;
  --sage: #73836f;
  --rose: #b98078;
  --shadow: 0 20px 50px rgba(59, 46, 38, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 2%, rgba(201, 149, 106, 0.12), transparent 28%),
    linear-gradient(180deg, #fffdf9 0%, #fdfbf8 48%, #faf5ef 100%);
  color: var(--brown);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(59, 46, 38, 0.06);
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-text {
  color: var(--brown);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
}

.brand-text span {
  color: var(--terracotta);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #4f433c;
  font-size: 13px;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--terracotta);
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  background: var(--terracotta);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(59, 46, 38, 0.15);
}

.button.secondary {
  background: transparent;
  color: var(--brown);
  border: 1px solid rgba(200, 120, 85, 0.72);
}

.button.terracotta {
  background: var(--terracotta);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
  width: 100%;
  margin: 0;
  padding: 70px max(32px, calc((100vw - 1120px) / 2)) 78px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(253, 251, 248, 0.96) 0%, rgba(253, 251, 248, 0.82) 35%, rgba(253, 251, 248, 0.18) 70%, rgba(253, 251, 248, 0.02) 100%),
    url("hero-senior-labrador-british-natural.png?v=1") right center / auto 100% no-repeat;
}

.hero-content {
  max-width: 390px;
  position: relative;
  z-index: 1;
}

.script-note {
  margin: 0 0 10px;
  color: var(--terracotta);
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 26px;
  line-height: 1.1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--terracotta);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0;
}

h1 {
  max-width: 620px;
  font-size: clamp(44px, 5.3vw, 66px);
}

h2 {
  font-size: clamp(32px, 4vw, 54px);
}

h3 {
  font-size: 25px;
}

.hero p {
  max-width: 590px;
  margin: 18px 0 0;
  color: #4d4038;
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.section {
  padding: 66px 0;
}

.section.alt {
  background: var(--cream);
}

.philosophy-band {
  position: relative;
  overflow: hidden;
  padding: 58px 0 52px;
  background:
    radial-gradient(circle at 12% 45%, rgba(217, 154, 127, 0.16), transparent 16%),
    linear-gradient(180deg, #fdf8f2 0%, #fffdf9 100%);
  text-align: center;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(780px, calc(100% - 32px));
  margin: 0 auto;
}

.philosophy {
  color: var(--brown);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(26px, 3vw, 38px);
  font-style: italic;
  line-height: 1.36;
}

.tiny-heart {
  display: inline-block;
  margin-top: 18px;
  color: var(--terracotta);
  font-family: Georgia, serif;
  font-size: 28px;
}

.about-copy {
  margin-top: 26px;
  color: #4d4038;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.82;
}

.about-copy p {
  margin: 0 0 20px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-title {
  margin-bottom: 30px;
  text-align: center;
}

.section-title h2 {
  font-size: clamp(30px, 3vw, 42px);
}

.section-title h2 span,
.safe-copy h2 span {
  color: var(--terracotta);
  font-family: Georgia, serif;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

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

.story-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(59, 46, 38, 0.07);
}

.story-card img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: contain;
  background: var(--cream);
}

.story-card-body {
  padding: 22px 26px 24px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(250, 247, 243, 0.74);
  color: var(--muted);
  font-size: 13px;
}

.story-card p {
  color: var(--muted);
}

.story-card .meta::before {
  content: "";
  width: 14px;
  height: 14px;
  background: url("paw-logo.png") center / contain no-repeat;
}

.center-action {
  margin-top: 22px;
  text-align: center;
}

.text-link {
  color: var(--terracotta);
  font-weight: 800;
}

.check .text-link {
  display: inline;
}

.quiet-band {
  background: var(--brown);
  color: var(--soft);
}

.quiet-band p {
  color: rgba(253, 251, 248, 0.78);
}

.safe-space {
  display: grid;
  grid-template-columns: 0.85fr 1fr 0.9fr;
  gap: 34px;
  align-items: center;
  border-radius: 12px;
  padding: 34px;
  background: linear-gradient(100deg, rgba(250, 247, 243, 0.96), rgba(255, 253, 249, 0.96));
  box-shadow: 0 20px 50px rgba(59, 46, 38, 0.08);
}

.safe-photo {
  min-height: 260px;
  border-radius: 10px;
  background:
    linear-gradient(rgba(253, 251, 248, 0.08), rgba(253, 251, 248, 0.08)),
    url("https://images.unsplash.com/photo-1601758124510-52d02ddb7cbd?auto=format&fit=crop&w=900&q=82") center / cover no-repeat;
}

.safe-copy h2 {
  font-size: clamp(29px, 3vw, 42px);
}

.safe-copy p,
.safe-values p {
  color: var(--muted);
}

.safe-values {
  display: grid;
  gap: 18px;
  border-left: 1px solid rgba(201, 149, 106, 0.38);
  padding-left: 28px;
}

.safe-values div {
  display: grid;
  grid-template-columns: 54px 1fr;
  column-gap: 14px;
  align-items: center;
}

.safe-values span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f4eadf;
  color: var(--brown);
  font-size: 25px;
}

.safe-values strong {
  font-size: 16px;
}

.safe-values p {
  margin: 2px 0 0;
  font-size: 14px;
}

.moments {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.moment {
  min-height: 190px;
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 10px;
  padding: 12px;
  background: var(--cream);
  color: var(--brown);
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 20px;
  line-height: 1.08;
}

.moment.image {
  min-height: 190px;
  background-position: center;
  background-size: cover;
  color: var(--brown);
  text-shadow: none;
}

.moment span {
  display: block;
  width: 94%;
  border-radius: 4px;
  padding: 8px 10px;
  background: rgba(253, 251, 248, 0.9);
  box-shadow: 0 10px 20px rgba(59, 46, 38, 0.12);
  transform: rotate(-2deg);
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-section {
  padding-top: 42px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  border-radius: 12px;
  padding: 20px 16px;
  background: rgba(250, 247, 243, 0.86);
}

.category-grid a {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 92px;
  color: var(--brown);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.category-grid span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff8f1;
  color: var(--terracotta);
  font-size: 28px;
  box-shadow: 0 10px 22px rgba(59, 46, 38, 0.05);
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 42px;
}

.final-cta {
  position: relative;
  overflow: hidden;
  padding: 42px 0;
  background:
    linear-gradient(90deg, rgba(253, 251, 248, 0.9), rgba(253, 251, 248, 0.72)),
    url("https://images.unsplash.com/photo-1529472119196-cb724127a98e?auto=format&fit=crop&w=1600&q=80") center / cover no-repeat;
}

.final-cta .cta {
  border-top: 0;
  padding-top: 0;
}

.memory-footer {
  min-height: 360px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(253, 251, 248, 0.96) 0%, rgba(253, 251, 248, 0.84) 38%, rgba(253, 251, 248, 0.18) 72%, rgba(253, 251, 248, 0.02) 100%),
    url("footer-leia-shina.png?v=1") center right / cover no-repeat;
}

.memory-footer-copy {
  max-width: 430px;
}

.memory-footer-copy h2 {
  font-size: clamp(32px, 4vw, 52px);
}

.memory-footer-copy p:not(.eyebrow):not(.dedication) {
  color: var(--muted);
  font-size: 18px;
}

.dedication {
  margin: 8px 0 18px;
  color: var(--terracotta);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-style: italic;
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1.22fr);
  gap: 36px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(59, 46, 38, 0.05);
}

label {
  display: grid;
  gap: 6px;
  color: var(--brown);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--brown);
  font: inherit;
  padding: 12px 13px;
}

textarea {
  min-height: 220px;
  resize: vertical;
}

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

.full {
  grid-column: 1 / -1;
}

.checks {
  display: grid;
  gap: 10px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-weight: 500;
}

.check input {
  width: auto;
  margin-top: 5px;
}

.notice {
  border-left: 4px solid var(--terracotta);
  background: var(--cream);
  padding: 14px 16px;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 30px;
}

.filter {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.filter.active {
  background: var(--brown);
  color: #fff;
}

.memorial-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(320px, 1fr);
  gap: 42px;
  align-items: center;
  padding: 60px 0;
}

.memorial-hero img {
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--cream);
  box-shadow: var(--shadow);
}

.story-body {
  color: #4d4038;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.78;
  white-space: pre-wrap;
}

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

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: var(--cream);
}

.message-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 34px;
  align-items: start;
}

.message-copy {
  position: sticky;
  top: 104px;
}

.message-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.message-panel,
.message-list,
.admin-message-list {
  display: grid;
  gap: 14px;
}

.public-message,
.admin-message,
.message-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.public-message p {
  margin: 0 0 12px;
  color: #4d4038;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.public-message strong {
  color: var(--terracotta);
}

.message-form {
  display: grid;
  gap: 14px;
  background: #fffdf9;
}

.message-form textarea {
  min-height: 140px;
}

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

.admin-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.admin-editor {
  display: grid;
  gap: 18px;
}

.admin-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.admin-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.editor-main,
.editor-side {
  display: grid;
  gap: 18px;
}

.editor-side {
  position: sticky;
  top: 96px;
}

.story-editor {
  min-height: 420px;
}

.editorial-stats {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 14px;
}

.editorial-stat,
.status-tab {
  box-shadow: none;
}

.editorial-stat {
  min-height: 78px;
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 10px;
}

.editorial-stat span {
  color: var(--brown);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.editorial-stat.passive {
  cursor: default;
}

.editorial-stat.passive:hover {
  transform: none;
  box-shadow: none;
}

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.status-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 0 14px;
}

.status-tab.active {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: #fff;
}

.admin-inbox {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(200, 120, 85, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf9, #faf3ec);
  padding: 18px;
  margin: 0 0 18px;
}

.admin-inbox.empty-inbox {
  grid-template-columns: 1fr auto;
  align-items: center;
  background: #fff;
}

.admin-inbox.empty-inbox p:last-child {
  margin: 0;
  color: var(--muted);
}

.admin-inbox-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.admin-inbox-head h3 {
  font-size: 26px;
}

.admin-inbox-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-inbox-item {
  display: grid;
  gap: 7px;
  justify-items: start;
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brown);
  padding: 14px;
  text-align: left;
  box-shadow: none;
}

.admin-inbox-item span,
.admin-inbox-item em,
.admin-inbox-item small {
  min-width: 0;
  max-width: 100%;
}

.admin-inbox-item em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-inbox-item small {
  color: var(--terracotta);
  font-weight: 750;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-item {
  width: 100%;
  justify-content: flex-start;
  min-height: auto;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--brown);
  border: 1px solid var(--line);
  text-align: left;
  box-shadow: none;
}

.admin-item.active {
  border-color: var(--terracotta);
  background: var(--cream);
}

.message-pill {
  margin-left: 6px;
  background: rgba(200, 120, 85, 0.12);
  color: var(--terracotta);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.admin-actions.compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.admin-actions.compact button {
  min-height: 40px;
  padding: 0 12px;
}

.public-link-tools {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.public-link-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.button.disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  pointer-events: none;
}

.copy-link-message {
  min-height: 0;
  font-size: 14px;
}

.copy-link-message.success,
.copy-link-message.notice {
  padding: 10px 12px;
}

.editorial-note,
.admin-subsection {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  padding: 16px;
}

.admin-subsection {
  display: grid;
  gap: 14px;
  background: #fffdf9;
}

.admin-subsection h3 {
  font-size: 24px;
}

.memory-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.memory-list p {
  margin: 0;
  border-left: 3px solid var(--terracotta);
  background: #fff;
  padding: 12px 16px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
}

.private-data {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.private-data strong {
  color: var(--brown);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.admin-preview {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 18px;
}

.preview-memorial {
  display: grid;
  grid-template-columns: minmax(180px, 0.62fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.preview-memorial img {
  width: 100%;
  max-height: 360px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--cream);
}

.preview-years {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.preview-body {
  color: #4d4038;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.75;
}

.preview-memories {
  display: grid;
  gap: 10px;
}

.preview-memories p {
  margin: 0;
  border-left: 3px solid var(--terracotta);
  background: #fff;
  padding: 10px 12px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
}

.admin-message {
  display: grid;
  gap: 12px;
}

.admin-message.focus-message {
  border-color: var(--terracotta);
  background: #fff8f1;
  box-shadow: 0 18px 38px rgba(200, 120, 85, 0.16);
}

.admin-message textarea {
  min-height: 120px;
}

.admin-message-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-message-head div {
  display: grid;
  gap: 2px;
}

.admin-message-head span:not(.status-pill) {
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  min-height: 28px;
  padding: 0 10px;
  background: var(--cream);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.empty,
.error,
.success {
  padding: 18px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--muted);
}

.error {
  border: 1px solid #ddb0a7;
  color: #8b3830;
}

.success {
  border: 1px solid #b9d1b5;
  color: #426b3d;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 750;
}

.legal-links a {
  color: var(--terracotta);
}

.legal-copy {
  color: #4d4038;
  font-size: 18px;
}

.legal-copy h1 {
  margin-bottom: 24px;
}

.legal-copy h2 {
  margin-top: 34px;
  font-size: clamp(26px, 3vw, 36px);
}

.legal-copy p,
.legal-copy li {
  color: var(--muted);
}

.legal-copy ul {
  padding-left: 22px;
}

.legal-warning {
  margin: 22px 0 28px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.legal-table th,
.legal-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  width: 32%;
  color: var(--brown);
  font-weight: 800;
}

.legal-table td {
  color: var(--muted);
}

.legal-updated {
  margin-top: 34px;
  font-size: 14px;
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(760px, calc(100% - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: var(--shadow);
  padding: 18px;
}

.cookie-banner p {
  margin: 4px 0 0;
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.cookie-actions button {
  min-height: 38px;
  padding: 0 16px;
}

@media (max-width: 820px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 18px;
  }

  .form-shell,
  .memorial-hero,
  .message-section,
  .admin-layout,
  .admin-editor-grid,
  .preview-memorial {
    grid-template-columns: 1fr;
  }

  .editor-side {
    position: static;
  }

  .message-copy {
    position: static;
  }

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

  .admin-inbox,
  .admin-inbox.empty-inbox {
    grid-template-columns: 1fr;
  }

  .admin-inbox-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    align-items: flex-start;
    padding: 42px 20px 330px;
    background:
      linear-gradient(180deg, rgba(253, 251, 248, 0.98) 0%, rgba(253, 251, 248, 0.98) 58%, rgba(253, 251, 248, 0.16) 88%, rgba(253, 251, 248, 0) 100%),
      url("hero-senior-labrador-british-natural.png?v=1") 64% bottom / auto 320px no-repeat;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(40px, 13vw, 52px);
  }

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

  .safe-space {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .safe-values {
    border-left: 0;
    border-top: 1px solid rgba(201, 149, 106, 0.38);
    padding-left: 0;
    padding-top: 22px;
  }

  .moments {
    grid-template-columns: 1fr 1fr;
  }

  .moment.image {
    min-height: 220px;
  }

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

  .memory-footer {
    min-height: 620px;
    align-items: flex-start;
    padding-top: 44px;
    background:
      linear-gradient(180deg, rgba(253, 251, 248, 0.98) 0%, rgba(253, 251, 248, 0.95) 45%, rgba(253, 251, 248, 0.1) 78%, rgba(253, 251, 248, 0) 100%),
      url("footer-leia-shina.png?v=1") 63% bottom / auto 330px no-repeat;
  }

  .section-head,
  .cta,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table th {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .cookie-banner {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    justify-content: flex-start;
  }

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

@media (min-width: 821px) and (max-width: 1040px) {
  .safe-space {
    grid-template-columns: 1fr 1fr;
  }

  .safe-values {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid rgba(201, 149, 106, 0.38);
    padding-left: 0;
    padding-top: 22px;
  }

  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
