.account-wrap {
  position: relative;
  z-index: 3;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.account-wrap--wide {
  max-width: 52rem;
}

.account-wrap--reports {
  max-width: 68rem;
}

.account-card {
  background: var(--card);
  background-image: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1rem;
}

.account-card h1,
.account-card h2,
.account-top h1 {
  font-family: 'Cormorant Garamond', serif;
  color: #fff;
  font-weight: 600;
}

.account-card h1,
.account-card h2 {
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.account-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.account-top p,
.lede {
  color: rgba(255, 255, 255, 0.78);
}

.account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.account-nav a,
.btn-text {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.account-nav a:hover,
.btn-text:hover {
  color: var(--accent);
}

.account-nav a[aria-current="page"] {
  color: var(--accent);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.year-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.year-pair__hint {
  grid-column: 1 / -1;
  margin-top: -0.35rem;
}

.form-grid label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.form-grid input[type="text"],
.form-grid input[type="email"],
.form-grid input[type="password"],
.form-grid input[type="url"],
.form-grid input[type="tel"],
.form-grid input[type="time"],
.form-grid input[type="date"],
.form-grid input[type="number"],
.form-grid input[type="datetime-local"],
.form-grid input[type="file"],
.form-grid textarea,
.form-grid select,
.share-row input,
.invite-form input[type="email"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--text-on-light);
  background: #fff;
}

.form-grid textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.hint {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

[hidden] {
  display: none !important;
}

.btn-primary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.3rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--navy) 0%, #152d45 100%);
  color: #fff;
}

.btn-danger {
  background: transparent;
  color: #8d3a3a;
  border: 1px solid #e4c7c7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.page-save {
  margin-top: 1.25rem;
}

.page-save-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: -0.35rem -0.35rem 1rem;
  padding: 0.6rem 0.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.page-save-bar .save-status {
  flex: 1;
  min-height: 0;
  text-align: right;
}

.save-status {
  margin: 0;
  min-height: 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.save-status.is-error {
  color: #8d2a2a;
}

.save-status.is-saved {
  color: #1b5e20;
}

.flash {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.flash-success {
  background: #e8f5e9;
  color: #1b5e20;
}

.flash-error {
  background: #fdecea;
  color: #8d2a2a;
}

.memorial-list {
  display: flex;
  flex-direction: column;
}

.memorial-item + .memorial-item {
  border-top: 1px solid var(--border);
}

.memorial-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
  border-top: 0;
}

.memorial-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.memorial-actions .btn-primary,
.memorial-actions .btn-secondary {
  padding: 0.5rem 0.9rem;
  font-size: 0.92rem;
}

.memorial-qr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding: 0 0 0.95rem;
}

.memorial-qr[hidden] {
  display: none;
}

.memorial-qr canvas {
  width: 148px;
  height: 148px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  image-rendering: pixelated;
}

.memorial-qr-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.memorial-qr .hint {
  margin: 0;
}

.invite-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.invite-form > div > label,
.invite-pages legend {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.invite-pages {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.invite-pages label,
.editor-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--text-on-light);
}

.editor-list {
  display: flex;
  flex-direction: column;
}

.editor-row {
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}

.editor-row + .editor-row {
  border-top: 1px solid var(--border);
}

.editor-row p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.editor-row .editor-pending {
  color: #8a5a2a;
  font-size: 0.82rem;
  font-weight: 600;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.editor-actions form {
  margin: 0;
}

.editor-actions .btn-secondary {
  padding: 0.5rem 0.9rem;
  font-size: 0.92rem;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .editor-row {
    flex-direction: column;
    align-items: stretch;
  }

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

.memorial-row h2 {
  font-size: 1.35rem;
  margin: 0;
}

.memorial-row p {
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #b54a3c;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-published {
  background: #2f7a4f;
  color: #fff;
}

#share-card {
  container-type: inline-size;
}

.share-layout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.share-layout__link > label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.share-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.share-row input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.share-row .btn-primary,
.share-row .btn-secondary {
  flex: 0 0 auto;
  padding: 0.7rem 1.05rem;
}

.share-open {
  color: var(--navy);
  text-decoration: none;
}

.share-open:hover,
.share-open:focus-visible {
  color: var(--navy);
  border-color: var(--navy);
}

.share-layout__link > .hint {
  margin-top: 0.45rem;
}

.section-links {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.section-links[hidden] {
  display: none !important;
}

.section-links__summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  cursor: pointer;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
}

.section-links__summary::-webkit-details-marker {
  display: none;
}

.section-links__summary::marker {
  content: "";
}

.section-links__summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  margin-top: -0.12rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.section-links[open] > .section-links__summary::before {
  margin-top: 0.15rem;
  transform: rotate(45deg);
}

.section-links__summary:hover,
.section-links__summary:focus-visible {
  color: var(--accent);
}

.section-links__body {
  margin-top: 0.75rem;
}

.section-links__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.section-links__head .hint {
  margin: 0;
  flex: 1 1 14rem;
}

.section-links__head .btn-primary,
.section-link .btn-secondary,
.section-shortlink .btn-secondary {
  padding: 0.55rem 0.95rem;
  white-space: nowrap;
}

.section-links__list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.section-link {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.section-link__label,
.section-shortlink__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.section-link input,
.section-shortlink input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--text-on-light);
  background: #fff;
}

.section-shortlink {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 252, 247, 0.8);
}

.section-shortlink .hint {
  margin-top: 0;
}

@media (max-width: 720px) {
  .section-link {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .section-link__label {
    grid-column: 1 / -1;
  }
}

.share-qr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0;
  padding: 0.55rem 0.7rem 0.55rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.share-qr[hidden] {
  display: none !important;
}

.share-qr canvas {
  width: 5.5rem;
  height: 5.5rem;
  background: #fff;
  border-radius: 8px;
  image-rendering: pixelated;
}

.share-qr-actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.share-qr-actions .btn-secondary {
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.share-qr-status {
  margin: 0;
  min-height: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1b5e20;
}

.share-qr-status:empty {
  display: none;
}

@container (max-width: 640px) {
  .share-row {
    flex-wrap: wrap;
  }

  .share-row input {
    flex: 1 1 100%;
  }

  .share-qr-actions {
    justify-content: flex-start;
  }
}

.share-qr-status.is-error {
  color: #8d2a2a;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.6rem;
}

.photo-grid figure {
  margin: 0;
}

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

.photo-grid figure.is-hidden .photo-zoom {
  position: relative;
  border-radius: 12px;
  box-shadow: 0 0 0 3px #b54a3c;
}

.photo-grid figure.is-hidden .photo-zoom::after {
  content: 'Hidden';
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #b54a3c;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.photo-visibility {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin-top: 0.35rem;
}

.photo-visibility label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  padding: 0.25rem 0.6rem;
  border: 1px solid #c9bfb2;
  border-radius: 999px;
  background: #fff;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.photo-visibility label:has(input[value="0"]:checked) {
  border-color: #2f7a4f;
  background: #2f7a4f;
  color: #fff;
}

.photo-visibility label:has(input[value="1"]:checked) {
  border-color: #b54a3c;
  background: #b54a3c;
  color: #fff;
}

.photo-visibility input {
  margin: 0;
  accent-color: #fff;
}

.portrait-frame.is-layout-boxed {
  box-sizing: border-box;
  padding: 11%;
  background-color: #152d45;
  background-image: none;
}

.portrait-frame.is-layout-boxed img {
  border-radius: 8px;
}

.portrait-frame.is-layout-banner {
  aspect-ratio: 2.15 / 1;
}

.portrait-crop:has(.portrait-frame.is-layout-banner) {
  max-width: 100%;
}

.portrait-frame.is-tone-blur img,
.portrait-frame.is-tone-blur.is-repeat::before {
  filter: var(--colour-filter, none) blur(2.5px);
}

.portrait-frame.is-motion-parallax img {
  animation: portrait-parallax 5.5s ease-in-out infinite;
}

.portrait-crop.is-dragging .portrait-frame img {
  animation: none;
}

@keyframes portrait-parallax {
  50% { translate: 0 -7%; }
}

.portrait-selection {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 2;
  margin: 0;
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
}

.photo-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.photo-zoom img {
  width: 100%;
}

.js-rotate-photo,
.js-use-portrait,
.js-use-background {
  display: inline-block;
  margin-top: 0.35rem;
  margin-right: 0.65rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.js-rotate-photo:disabled {
  opacity: 0.45;
  cursor: progress;
}

.js-use-portrait[hidden],
.js-use-background[hidden],
.background-preview[hidden] {
  display: none;
}

.admin-zoom {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 1rem;
  background: rgba(12, 20, 32, 0.88);
}

.admin-zoom[hidden] {
  display: none;
}

.admin-zoom img {
  max-width: min(920px, 100%);
  max-height: calc(100vh - 5rem);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.admin-zoom__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.file-preview img,
.upload-preview img {
  max-width: 140px;
  border-radius: 10px;
  margin-top: 0.4rem;
}

.portrait-studio {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.portrait-stage .hint {
  margin-bottom: 0.75rem;
}

.portrait-crop {
  width: 100%;
  max-width: 240px;
  touch-action: none;
  user-select: none;
  outline: none;
}

.portrait-crop.is-ready {
  cursor: grab;
}

.portrait-crop.is-dragging {
  cursor: grabbing;
}

.portrait-crop:focus-visible .portrait-frame {
  box-shadow: 0 0 0 3px rgba(21, 45, 69, 0.28);
}

.portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid var(--accent-soft);
  background:
    linear-gradient(45deg, #e7dfd4 25%, transparent 25%),
    linear-gradient(-45deg, #e7dfd4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e7dfd4 75%),
    linear-gradient(-45deg, transparent 75%, #e7dfd4 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-color: #f6f1ea;
}

.portrait-frame.is-circle {
  border-radius: 50%;
}

.portrait-frame.is-rounded {
  border-radius: 18px;
}

.portrait-frame.is-square {
  border-radius: 4px;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  object-position: var(--crop-x, 50%) var(--crop-y, 0%);
  transform: scale(var(--crop-zoom, 1));
  transform-origin: var(--crop-x, 50%) var(--crop-y, 0%);
  pointer-events: none;
  opacity: var(--image-opacity, 1);
  filter: var(--colour-filter, none);
}

.portrait-frame.is-colour-clear,
.background-preview.is-colour-clear { --colour-filter: none; }
.portrait-frame.is-colour-grayscale,
.background-preview.is-colour-grayscale { --colour-filter: grayscale(1); }
.portrait-frame.is-colour-sepia,
.background-preview.is-colour-sepia { --colour-filter: sepia(0.9); }
.portrait-frame.is-colour-warm,
.background-preview.is-colour-warm { --colour-filter: sepia(0.45) saturate(1.25); }
.portrait-frame.is-colour-cool,
.background-preview.is-colour-cool { --colour-filter: hue-rotate(18deg) saturate(0.8); }
.portrait-frame.is-colour-vintage,
.background-preview.is-colour-vintage { --colour-filter: sepia(0.55) contrast(1.08) saturate(0.85); }

.portrait-frame.is-repeat::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: var(--portrait-url);
  background-repeat: repeat;
  background-size: 120px auto;
  background-position: center top;
  opacity: var(--image-opacity, 1);
  filter: var(--colour-filter, none);
  pointer-events: none;
}

.portrait-frame.is-repeat img {
  opacity: 0;
}

.background-preview {
  position: relative;
  height: 140px;
  margin: 0.55rem 0 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: #152a42;
}

.background-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg-image);
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--bg-opacity, 1);
  filter: var(--colour-filter, none);
  transform: scale(var(--bg-zoom, 1));
  transform-origin: center center;
}

.background-preview.is-fit-cover::after { background-size: cover; }
.background-preview.is-fit-contain::after { background-size: contain; }
.background-preview.is-fit-repeat::after {
  background-repeat: repeat;
  background-size: calc(88px * var(--bg-zoom, 1)) auto;
  transform: none;
}

.portrait-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.portrait-empty[hidden],
.uploader-remove[hidden] {
  display: none;
}

.portrait-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.portrait-crop.is-ready:hover .portrait-grid,
.portrait-crop.is-dragging .portrait-grid,
.portrait-crop:focus-visible .portrait-grid {
  opacity: 1;
}

.portrait-tools {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.portrait-tools-label,
.portrait-zoom-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.portrait-zoom-label span {
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy);
}

.portrait-styles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.portrait-style {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.portrait-style[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.portrait-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid currentColor;
  display: inline-block;
  box-sizing: border-box;
}

.portrait-swatch.is-circle,
.portrait-swatch.is-grayscale {
  border-radius: 50%;
}

.portrait-swatch.is-rounded {
  border-radius: 4px;
}

.portrait-swatch.is-square {
  border-radius: 1px;
}

.portrait-swatch.is-grayscale {
  background: linear-gradient(#d5d5d5, #6d6d6d);
  border-color: transparent;
}

.portrait-tools input[type="range"] {
  width: 100%;
  accent-color: var(--navy);
  margin: 0;
}

.portrait-reset {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.portrait-nobg {
  justify-content: center;
}

.portrait-nobg:disabled {
  opacity: 0.65;
  cursor: progress;
}

.portrait-upload-btn {
  width: 100%;
}

.image-settings {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.image-settings .portrait-tools-label {
  margin-top: 0.45rem;
}

.image-settings .portrait-tools-label:first-child {
  margin-top: 0;
}

.image-settings .hint {
  margin-top: 0.35rem;
}

.form-grid input.portrait-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .portrait-studio {
    grid-template-columns: 1fr;
  }

  .portrait-crop {
    max-width: 280px;
  }
}

.upload-progress {
  height: 6px;
  margin-top: 0.45rem;
  background: #efe8df;
  border-radius: 999px;
  overflow: hidden;
}

.upload-progress__bar {
  height: 100%;
  width: 0;
  background: var(--navy);
}

.upload-status {
  min-height: 1.1rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.upload-status.is-error {
  color: #8d2a2a;
}

.uploader-remove {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: #8d3a3a;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.portrait-tools .uploader-remove {
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #9b2c2c;
  color: #fff;
}

.portrait-tools .uploader-remove:hover {
  background: #7d2222;
}

.photo-grid .uploader-remove {
  font-size: 0.78rem;
}

.check {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--text-on-light);
}

.page-home footer a {
  color: inherit;
}

.page-gallery button.thumb {
  width: 100%;
  display: block;
  padding: 0;
  appearance: none;
  font: inherit;
}

.preview-banner {
  position: relative;
  z-index: 5;
  background: #fff3cd;
  color: #6b4f1a;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.donation-entry-edit {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.donation-entry-edit label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

#donation-entries,
#rsvp-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.rsvp-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1.15rem 0 0.55rem;
  font-weight: 600;
}

.rsvp-choice input {
  margin-top: 0.2rem;
}

.rsvp-log {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.rsvp-log__title {
  margin: 1.4rem 0 0.6rem;
  font-size: 1.05rem;
}

.rsvp-log table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.rsvp-log th,
.rsvp-log td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.rsvp-log th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#add-donation-entry {
  align-self: flex-start;
}

#menu-order {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.menu-order__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.menu-order__label {
  font-weight: 600;
}

.album-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.album-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.album-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.album-order {
  display: flex;
  gap: 0.4rem;
}

.album-order__btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-on-light);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.album-order__btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.album-block.is-hidden {
  border: 2px solid #b54a3c;
  background: #fdf3f1;
}

.album-block.is-hidden::before {
  content: 'Hidden from visitors';
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #b54a3c;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.album-delete {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: #8d2a2a;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.editor-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin: -0.35rem 0 1.1rem;
  padding-bottom: 0.15rem;
}

.editor-tab {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.editor-tab[aria-selected="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.editor-panel[hidden] {
  display: none;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-secondary,
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border-radius: 999px;
  padding: 0.8rem 1.3rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
}

.btn-google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
}

.btn-google svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0.35rem 0 0.15rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.feature-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.feature-block {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 252, 247, 0.9) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.feature-switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.form-grid .feature-switch {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  padding: 0.15rem 0.1rem 0.15rem 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-on-light);
  cursor: pointer;
}

.feature-switch__track {
  position: relative;
  flex: 0 0 auto;
  width: 2.85rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #9a8f84;
  box-shadow: inset 0 0 0 1px rgba(26, 47, 75, 0.18);
  transition: background 0.2s ease;
}

.feature-switch__thumb {
  position: absolute;
  top: 0.16rem;
  left: 0.16rem;
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(26, 47, 75, 0.28);
  transition: transform 0.2s ease;
}

.feature-switch__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.feature-switch__title {
  font-weight: 650;
  color: var(--navy);
}

.feature-switch__hint {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.35;
}

.feature-switch__badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #b54a3c;
  color: #fff;
}

.feature-switch__badge::before {
  content: 'Hidden';
}

.feature-switch__input:checked + .feature-switch .feature-switch__track {
  background: #2f7a4f;
}

.feature-switch__input:checked + .feature-switch .feature-switch__thumb {
  transform: translateX(1.22rem);
}

.feature-switch__input:checked + .feature-switch .feature-switch__badge {
  background: #2f7a4f;
  color: #fff;
}

.feature-switch__input:checked + .feature-switch .feature-switch__badge::before {
  content: 'Shown';
}

.feature-switch__input:focus-visible + .feature-switch {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 12px;
}

.feature-block:has(> .feature-switch__input:not(:checked)) {
  border: 2px solid #b54a3c;
  background: #fdf3f1;
}

.feature-block:has(> .feature-switch__input:checked) {
  border-left: 4px solid #2f7a4f;
}

.feature-block__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: opacity 0.2s ease;
}

.condolence-compose {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.condolence-compose h2 {
  margin: 0 0 0.2rem;
}

.form-grid .label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.condolence-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 0.35rem 0.55rem 0.7rem;
}

.condolence-table-wrap table.dataTable {
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text-on-light);
}

#donation-payments-table.dataTable,
#donation-settlements-table.dataTable {
  width: 100% !important;
  min-width: 44rem;
}

#donation-payments-table.dataTable th,
#donation-payments-table.dataTable td,
#donation-settlements-table.dataTable th,
#donation-settlements-table.dataTable td {
  white-space: nowrap;
}

#donation-settlements-table .btn-secondary {
  white-space: nowrap;
}

.condolence-table-wrap table.dataTable thead th {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.condolence-table-wrap td.condolence-message {
  white-space: normal;
  min-width: 12rem;
  max-width: 22rem;
}

.condolence-delete {
  border: 1px solid #e4c7c7;
  background: transparent;
  color: #8d3a3a;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.condolence-table-wrap .dt-search input,
.condolence-table-wrap .dt-length select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  font: inherit;
}

body:has(#live-preview):not(.preview-collapsed) .account-wrap.account-wrap--wide {
  max-width: none;
  margin-left: 0;
  margin-right: calc(min(400px, 38vw) + 1.6rem);
  padding-right: 0.35rem;
}

body.preview-on-left:has(#live-preview):not(.preview-collapsed) .account-wrap.account-wrap--wide {
  margin-left: calc(min(400px, 38vw) + 1.6rem);
  margin-right: 0;
  padding-right: 1.25rem;
  padding-left: 0.35rem;
}

body.preview-collapsed:has(#live-preview) .account-wrap.account-wrap--wide {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.live-preview {
  position: fixed;
  z-index: 30;
  top: 0.75rem;
  right: 0.75rem;
  width: min(400px, 38vw);
  height: calc(100vh - 1.5rem);
  display: flex;
  flex-direction: column;
  background: #122338;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(8, 16, 28, 0.45);
  overflow: hidden;
}

body.preview-on-left .live-preview {
  right: auto;
  left: 0.75rem;
}

.live-preview__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
}

.live-preview__title {
  margin-right: auto;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
}

.live-preview__title span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.68);
}

.live-preview__sides {
  display: flex;
  gap: 0.25rem;
}

.live-preview__side,
.live-preview__hide {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.live-preview__side[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #122338;
}

.live-preview__stage {
  flex: 1;
  min-height: 0;
  background: #152a42;
}

.live-preview__stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #152a42;
}

body.preview-collapsed .live-preview {
  width: auto;
  height: auto;
}

body.preview-collapsed .live-preview__stage,
body.preview-collapsed .live-preview__sides {
  display: none;
}

@media (max-width: 960px) {
  body:has(#live-preview):not(.preview-collapsed) .account-wrap.account-wrap--wide,
  body.preview-on-left:has(#live-preview):not(.preview-collapsed) .account-wrap.account-wrap--wide {
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-bottom: calc(min(42vh, 380px) + 1.25rem);
  }

  .live-preview,
  body.preview-on-left .live-preview {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: min(42vh, 380px);
    border-radius: 16px 16px 0 0;
  }

  .live-preview__sides {
    display: none;
  }

  body.preview-collapsed .live-preview,
  body.preview-collapsed.preview-on-left .live-preview {
    top: 0.75rem;
    right: 0.75rem;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    border-radius: 16px;
  }
}

.form-grid .text-shadow-controls {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-grid .shadow-colour {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.form-grid .shadow-colour input[type="color"] {
  width: 2.75rem;
  height: 2rem;
  padding: 0.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.text-shadow-preview {
  margin-top: 0.15rem;
  padding: 1.15rem 1rem 1rem;
  border-radius: 12px;
  background: #1a2f4b;
  text-align: center;
}

.text-shadow-preview p {
  margin: 0;
  color: #fffefb;
}

#name-shadow-preview {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.18;
  white-space: pre-line;
}

#life-years-preview {
  margin-top: 0.35rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.92);
}

.theme-block .hint {
  display: block;
  margin: 0.2rem 0 0.7rem;
}

.theme-templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.65rem;
}

.theme-template,
.theme-font,
.theme-colour {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.theme-template {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem;
  border-radius: 14px;
}

.theme-template[aria-pressed="true"],
.theme-font[aria-pressed="true"],
.theme-colour[aria-pressed="true"] {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px var(--navy);
}

.theme-template__stage {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.28rem;
  height: 72px;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: linear-gradient(160deg, #152a42, #1a2f4b 55%, #122338);
}

.theme-template__stage.is-paper {
  background: linear-gradient(180deg, #faf6f0, #efe6da);
}

.theme-template__stage.is-garden {
  background: linear-gradient(160deg, #24362c, #2c4034 50%, #1b2c24);
}

.theme-template__stage.is-chapel {
  background: linear-gradient(160deg, #3d1e2a, #4a2430 50%, #2e1520);
}

.theme-template__stage.is-night {
  background: linear-gradient(180deg, #161616, #1c1c1c 40%, #0e0e0e);
}

.theme-template__line {
  width: 1.7rem;
  height: 1px;
  margin-bottom: 0.15rem;
  background: #c4a574;
}

.theme-template__bar {
  height: 6px;
  width: 72%;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.88);
}

.theme-template__bar--short {
  width: 46%;
  height: 4px;
  opacity: 0.7;
}

.theme-template__stage.is-paper .theme-template__bar {
  background: #3e342c;
}

.theme-template__label {
  font-size: 0.92rem;
  font-weight: 600;
}

.theme-template__hint {
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
}

.theme-fonts,
.theme-colours {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.theme-font,
.theme-colour {
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
}

.theme-font__sample {
  display: block;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.15;
}

.theme-font__label {
  display: block;
  margin-top: 0.15rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-colour {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.domain-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.domain-step {
  background: var(--card);
  background-image: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.domain-step h2 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.domain-step.is-done {
  border-top-color: #1b5e20;
}

.editor-panel .domain-steps {
  gap: 0;
}

.editor-panel .domain-step {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
}

.editor-panel .domain-step:first-child {
  border-top: 0;
  padding-top: 0;
}

.editor-panel .domain-step.is-done {
  border-top-color: var(--border);
}

.editor-panel .domain-step.is-done h2 {
  color: #1b5e20;
}

.domain-verify {
  margin-top: 0.85rem;
}

.domain-name-display {
  margin: 0.15rem 0 0.75rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.6rem;
  line-height: 1.05;
  font-weight: 600;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.domain-name-display:focus {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 8px;
}

#domain-change {
  margin-top: 0.35rem;
}

.domain-status {
  min-height: 1.2rem;
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
}

.domain-status.is-success {
  color: #1b5e20;
}

.domain-status.is-pending {
  color: #8a5a2a;
}

.domain-status.is-error {
  color: #8d2a2a;
}

.domain-admin {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem 0;
}

.domain-admin + .domain-admin {
  border-top: 1px solid var(--border);
}

.domain-admin p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.domain-bind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.domain-bind label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.domain-bind input {
  min-width: 10rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--text-on-light);
  background: #fff;
}

.domain-admin .domain-host {
  flex-basis: 100%;
  margin: 0;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 600;
}

.domain-bind .btn-primary,
.domain-bind .btn-secondary {
  padding: 0.5rem 0.9rem;
  font-size: 0.92rem;
}

.nameserver-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
}

.nameserver-list li + li {
  margin-top: 0.45rem;
}

.nameserver-list code {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.theme-colour__swatch {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--swatch, #1a2f4b);
  box-shadow: inset 0 0 0 3px var(--swatch-accent, #b8956a);
}

.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: flex-end;
}

.report-filters label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.report-filters select {
  min-width: 14rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--text-on-light);
  background: #fff;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
}

.report-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.9rem 0.75rem;
}

.report-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-stat strong {
  display: block;
  margin-top: 0.15rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--navy);
}

.report-all-time {
  margin: 0.35rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.report-chart {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.75rem 0.35rem;
}

.report-chart__svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: 'Source Sans 3', sans-serif;
}

.report-legend {
  display: flex;
  gap: 1rem;
  padding: 0.15rem 0.35rem 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.report-swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.35rem;
  border-radius: 99px;
  vertical-align: -0.05rem;
}

.report-swatch--views {
  background: var(--navy);
}

.report-swatch--clicks {
  background: var(--accent);
}

.report-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.report-split .account-card {
  margin-bottom: 1rem;
}

.report-table-scroll {
  max-height: 24rem;
  overflow: auto;
}

.report-table--wide {
  min-width: 36rem;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.report-table th,
.report-table td {
  text-align: left;
  padding: 0.6rem 0.45rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.report-table th {
  position: sticky;
  top: 0;
  background: var(--card);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.report-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.report-table a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.report-table a:hover {
  color: var(--accent);
}

.report-table .hint {
  display: block;
  margin-top: 0.1rem;
}

.report-bar {
  display: block;
  height: 0.4rem;
  margin-top: 0.4rem;
  border-radius: 99px;
  background: var(--cream-dark);
  overflow: hidden;
}

.report-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--navy);
}

.report-bar--click > span {
  background: var(--accent);
}

@media (max-width: 800px) {
  .report-stats,
  .report-split {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .report-filters select {
    width: 100%;
  }
}

.check-line,
.form-grid label.check-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-on-light);
}

.check-line input {
  width: auto;
}

.donation-payments-wrap {
  overflow-x: auto;
}

.donation-payments {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.donation-payments th,
.donation-payments td {
  text-align: left;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.donation-payments .btn-secondary {
  margin-top: 0.45rem;
}

.donation-subtabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  margin: 0.15rem 0 0.2rem;
}

.donation-subtab {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.donation-subtab[aria-selected="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.donation-subpanel {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.donation-subpanel > * + * {
  margin-top: 0.85rem;
}

.donation-subpanel .condolence-table-wrap,
.donation-subpanel .dt-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.donation-subpanel[hidden] {
  display: none;
}

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

.donation-total {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 0.85rem 1rem;
}

.donation-total span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.donation-total strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--navy);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.1;
}

.donation-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.form-grid .donation-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: auto;
  min-width: 11rem;
  margin: 0 0 0.15rem;
}

.donation-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.donation-list-actions .save-status {
  margin: 0;
}

@media (max-width: 640px) {
  .donation-totals {
    grid-template-columns: 1fr;
  }
}

#subtitle-shadow-preview {
  margin-top: 0.35rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
}

/* Status pills (dashboard, settings, donation tables) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f4f1ec;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}

.status-pill--ok {
  background: #e8f3ec;
  border-color: #bcdcc7;
  color: #24613a;
}

.status-pill--info {
  background: #eaf0f7;
  border-color: #c5d4e6;
  color: var(--navy);
}

.status-pill--warn {
  background: #fdf3df;
  border-color: #ecd3a0;
  color: #7a561a;
}

.status-pill--err {
  background: #fbeaea;
  border-color: #eac0c0;
  color: #8a2c2c;
}

/* Donation visibility (editor) */
.visibility-choice {
  border: 0;
  padding: 0;
  margin: 0 0 0.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.visibility-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-grid .visibility-choice__option {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.visibility-choice__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visibility-choice__card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  height: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.visibility-choice__title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--navy);
  font-weight: 600;
}

.visibility-choice__hint {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.visibility-choice__tag {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #fdf3df;
  color: #7a561a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.visibility-choice__option input:checked + .visibility-choice__card {
  border-color: var(--navy);
  background: linear-gradient(180deg, #fff 0%, #f4f6f9 100%);
  box-shadow: 0 0 0 1px var(--navy);
}

.visibility-choice__option input[value="test"]:checked + .visibility-choice__card {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: linear-gradient(180deg, #fff 0%, #fbf6ee 100%);
}

.visibility-choice__option input:focus-visible + .visibility-choice__card {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Public donation page */
.preview-banner--test {
  background: #f6efe3;
  color: #6b4f1a;
  border-bottom: 1px solid #e7d6b8;
}

.donation-intro {
  margin: 0.25rem auto 1.1rem;
  max-width: 34rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-on-light);
}

.donation-intro + .donation-form {
  margin-top: 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.donation-form__note {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Keeps listed payment details apart from the giving form above them. */
.donation-details--split {
  margin-top: 2rem;
}

.donation-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

.donation-divider::before,
.donation-divider::after {
  content: '';
  flex: 1;
  min-width: 1.5rem;
  border-top: 1px solid var(--accent-soft);
}

.donation-details--split .donation-details__list {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--cream);
}

.link-card__tag {
  margin-left: 0.15rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 243, 205, 0.95);
  color: #6b4f1a;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Dashboard donation figures */
.memorial-donations {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head head"
    "figures go";
  gap: 0.55rem 0.9rem;
  align-items: center;
  margin-top: 0.9rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.memorial-donations__head {
  grid-area: head;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.memorial-donations__label {
  color: var(--navy);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.memorial-donations__waiting {
  color: var(--muted);
  font-size: 0.82rem;
}

.memorial-donations__figures {
  grid-area: figures;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}

.memorial-donations__figures:hover .memorial-donations__figure,
.memorial-donations__figures:focus-visible .memorial-donations__figure {
  border-color: var(--accent);
}

.memorial-donations__figure {
  display: block;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
  transition: border-color 0.15s ease;
}

.memorial-donations__figure span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.memorial-donations__figure strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--navy);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.memorial-donations__go {
  grid-area: go;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .memorial-donations {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "figures"
      "go";
  }

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

  .memorial-donations__go {
    justify-self: stretch;
    text-align: center;
  }

  .visibility-choice {
    grid-template-columns: 1fr;
  }
}

/* Reports: payments */
.report-stats--money {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-stats--money strong {
  font-size: 1.65rem;
}

.report-bar--money span {
  background: var(--accent);
}

@media (max-width: 560px) {
  .report-stats--money {
    grid-template-columns: 1fr 1fr;
  }
}

/* General settings */
.settings-stack {
  display: block;
}

.settings-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.settings-head h2 {
  margin-bottom: 0;
}

.settings-subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.settings-subhead h3 {
  margin: 0;
  font-size: 1rem;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin: -0.25rem 0 1rem;
}

.settle-schedule {
  display: grid;
  grid-template-columns: minmax(8rem, 10rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: end;
  transition: opacity 0.15s ease;
}

.settle-schedule.is-off {
  opacity: 0.5;
}

.day-picker {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.day-picker legend {
  width: 100%;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-grid .day-picker__day {
  position: relative;
  margin: 0;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.day-picker__day input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-picker__day span {
  display: inline-block;
  min-width: 3.1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.day-picker__day input:checked + span {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.day-picker__day input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.webhook-log td {
  vertical-align: top;
}

.webhook-log td:last-child {
  min-width: 16rem;
}

.settle-lines {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-on-light);
}

.settle-lines li + li {
  margin-top: 0.25rem;
}

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

.feature-block:has(input[name="donation_visibility"][value="test"]:checked) .feature-switch__input:checked + .feature-switch .feature-switch__badge {
  background: #fdf3df;
  color: #7a561a;
}

.feature-block:has(input[name="donation_visibility"][value="test"]:checked) .feature-switch__input:checked + .feature-switch .feature-switch__badge::before {
  content: 'Test';
}

.settings-actions .btn-primary {
  background: linear-gradient(180deg, #c4a379 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.webhook-log__when {
  white-space: nowrap;
}

/* Test-mode link to the donation page (editor) */
.test-link {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
  padding: 0.75rem 0.9rem;
  border: 1px dashed #e0c797;
  border-radius: 12px;
  background: #fdf8ef;
}

.feature-block:has(input[name="donation_visibility"][value="test"]:checked) .test-link {
  display: flex;
}

.test-link__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 14rem;
}

.test-link__copy strong {
  color: #6b4f1a;
}

.test-link__copy span {
  color: var(--muted);
  font-size: 0.86rem;
}

.memorial-donations__test {
  color: #7a561a;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.memorial-donations__test:hover {
  color: var(--navy);
}

/* The test link only applies while donations are switched on. */
.feature-block:has(> .feature-switch__input:not(:checked)) .test-link {
  /* Beats the more specific test-mode rule above. */
  display: none !important;
}

.cron-steps {
  margin: 0 0 0.6rem;
  padding-left: 1.2rem;
  color: var(--text-on-light);
  font-size: 0.92rem;
  line-height: 1.55;
}

.cron-steps li + li {
  margin-top: 0.3rem;
}

.cron-steps code {
  white-space: nowrap;
  padding: 0.05rem 0.35rem;
  border-radius: 6px;
  background: #f1ede7;
  font-size: 0.85em;
}

/* Manual settle (editor) */
.settle-now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.settle-now__copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 14rem;
}

.settle-now__copy strong {
  color: var(--navy);
}

.settle-now__copy span {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Admin pages get more room */
.account-wrap--admin {
  max-width: 76rem;
}

/* Settings tabs */
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  width: fit-content;
  max-width: 100%;
}

.settings-tab {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.settings-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.settings-tab[aria-selected="true"],
.settings-tab[aria-current="page"] {
  background: #fff;
  color: var(--navy);
}

.settings-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .settings-tabs {
    border-radius: 14px;
    width: 100%;
  }

  .settings-tab {
    flex: 1 1 45%;
  }
}

/* My Pages refresh */
.dash-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.dash-summary__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  flex: 1 1 28rem;
}

.dash-stat {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.dash-stat span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dash-stat strong {
  display: block;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.15;
}

.dash-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 0 1 auto;
  min-height: 52px;
  padding: 0.8rem 1.4rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #d6b584 0%, var(--accent) 100%);
  color: #1b2533;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(184, 149, 106, 0.25);
  transition: transform 0.2s ease;
}

.dash-create span {
  font-size: 1.4rem;
  line-height: 1;
}

.dash-create:hover {
  transform: translateY(-1px);
}

.memorial-id {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.memorial-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--accent-soft);
  background: var(--cream-dark);
}

.memorial-thumb--empty {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 600;
}

.memorial-row .memorial-id p {
  margin: 0.25rem 0 0;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.memorial-row .memorial-id .status {
  padding: 0.08rem 0.6rem;
  border: 1px solid #ecd3a0;
  border-radius: 999px;
  background: #fdf3df;
  color: #7a561a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.memorial-row .memorial-id .status-published {
  border-color: #bcdcc7;
  background: #e8f3ec;
  color: #24613a;
}

@media (max-width: 640px) {
  .dash-summary__stats {
    grid-template-columns: 1fr 1fr;
  }

  .dash-summary__stats .dash-stat:last-child {
    grid-column: 1 / -1;
  }

  .dash-create {
    width: 100%;
  }

  .memorial-thumb {
    width: 52px;
    height: 52px;
  }
}

/* Account app bar and menu, shared by every account page */
.account-wrap.account-wrap--app {
  max-width: 78rem;
  padding: 1.25rem 1.5rem 3rem;
}

.app-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.6rem 0.7rem 0.6rem 1rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(8, 18, 32, 0.25);
  color: var(--text-on-light);
}

.app-bar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--navy);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  text-decoration: none;
}

.app-bar__mark {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
}

.app-bar__nav {
  display: flex;
  flex: 1 1 auto;
  gap: 0.3rem;
  min-width: 0;
  overflow-x: auto;
}

.app-bar__nav a {
  flex: 0 0 auto;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: var(--text-on-light);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.app-bar__nav a:hover {
  background: var(--cream-dark);
  color: var(--navy);
}

.app-bar__nav a[aria-current="page"] {
  background: var(--navy);
  color: #fff;
}

.app-bar__user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.app-bar__user form {
  margin: 0;
}

.app-bar__avatar {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--cream-dark);
  color: var(--navy);
  font-weight: 700;
}

.app-bar__name {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-on-light);
  font-weight: 600;
}

.app-bar__logout {
  padding: 0.5rem 0.95rem;
  border: 1px solid #c9bfb2;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.app-bar__logout:hover,
.app-bar__logout:focus-visible {
  border-color: #8d3a3a;
  background: #8d3a3a;
  color: #fff;
}

button.btn-text {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.9rem 0 1.25rem;
}

.page-head h1 {
  margin: 0;
  color: #fff;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 600;
  line-height: 1.1;
}

.page-head p {
  margin: 0.3rem 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.page-head__action {
  gap: 0.45rem;
  background: linear-gradient(180deg, #d6b584 0%, var(--accent) 100%);
  color: #1b2533;
}

.page-head__action span {
  font-size: 1.3rem;
  line-height: 1;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.dash-stats .dash-stat {
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.dash-stats .dash-stat span {
  color: var(--muted);
}

.dash-stats .dash-stat strong {
  color: var(--navy);
  font-size: 2rem;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.card-head h2 {
  margin: 0;
}

.memorial-row h3 {
  margin: 0 0 0.3rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.15;
}

.memorial-row h3 a {
  color: var(--navy);
  text-decoration: none;
}

.memorial-row h3 a:hover {
  text-decoration: underline;
}

.memorial-row p.memorial-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin: 0;
  color: var(--text-on-light);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pager__count {
  margin: 0;
  color: var(--text-on-light);
  font-size: 0.92rem;
}

.pager__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.pager__num,
.pager__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.pager__num:hover,
.pager__step:hover {
  border-color: var(--navy);
}

.pager__num[aria-current="page"] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.pager__step.is-disabled {
  color: #9a8f84;
  cursor: default;
}

.pager__gap {
  padding: 0 0.2rem;
  color: var(--muted);
}

/* Editor: header, back link and Report tab */
.account-wrap--wide > .app-bar {
  margin-bottom: 1rem;
}

.editor-back {
  margin: 0 0 0.5rem;
}

.editor-back a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.editor-back a:hover {
  color: var(--accent);
}

.account-card:has(#page-form[hidden]) .page-save-bar {
  display: none;
}

.report-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin-bottom: 1rem;
}

.report-period .hint {
  margin: 0;
}

.report-period__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.report-period__link {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.report-period__link[aria-current="true"] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.editor-report .account-card {
  margin-bottom: 0.85rem;
  border-top-width: 1px;
  box-shadow: none;
}

@media (max-width: 900px) {
  .dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-bar__nav {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 640px) {
  .account-wrap.account-wrap--app {
    padding: 1rem 1rem 2.5rem;
  }

  .app-bar__name {
    display: none;
  }

  .page-head__action {
    width: 100%;
  }

  .memorial-row {
    flex-direction: column;
    align-items: stretch;
  }

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

/* Brand on the sign-in pages */
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.auth-brand img {
  display: block;
}

/* Site footer */
.site-footer {
  position: relative;
  z-index: 3;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 22, 38, 0.35);
  color: rgba(246, 241, 234, 0.74);
  font-size: 0.92rem;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.75rem;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer__brand p {
  max-width: 24rem;
  margin: 0 0 0.6rem;
  line-height: 1.6;
}

.site-footer__product a {
  color: #c9a574;
  font-weight: 600;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.site-footer__col h2 {
  margin-bottom: 0.3rem;
  color: #c9a574;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer a {
  color: rgba(246, 241, 234, 0.86);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer__social {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.site-footer__social a {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.site-footer__social a:hover {
  border-color: #c9a574;
  color: #c9a574;
  text-decoration: none;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* About and Legal pages */
.info-page {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}

.info-hero {
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.info-hero .lp-eyebrow {
  margin-bottom: 0.6rem;
}

.info-hero h1 {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
}

.info-hero p {
  max-width: 38rem;
  margin: 1rem auto 0;
  color: rgba(246, 241, 234, 0.8);
  font-size: 1.1rem;
  line-height: 1.65;
}

.info-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.info-tabs a {
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.info-tabs a:hover {
  border-color: #c9a574;
  color: #c9a574;
}

.info-card {
  margin-bottom: 1.25rem;
  padding: 2rem 2.1rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  color: var(--text-on-light);
  line-height: 1.7;
  scroll-margin-top: 1.5rem;
}

.info-card h2 {
  margin-bottom: 0.5rem;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
}

.info-card h3 {
  margin: 1.4rem 0 0.35rem;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
}

.info-card p,
.info-card ul {
  margin-bottom: 0.75rem;
}

.info-card ul {
  padding-left: 1.25rem;
}

.info-card li {
  margin-bottom: 0.35rem;
}

.info-card a {
  color: var(--navy);
  font-weight: 600;
}

.info-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.info-logo {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.info-logo__mark {
  padding: 1.25rem;
  border-radius: 18px;
  background: var(--navy);
}

.info-logo__mark img {
  display: block;
  width: 100%;
  height: auto;
}

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

.info-points div {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.info-points strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.info-points span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

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

.info-contact div {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--cream-dark);
}

.info-contact span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .info-card {
    padding: 1.5rem 1.25rem;
  }

  .info-logo,
  .info-points,
  .info-contact {
    grid-template-columns: 1fr;
  }

  .info-logo__mark {
    max-width: 11rem;
  }
}

/* Contact page */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-captcha {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.contact-captcha img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.contact-captcha button {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.contact-hint {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-aside h2 {
  font-size: 1.6rem;
}

.contact-aside dl {
  margin: 0.9rem 0 0;
}

.contact-aside dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-aside dd {
  margin: 0 0 0.85rem;
}

.info-action {
  margin: 1.2rem 0 0;
}

@media (max-width: 760px) {
  .contact-layout,
  .contact-row {
    grid-template-columns: 1fr;
  }
}

.settlement-back {
  color: inherit;
}

.settlement-transfers__title {
  margin: 1rem 0 0.25rem;
  color: var(--navy);
  font-size: 1rem;
}

.settlement-to-send {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.settlement-to-send strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--navy);
}

.settlement-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.settlement-proof input[type="file"] {
  max-width: 13rem;
  font-size: 0.8rem;
}

.settlement-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 0.75rem;
  padding: 0;
  list-style: none;
}

.payment-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.6rem 0.35rem 0.4rem;
  border: 1px solid #d9d5cc;
  border-radius: 8px;
  background: #fff;
  color: #1a2f4b;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.payment-option__logos {
  display: inline-flex;
  gap: 0.25rem;
}

.payment-option__logos img {
  display: block;
  width: 38px;
  height: 24px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(26, 47, 75, 0.12);
}

/* Death certificate check */
.verify-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: #fbf7f0;
}

.verify-card p {
  margin: 0;
}

.verify-card__upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.25rem;
}

.verify-card__upload input[type="file"] {
  flex: 1 1 14rem;
  min-width: 0;
}

.verify-review {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.verify-review__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}

.verify-review__head h3 {
  margin: 0 0 0.15rem;
}

.verify-review__head p {
  margin: 0;
}

.verify-review__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 0.85rem;
}

.verify-review__reject {
  display: flex;
  flex: 1 1 18rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.verify-review__reject label {
  font-size: 0.85rem;
  font-weight: 600;
}

.verify-review__reject textarea {
  width: 100%;
}

/* Music tab in the editor */
.music-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.75rem 0;
  padding: 0;
  list-style: none;
}

.music-list:empty {
  display: none;
}

.music-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.music-list strong {
  flex: 1 1 100%;
  overflow-wrap: anywhere;
}

.music-list audio {
  flex: 1 1 14rem;
  min-width: 0;
  height: 2.25rem;
}

.music-editor__add {
  display: inline-flex;
  cursor: pointer;
}

/* On/off switch for a single item (documents, donation entries) */
.form-grid label.item-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.5rem;
  margin: 0;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.item-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.item-switch__track {
  position: relative;
  flex: 0 0 auto;
  width: 2.2rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #cfc7bb;
  transition: background 0.15s ease;
}

.item-switch__track::after {
  content: '';
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.item-switch input:checked + .item-switch__track {
  background: var(--navy);
}

.item-switch input:checked + .item-switch__track::after {
  transform: translateX(0.95rem);
}

.item-switch input:focus-visible + .item-switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.item-switch__text::before {
  content: 'Hidden';
}

.item-switch input:checked ~ .item-switch__text::before {
  content: 'Showing';
}

.donation-entry-edit:has(.item-switch input:not(:checked)),
.document-row:has(.item-switch input:not(:checked)) {
  border-style: dashed;
  background: #f6f2ec;
}

/* Additional programme documents */
.documents-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.documents-block__title {
  margin: 0;
  color: var(--navy);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
}

#documents-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#documents-list:empty {
  display: none;
}

#add-document {
  align-self: flex-start;
}

.document-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.document-row label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.form-grid .document-row label.item-switch {
  flex-direction: row;
}

.document-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.document-row__head .album-delete {
  align-self: center;
}

.document-row__file {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.document-row__removing {
  display: none;
  margin: 0;
  color: #8d2a2a;
  font-size: 0.9rem;
}

.document-row__removing button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.document-row.is-removing {
  border-color: #e4c7c7;
  background: #fbf1f0;
}

.document-row.is-removing > label,
.document-row.is-removing .document-row__file,
.document-row.is-removing .document-row__head {
  display: none;
}

.document-row.is-removing .document-row__removing {
  display: block;
}

/* Document viewer on the public programme page */
.document-viewer {
  margin: auto;
  width: min(64rem, calc(100vw - 1.5rem));
  height: calc(100vh - 1.5rem);
  height: calc(100dvh - 1.5rem);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.document-viewer[open] {
  display: flex;
  flex-direction: column;
}

.document-viewer::backdrop {
  background: rgba(8, 12, 20, 0.8);
}

.document-viewer__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.document-viewer__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-viewer__open {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.document-viewer__close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.document-viewer__body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1ede7;
}

.document-viewer__body iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.document-viewer__body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.document-viewer__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem 0.4rem 1rem;
  border-bottom: 1px solid var(--border);
}

.document-viewer__tools[hidden] {
  display: none;
}

.document-viewer__page {
  flex: 1;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.document-viewer__zoom {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.document-viewer__body.is-pdf {
  display: block;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.document-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: max-content;
  min-width: 100%;
  padding: 0.75rem;
  box-sizing: border-box;
}

.document-page {
  flex: 0 0 auto;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(18, 35, 56, 0.16);
}

.document-page canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.document-viewer__message {
  margin: 0;
  padding: 2rem 1rem;
  color: var(--muted);
  text-align: center;
}

.document-viewer__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 2rem 1rem;
  color: var(--navy);
  font-weight: 600;
  text-align: center;
}

.document-viewer__loading p {
  margin: 0;
}

.document-viewer__loading .document-viewer__progress {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.document-viewer__spinner,
.document-page:empty::after {
  border: 3px solid rgba(26, 47, 75, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: document-spin 0.9s linear infinite;
}

.document-viewer__spinner {
  width: 44px;
  height: 44px;
  margin-bottom: 0.5rem;
}

.document-page:empty {
  position: relative;
}

.document-page:empty::after {
  content: '';
  position: absolute;
  top: calc(50% - 16px);
  left: calc(50% - 16px);
  width: 32px;
  height: 32px;
  box-sizing: border-box;
}

.document-viewer__body iframe[hidden] {
  display: none;
}

@keyframes document-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .document-viewer__spinner,
  .document-page:empty::after {
    animation-duration: 2.4s;
  }
}

/* Split payments: payout changes waiting for approval */
.payout-change {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #ecd3a0;
  border-radius: 12px;
  background: #fdf8ef;
}

.payout-change h3 {
  margin: 0 0 0.35rem;
  color: var(--navy);
  font-size: 1.05rem;
}

.payout-pending {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid #ecd3a0;
  border-radius: 10px;
  background: #fdf8ef;
  color: #6b4f1a;
  font-size: 0.92rem;
}

/* Donation setup: the checklist at the top of the tab and the numbered steps in Collect */
.setup-steps {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbf7f0;
}

.setup-steps__title {
  margin: 0 0 0.55rem;
  color: var(--navy);
  font-weight: 700;
}

.setup-steps__list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-steps__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.setup-steps__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.setup-steps__item a.status-pill {
  text-decoration: none;
  cursor: pointer;
}

.setup-steps__num {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.setup-step {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 0 0.25rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 5rem;
}

.setup-step:first-child {
  border-top: 0;
  padding-top: 0.25rem;
}

.setup-step__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

#collect-fields {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

#collect-fields[hidden] {
  display: none;
}

.verify-card--done {
  border-left-color: #24613a;
  background: #f3f9f5;
}

.payout-verify {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.payout-verify p {
  margin: 0;
}

.payout-verify__state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.payout-verify__name {
  font-weight: 600;
}

.payout-verify__step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.payout-verify__step[hidden] {
  display: none;
}

.payout-verify__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.payout-verify__row input {
  flex: 0 1 10rem;
  min-width: 0;
  letter-spacing: 0.2em;
}

.payout-verify .is-error {
  color: #8a2c2c;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

.setup-step[hidden],
.payout-verify [hidden] {
  display: none !important;
}
