/* ===========================
   说给神听 say.church — Global Styles
   =========================== */

/* ---------- Tokens ---------- */
:root {
  --bg:        #F3EAD8;
  --bg-card:   #F3EAD8;
  --text:      #3B200C;
  --text-muted:#8A7060;
  
  --gold-light:#E8D194;
  
  --border:    #F3EAD8;
  --shadow:    0 .25rem 1.5rem rgba(59,32,12,.10);
  --shadow-sm: 0 2px .5rem  rgba(59,32,12,.06);
  --radius-lg: 1rem;
  --radius-md: .75rem;
  --radius-sm: .5rem;
  --font: -apple-system, "PingFang SC", "Microsoft YaHei",
           BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 1rem; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout Wrapper ---------- */
.app-wrapper {
  max-width: 30rem;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: 5rem;
}

/* ---------- Top Bar ---------- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243,234,216,.92);
  backdrop-filter: blur(.875rem);
  -webkit-backdrop-filter: blur(.875rem);
  border-bottom: 1px solid var(--border);
  padding: .625rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .625rem;
}

.top-bar .logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.top-bar .logo-icon {
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.top-bar .logo-text {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}

/* Lang Toggle */
.lang-toggle {
  display: flex;
  background: rgba(243,234,216,.7);
  border-radius: 1.25rem;
  padding: .1875rem;
  gap: 2px;
}

.lang-toggle button {
  border: none;
  background: transparent;
  padding: .25rem .5rem;
  border-radius: 1rem;
  font-size: .7812rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.lang-toggle button.active {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 1px .25rem rgba(201,168,76,.35);
}

/* ---------- Page Content ---------- */
.page-content {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ---------- Cross Banner ---------- */
.cross-banner {
  position: relative;
  width: calc(100% + 2.5rem);
  margin: -1.25rem -1.25rem 0;
  height: 7.5rem;
  overflow: hidden;
  flex-shrink: 0;
  background: #F3EAD8;
  border: 1px solid rgba(116, 86, 28, .62);
  box-shadow:
    0 .625rem 1.75rem rgba(116, 86, 28, .14),
    inset 0 0 0 1px rgba(232, 209, 148, .42);
}

.cross-banner::before {
  content: '';
  position: absolute;
  inset: .8125rem;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(232, 209, 148, .88);
  border-radius: .6875rem;
  box-shadow: inset 0 0 0 1px rgba(116, 86, 28, .42);
}

@media (min-width: 768px) {
  .cross-banner { height: 10rem; }
}
.cross-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.cross-banner-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4.375rem;
  background: linear-gradient(to bottom, transparent, #F3EAD8);
}

/* ---------- Page Title ---------- */
.page-title {
  text-align: center;
  padding: .25rem 0 2px;
}
.page-title h1 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.4px;
  line-height: 1.4;
}
.page-title p {
  margin-top: .3125rem;
  font-size: .8438rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-sub-ref {
  display: block;
  text-align: right;
  margin-top: 2px;
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.125rem;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: .7812rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .65px;
  margin-bottom: .75rem;
}

/* ---------- Form Elements ---------- */
textarea, input[type="text"] {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: .9375rem;
  padding: .75rem .875rem;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

textarea:focus, input[type="text"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 .1875rem rgba(201,168,76,.13);
}

/* ---- Reminder Card ---- */
.reminder-card {
  padding: 1.25rem;
  background: #F3EAD8;
  border-radius: 1rem;
  border: 0.5px solid #e2d9c5;
}

/* Header row */
.reminder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reminder-title {
  font-size: .8125rem;
  font-weight: 500;
  color: #9e9087;
}

.reminder-badge {
  display: inline-flex;
  align-items: center;
  gap: .3125rem;
  font-size: .6875rem;
  padding: .1875rem .625rem .1875rem .4375rem;
  border-radius: 1.25rem;
  font-weight: 500;
  white-space: nowrap;
}

.reminder-badge::before {
  content: '';
  display: inline-block;
  width: .4375rem;
  height: .4375rem;
  border-radius: 50%;
  flex: none;
}

.reminder-badge.granted {
  background: #e8f5e9;
  color: #2e7d32;
}

.reminder-badge.granted::before {
  background: #4caf50;
}

.reminder-badge.denied {
  background: #F3EAD8;
  color: #c62828;
}

.reminder-badge.denied::before {
  background: #f44336;
}

.reminder-badge.default {
  background: #F3EAD8;
  color: #74561C;
}

.reminder-badge.default::before {
  background: #C9A84C;
}

/* Divider */
.reminder-divider {
  border-top: 0.5px solid #e2d9c5;
  margin: .75rem 0;
}

/* Time block + button row — Row / crossAxisAlignment: stretch */
.reminder-row {
  display: flex;
  align-items: stretch;   /* CrossAxisAlignment.stretch */
  gap: .625rem;
  height: 6.25rem;          /* fixed row height */
}

/* Left: Expanded — fills remaining width */
.reminder-time-block {
  flex: 1;                /* Expanded */
  background: #F3EAD8;
  border: 1.5px solid #c9a84c;
  border-radius: .875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
}

.reminder-time-label {
  font-size: .625rem;
  color: #a07c30;
  font-weight: 500;
  letter-spacing: 0.03em;
  user-select: none;
}

.reminder-time-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #74561C;
  font-family: var(--font);
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Right: fixed width 90px, same radius & height as sibling */
.btn-save-reminder {
  width: 5.625rem;
  flex: none;
  background: #A07C30;
  color: #fff;
  border: none;
  border-radius: .875rem;    /* 与时间块完全一致 */
  font-size: .875rem;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: background .18s;
  line-height: 1.4;
  touch-action: manipulation;
}

/* Wrapper that holds the button + overlaid time input */
.reminder-btn-wrap {
  position: relative;
  width: 5.625rem;
  flex: none;
}

.btn-save-reminder:hover  { background: #A07C30; }
.btn-save-reminder:active { background: #74561C; }

/* Permission request button — outline style */
.btn-perm-request {
  margin-top: .625rem;
  width: 100%;
  background: transparent;
  border: 1px solid #A07C30;
  border-radius: .625rem;
  font-size: .8125rem;
  font-family: var(--font);
  color: #A07C30;
  padding: .625rem;
  text-align: center;
  cursor: pointer;
  transition: background .18s, color .18s;
}

.btn-perm-request:hover {
  background: rgba(160,124,48,0.06);
}

/* Footer: clock icon + status text */
.reminder-footer {
  margin-top: .625rem;
  display: flex;
  align-items: center;
  gap: .3125rem;
}

.reminder-footer-icon {
  color: #c0b8a8;
  flex: none;
  line-height: 0;
}

.reminder-footer-text {
  font-size: .6875rem;
  color: #bbb;
  line-height: 1.4;
}

textarea {
  min-height: 6.875rem;
}

::placeholder { color: #BBA898; }

/* ---------- Radio / Topic Selector ---------- */
.tone-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5625rem;
}

.tone-option {
  position: relative;
}

.tone-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.tone-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3125rem;
  padding: .5625rem .375rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  transition: var(--transition);
  user-select: none;
  letter-spacing: .1px;
  line-height: 1.3;
  text-align: center;
}

.tone-option input[type="radio"]:checked + label {
  border-color: var(--gold);
  background: linear-gradient(135deg, #F3EAD8, #F3EAD8);
  color: var(--gold-dark);
  font-weight: 700;
  box-shadow: 0 0 0 .1875rem rgba(201,168,76,.12);
}

.tone-option label:hover {
  border-color: var(--gold-light);
  color: var(--text);
  background: #F3EAD8;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4375rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  padding: .75rem 1.25rem;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-primary {
  background: #A07C30;
  color: #fff;
  width: 100%;
  letter-spacing: .2px;
}

.btn-primary:hover  { background: #A07C30; }
.btn-primary:active { background: #74561C; }

.btn-primary:disabled {
  opacity: .55;
  pointer-events: none;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--gold-light);
  background: #F3EAD8;
  color: var(--gold-dark);
}

.btn-sm {
  padding: .4375rem .875rem;
  font-size: .8125rem;
}

.btn-icon {
  width: 2.25rem; height: 2.25rem;
  padding: 0;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: .9375rem;
}

.btn-icon:hover {
  border-color: var(--gold-light);
  color: var(--gold);
  background: #F3EAD8;
}

/* ---------- Verse Card (vellum style) ---------- */
.verse-cards {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  animation: fadeIn .4s ease both;
}

.verse-card {
  position: relative;
  background: linear-gradient(135deg, #F3EAD8, #F3EAD8);
  border: 1px solid rgba(201,168,76,.45);
  border-radius: .625rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px .625rem rgba(116,86,28,.07);
}

.verse-card .verse-text {
  font-size: .9375rem;
  line-height: 1.6;
  color: #3B200C;
  font-style: normal;
  font-family: "STKaiti", "KaiTi", "AR PL UKai CN", Georgia, "Times New Roman", serif;
  letter-spacing: .3px;
}

.verse-card .verse-ref {
  font-size: .7812rem;
  color: #C9A84C;
  margin-top: .625rem;
  text-align: right;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .5px;
  font-family: "STKaiti", "KaiTi", Georgia, serif;
}

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8438rem;
  color: var(--text-muted);
  padding: .5rem 0;
}

.step-dot {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--gold-light);
  flex-shrink: 0;
  transition: background var(--transition);
}

.step-dot.active {
  background: var(--gold);
  box-shadow: 0 0 0 .1875rem rgba(201,168,76,.2);
}

.step-dot.done {
  background: #5BBF8A;
}

/* ---------- Result Box ---------- */
.result-box {
  padding: 1.5rem;
  background: linear-gradient(135deg, #F3EAD8, #F3EAD8);
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: .75rem;
  font-size: 1rem;
  line-height: 1.9;
  color: #3B200C;
  font-family: STKaiti, KaiTi, Georgia, serif;
  word-break: break-word;
}

.prayer-title {
  text-align: center;
  font-weight: bold;
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.prayer-title::before,
.prayer-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(201,168,76,0.5);
}

.prayer-body {
  margin: 0;
  text-indent: 2em;
}

.result-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .625rem;
  padding: 1.375rem 0 1.5rem 0;
}

/* 复制/朗读按钮：透明背景 + 金色描边 + SVG 图标对齐 */
.result-controls .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  background: transparent;
  border: 1px solid #C9A84C;
  border-radius: .5rem;
  color: #C9A84C;
  font-family: "STKaiti", "KaiTi", Georgia, serif;
  letter-spacing: .4px;
  font-weight: 600;
  transition: var(--transition);
}

.result-controls .btn-secondary:hover {
  background: rgba(201,168,76,.08);
  border-color: #A07C30;
  color: #A07C30;
}

.result-controls .btn-secondary:hover svg {
  stroke: #A07C30;
}

/* Streaming cursor */
.cursor-blink {
  display: inline-block;
  width: 2px; height: 1rem;
  background: #74561C;
  border-radius: 1px;
  margin-left: 2px;
  vertical-align: middle;
  animation: blink .9s step-end infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 1.375rem; height: 1.375rem;
  border: .1562rem solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

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

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 5.625rem;
  left: 50%; transform: translateX(-50%);
  background: rgba(59,32,12,.92);
  color: #fff;
  padding: .625rem 1.375rem;
  border-radius: 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transition: opacity .3s, bottom .3s;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(.5rem);
}

.toast.show {
  opacity: 1;
  bottom: 6rem;
}

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 30rem;
  background: rgba(243,234,216,.95);
  backdrop-filter: blur(.875rem);
  -webkit-backdrop-filter: blur(.875rem);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: .5rem 0 calc(.5rem + env(safe-area-inset-bottom));
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1875rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: .6875rem;
  font-weight: 500;
  padding: .25rem .5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-item .nav-icon {
  font-size: 1.375rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: transform var(--transition);
}

.nav-item .nav-icon svg {
  color: inherit;
}

.nav-item.active {
  color: var(--gold-dark);
}

.nav-item.active .nav-icon {
  transform: scale(1.15);
}

.nav-item:hover { color: var(--gold); }

/* ---------- Section Divider (ornate gold) ---------- */
.divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #A07C30;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--font);
}

.divider::before {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent 0%, #C9A84C 50%, #E8D194 100%);
}

.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, transparent 0%, #C9A84C 50%, #E8D194 100%);
}

/* ---------- Save Prompt Banner ---------- */
.save-prompt {
  background: linear-gradient(135deg, #F3EAD8, #F3EAD8);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: .875rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .625rem;
  animation: slideUp .4s cubic-bezier(.4,0,.2,1) both;
  box-shadow: 0 2px .5rem rgba(201,168,76,.1);
}

.save-prompt p {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.save-prompt .save-actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(.625rem); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Diary Page Specifics ---------- */
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.stat-card {
  background: linear-gradient(135deg, #F3EAD8, #F3EAD8);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: 1.125rem 1rem;
  text-align: center;
  box-shadow: 0 2px .5rem rgba(201,168,76,.08);
}

.stat-card .stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--gold-dark);
  line-height: 1.1;
}

.stat-card .stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .3125rem;
  letter-spacing: .2px;
}

/* Tag chips */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.tag-chip {
  position: relative;
}

.tag-chip input[type="checkbox"],
.tag-chip input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}

.tag-chip label {
  display: inline-block;
  padding: .3125rem .8125rem;
  border: 1.5px solid var(--border);
  border-radius: 1.25rem;
  font-size: .8125rem;
  cursor: pointer;
  color: var(--text-muted);
  background: var(--bg);
  transition: var(--transition);
  user-select: none;
}

.tag-chip input[type="checkbox"]:checked + label,
.tag-chip input[type="radio"]:checked + label {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  font-weight: 600;
}

.tag-chip label:hover { border-color: var(--gold-light); color: var(--text); }

/* Journal entries */
.date-group-label {
  font-size: .7188rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .7px;
  padding: .25rem 2px 2px;
  margin: .5rem 0 .625rem;
}

.journal-entry {
  background: linear-gradient(135deg, #F3EAD8, #F3EAD8);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: .875rem 2.5rem .875rem 1rem;
  position: relative;
  animation: slideUp .3s ease both;
  box-shadow: 0 2px .5rem rgba(116,86,28,.06);
  margin-bottom: 1rem;
}

.journal-entry .entry-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
}

.journal-entry .entry-time {
  font-size: .75rem;
  color: var(--text-muted);
}

.journal-entry .entry-tag {
  display: inline-block;
  padding: 2px .5625rem;
  border-radius: .625rem;
  font-size: .6875rem;
  font-weight: 600;
  background: rgba(201,168,76,.15);
  color: var(--gold-dark);
}

.journal-entry .entry-text {
  font-size: .9062rem;
  line-height: 1.85;
  color: #3B200C;
}

.journal-entry .entry-delete {
  position: absolute;
  top: .75rem; right: .75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(138,112,96,.4);
  font-size: .9375rem;
  padding: .25rem;
  transition: color var(--transition);
  line-height: 1;
}
.journal-entry .entry-delete:hover { color: #E05555; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.25rem;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 2.75rem; margin-bottom: .75rem; }
.empty-state p { font-size: .875rem; line-height: 1.7; }

/* ---------- Reminder Page ---------- */
.time-display {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gold-dark);
  text-align: center;
  letter-spacing: -1px;
}

.permission-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .3125rem .75rem;
  border-radius: .875rem;
  font-size: .8125rem;
  font-weight: 600;
}

.permission-badge.granted { background: #E8F8EF; color: #2D7A4F; }
.permission-badge.denied  { background: #F3EAD8; color: #C0392B; }
.permission-badge.default { background: #F3EAD8; color: var(--gold-dark); }

/* Prevent iOS Safari click-on-child-span from swallowing the event */
.btn > span, .btn > svg { pointer-events: none; }

/* Inline verse reference — keep on its own line, never break mid-word */
.verse-inline-ref {
  display: block;
  margin-top: .375rem;
  white-space: nowrap;
  font-size: 0.88em;
  opacity: 0.75;
  text-align: right;
}

/* Verse refresh flash animation */
@keyframes verseFlash {
  0%   { opacity: 0; transform: translateY(-.25rem); }
  100% { opacity: 1; transform: translateY(0); }
}
.verse-flash { animation: verseFlash 0.35s ease both; }

/* 金句框：羊皮纸风格，与经文卡片统一 */
.verse-box {
  background: linear-gradient(160deg, #F3EAD8 0%, #F3EAD8 60%, #F3EAD8 100%);
  border-left: .25rem solid var(--gold);
  border-top: 1px solid rgba(201,168,76,.22);
  border-right: 1px solid rgba(201,168,76,.1);
  border-bottom: 1px solid rgba(201,168,76,.15);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .875rem 1rem .875rem 1rem;
  font-size: .9375rem;
  line-height: 1.95;
  font-style: normal;
  font-family: "STKaiti", "KaiTi", Georgia, serif;
  color: #3B200C;
  box-shadow: 0 2px .625rem rgba(116,86,28,.08);
}

/* Canvas share area */
#shareCanvas {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-light);
  display: block;
  box-shadow: 0 2px .75rem rgba(116,86,28,.08);
}

/* ---------- Community Page ---------- */
.prayer-card {
  background: linear-gradient(135deg, #F3EAD8, #F3EAD8);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  animation: slideUp .3s ease both;
  box-shadow: 0 2px .5rem rgba(116,86,28,.06);
  margin-bottom: .875rem;
}

.prayer-card .prayer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .625rem;
  flex-wrap: wrap;
  gap: .375rem;
}

.prayer-card .author {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
}

.prayer-card .category-badge {
  padding: .1875rem .625rem;
  border-radius: 1.25rem;
  font-size: .7188rem;
  font-weight: 600;
  background: rgba(201,168,76,.14);
  color: var(--gold-dark);
}

.prayer-card .prayer-text {
  font-size: .9062rem;
  line-height: 1.85;
  color: #3B200C;
  margin-bottom: .75rem;
}

.prayer-card .prayer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.candle-btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .4375rem .875rem;
  border: 1.5px solid rgba(201,168,76,.4);
  border-radius: 1.25rem;
  background: transparent;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gold-dark);
  transition: var(--transition);
  font-family: var(--font);
}

.candle-btn:hover, .candle-btn.lit {
  border-color: var(--gold);
  background: rgba(201,168,76,.1);
  color: var(--gold-dark);
}

.candle-btn.lit { pointer-events: none; }

.prayer-card .prayer-time {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  padding: .375rem .875rem;
  border-radius: 1.25rem;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  transition: var(--transition);
  font-family: var(--font);
}

.filter-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 2px .5rem rgba(201,168,76,.28);
}

/* ---------- API Key Input Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,26,14,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #F3EAD8;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  width: 100%;
  max-width: 26.25rem;
  box-shadow:
    0 1.25rem 3.75rem rgba(44,26,14,.22),
    0 0 0 1px rgba(201,168,76,.15);
  transform: translateY(1.25rem);
  transition: transform .3s;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal h2 {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: .5rem;
  color: var(--text);
}

.modal p {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 1.125rem;
  line-height: 1.65;
}

.modal .modal-actions {
  display: flex;
  gap: .625rem;
  margin-top: 1rem;
}

/* ---------- Auth Button ---------- */
#authBtn {
  width: 2.125rem;
  height: 2.125rem;
  padding: 0;
  border-radius: 50% !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1;
}

/* Default icon via CSS so button isn't blank before JS runs */
#authBtn:empty::after {
  content: '';
  display: block;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-4 { margin-top: .25rem; }
.mt-8 { margin-top: .5rem; }
.mt-12 { margin-top: .75rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: .5rem; }
.gap-10 { gap: .625rem; }
.hidden { display: none !important; }

/* Fade animation */
.fade-in { animation: fadeIn .4s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(.375rem); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Responsive minor tweaks for wider screens */
@media (min-width: 481px) {
  .app-wrapper {
    box-shadow: 0 0 0 1px rgba(201,168,76,.12),
                0 .5rem 3rem rgba(59,32,12,.08);
  }
}

/* ---------- Shared Component Styles ---------- */

/* Top bar actions wrapper */
.top-bar-actions {
  display: flex;
  align-items: center;
  gap: .625rem;
}

/* Auth modal — logged-in state (hidden by default; JS shows when logged in) */
.auth-logged-in {
  display: none;
  text-align: center;
}

/* Result section flex column */
.result-section {
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

/* Auth avatar */
.auth-avatar {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  margin-bottom: .625rem;
}

/* Auth user name */
.auth-username {
  font-weight: 700;
  margin: 0 0 .25rem;
}

/* Auth user email */
.auth-useremail {
  font-size: .75rem;
  color: var(--text-muted);
  margin: 0 0 .875rem;
}

/* Auth sync status */
.auth-sync-status {
  font-size: .8125rem;
  color: #2D7A4F;
  margin: 0 0 1rem;
}

/* Auth description in modal */
.auth-desc {
  color: var(--text-muted);
  margin: .5rem 0 1.25rem;
  font-size: .875rem;
}

/* Auth Google sign-in button */
.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
}

/* Auth sign-out button */
.auth-signout-btn {
  width: 100%;
}

/* Char counter row */
.char-counter-row {
  text-align: right;
  margin-top: .25rem;
}

.char-counter {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Full-width button */
.btn-full {
  width: 100%;
}

/* Flex row with gap */
.flex-row {
  display: flex;
  align-items: center;
  gap: .625rem;
}

/* Inline margin helpers */
.mt-10 { margin-top: .625rem; }
.mt-12 { margin-top: .75rem; }
.mt-14 { margin-top: .875rem; }
.mt-16 { margin-top: 1rem; }
.mb-10 { margin-bottom: .625rem; }

/* .reminder-status removed — replaced by .reminder-footer */

/* Diary picker select */
.diary-picker {
  margin-top: .625rem;
  width: 100%;
  padding: .625rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: .5rem;
  font-family: var(--font);
  font-size: .875rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
}

/* ---------- Prayer flow polish ---------- */
.app-wrapper {
  max-width: 60rem;
  background: color-mix(in srgb, var(--bg) 94%, var(--gold-light));
}

.top-bar {
  padding: .8125rem clamp(1.25rem, 4vw, 2.625rem);
}

.page-content {
  width: min(100%, 51.25rem);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.625rem) clamp(1.25rem, 5vw, 3.5rem) 2.625rem;
  gap: 1.5rem;
}

.cross-banner {
  width: 100%;
  margin: 0;
  height: clamp(8.75rem, 22vw, 13.75rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.page-title {
  padding: .5rem 0 0;
}

.page-title h1 {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  letter-spacing: -.8px;
}

.page-title p {
  max-width: 46ch;
  margin: .5rem auto 0;
  font-size: .875rem;
}

.card {
  padding: clamp(1.125rem, 3vw, 1.5rem);
  border-radius: var(--radius-lg);
}

.card-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}

.card-heading-row .card-title { margin-bottom: .75rem; }

.card-hint {
  color: var(--text-muted);
  font-size: .75rem;
  white-space: nowrap;
}

textarea {
  min-height: 8.25rem;
  line-height: 1.75;
}

.tone-group { gap: .625rem; }

.tone-option label {
  min-height: 2.75rem;
  padding: .625rem .5rem;
}

.generate-btn {
  min-height: 3.25rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  box-shadow: 0 .5rem 1.125rem rgba(160,124,48,.18);
}

.btn:focus-visible,
.tone-option input[type="radio"]:focus-visible + label,
.lang-toggle button:focus-visible,
.nav-item:focus-visible {
  outline: .1875rem solid rgba(160, 124, 48, .38);
  outline-offset: .1875rem;
}

.result-section {
  padding-top: .25rem;
}

.result-status {
  padding: .75rem .875rem;
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  line-height: 1.6;
}

.result-status-error {
  background: #F3EAD8;
  border: 1px solid #f0c2b7;
  color: #9c4433;
}

.result-box {
  padding: clamp(1.375rem, 4vw, 2.125rem);
  border-radius: var(--radius-lg);
  box-shadow: 0 .5rem 1.5rem rgba(116,86,28,.08);
}

.result-controls {
  padding: 1.5rem 0 .25rem;
}

.bottom-nav {
  max-width: 60rem;
}

@media (min-width: 768px) {
  .page-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .cross-banner,
  .page-title,
  .generate-btn,
  .result-section {
    grid-column: 1 / -1;
  }

  .page-title { margin-bottom: 2px; }
  .result-section { width: min(100%, 47.5rem); justify-self: center; }
}

@media (min-width: 1024px) {
  body {
    position: relative;
    background-color: var(--bg);
    background-image:
      linear-gradient(rgba(255, 255, 255, .58), rgba(255, 255, 255, .58)),
        url("/images/church-pattern.webp");
    background-repeat: no-repeat, repeat;
    background-size: auto, 39.1875rem 39.1875rem;
    background-position: center top, center top;
  }

  /* The church-inspired ornament now covers the complete desktop canvas. */
  body::before,
  body::after {
    display: none;
  }

  body::before { left: 0; }
  body::after { right: 0; transform: scaleX(-1); }

  .app-wrapper {
    max-width: 80rem;
    position: relative;
    z-index: 1;
    background: #F3EAD8;
    box-shadow: 0 0 0 1px rgba(201,168,76,.14), 0 1.125rem 4.5rem rgba(59,32,12,.10);
  }

  .top-bar {
    padding-inline: clamp(2.25rem, 6vw, 5.5rem);
  }

  .top-bar .logo-text { font-size: 1.5rem; }
  .top-bar .logo-text span { font-size: 1rem !important; }
  .top-bar .logo-icon { width: 3.125rem; height: 3.125rem; }

  .page-content {
    width: min(100%, 72.5rem);
    padding: 2.125rem 0 4rem;
    gap: 1.5rem;
  }

  .cross-banner {
    height: 31.25rem;
    border-radius: 1.375rem;
  }

  /* Keep the banner size, but reveal the table and objects in the original photo. */
  .cross-banner img {
    object-position: center 72%;
  }

  .page-title {
    padding: .625rem 0 .25rem;
  }

  .page-title h1 {
    font-size: 3.25rem;
    letter-spacing: -1.8px;
    line-height: 1.12;
  }

  .page-title p {
    margin-top: .875rem;
    font-size: 1rem;
    max-width: none;
    white-space: nowrap;
  }

  .page-title .hero-sub br {
    display: none;
  }

  .page-title .hero-sub-ref {
    display: inline;
    margin: 0 0 0 .75rem;
    white-space: nowrap;
  }

  .card {
    min-height: 100%;
    padding: 1.75rem;
  }

  .card-title { font-size: .8125rem; }
  textarea {
    height: 32.5rem;
    min-height: 32.5rem;
    font-size: 1rem;
  }
  .tone-option label { min-height: 3.25rem; font-size: .875rem; }

  .generate-btn {
    width: min(100%, 35rem);
    justify-self: center;
    min-height: 3.625rem;
    font-size: 1.0625rem;
  }

  .result-section { width: min(100%, 57.5rem); }

  .verse-card .verse-text {
    font-size: 1.125rem;
    line-height: 1.75;
  }

  .verse-card .verse-ref {
    font-size: .875rem;
  }

  .result-box {
    font-size: 1.25rem;
    line-height: 2.05;
  }

  .prayer-title {
    font-size: 1.375rem;
  }

  .bottom-nav { max-width: 80rem; }
}

@media (max-width: 480px) {
  .page-content { padding-inline: 1rem; }
  .cross-banner { border-radius: .75rem; }
  .cross-banner::before { inset: .5rem; }
  .card-heading-row { align-items: flex-start; flex-direction: column; gap: 0; }
  .card-hint { margin-top: -.375rem; margin-bottom: .625rem; }
  .save-prompt { align-items: stretch; flex-direction: column; }
  .save-prompt .save-actions { justify-content: flex-end; }
}

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

/* ==========================================================================
   say.church — shared styles
   Cinematic, classical, warm. Dark palette · antique gold · ivory.
   ========================================================================== */

:root {
  --gold: #C9A84C;
  --gold-hi: #E8D194;
  --gold-dark: #A07C30;
  --gold-deep: #74561C;
  --ink: #1E1810;
  --ink-2: #1E1810;
  --umber: #1E1810;
  
  
  
  
            /* gold for text on ivory (AA) */
  --ivory: #f3ead8;
  --ivory-2: #F3EAD8;
  --ivory-soft: #d6cbb6;         /* secondary text on dark */
  --ivory-mute: #a99f8d;         /* tertiary text on dark (AA ≥ 4.5 on ink) */
  --line: rgba(201, 168, 76, 0.35);

  --serif: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;

  --pad: clamp(1.5rem, 5vw, 4.5rem);
  --maxw: 82.5rem;
  --section: clamp(4.5rem, 8vw, 7.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

/* ---------- Reset / base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ink);
  scrollbar-color: var(--gold) var(--ink-2);
}

/* Native page scrollbar: antique gold thumb on a warm dark track. */
@supports not (scrollbar-color: auto) {
  html::-webkit-scrollbar { width: .875rem; height: .875rem; }
  html::-webkit-scrollbar-track { background: var(--ink-2); }
  html::-webkit-scrollbar-thumb { background: var(--gold); border: .1875rem solid var(--ink-2); border-radius: .625rem; }
  html::-webkit-scrollbar-thumb:hover { background: var(--gold-hi); }
  html::-webkit-scrollbar-corner { background: var(--ink-2); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.85;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

@media (min-width: 900px) {
  body { font-size: 1.25rem; }
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-wrap: wrap;
}

p { margin: 0; text-wrap: wrap; }

a { color: inherit; }

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: .25rem;
  border-radius: 2px;
}

::selection { background: var(--gold); color: #3B200C; }

.skip-link {
  position: absolute;
  left: 1rem; top: -6.25rem;
  z-index: 100;
  padding: .75rem 1.25rem;
  background: var(--gold);
  color: #3B200C;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .875rem;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .875rem;
  min-height: 4rem;
  padding: 1rem 2.5rem;
  border: 1px solid var(--gold);
  border-radius: 62.4375rem;
  background: var(--gold);
  color: #3B200C;
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease),
    box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
  box-shadow: 0 .625rem 2.5rem -.75rem rgba(201, 168, 76, 0.55);
}
.btn:hover {
  background: var(--gold-hi);
  border-color: var(--gold-hi);
  box-shadow: 0 1rem 3rem -.75rem rgba(232, 209, 148, 0.6);
}
.btn .arrow { transition: transform 0.35s var(--ease); font-family: var(--sans); font-weight: 400; }
.btn:hover .arrow { transform: translateX(.25rem); }

.text-link {
  font-family: var(--serif);
  font-size: 1.1875rem;
  color: var(--ivory);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: .25rem;
  transition: color 0.3s, border-color 0.3s;
}
.text-link:hover { color: var(--gold-hi); border-color: var(--gold-hi); }

/* ---------- Site header / nav ---------- */

.site-nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
}
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: none;
  padding-block: clamp(1.25rem, 3vw, 2.25rem);
}
.wordmark {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2vw, 1.6875rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ivory);
  text-decoration: none;
}
.wordmark span { color: var(--gold); }
.site-nav ul {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  margin: 0; padding: 0;
  list-style: none;
}
.site-nav ul a {
  font-size: 1.0625rem;
  letter-spacing: 0.12em;
  color: var(--ivory-soft);
  text-decoration: none;
  padding-block: .375rem;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.site-nav ul a:hover { color: var(--ivory); border-color: var(--gold); }

/* ---------- Painting credit ---------- */

.credit {
  font-size: .8125rem;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--ivory-mute);
}

/* ==========================================================================
   HERO (homepage)
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  isolation: isolate;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 35%;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(30, 24, 16, 0.55) 0%, rgba(30, 24, 16, 0) 22%),
    linear-gradient(0deg, rgba(30, 24, 16, 0.97) 0%, rgba(30, 24, 16, 0.88) 32%, rgba(30, 24, 16, 0.25) 62%, rgba(30, 24, 16, 0) 80%);
}

.hero__content {
  width: 100%;
  padding-top: 8.75rem;
  padding-bottom: clamp(4.5rem, 10vh, 7.5rem);
}

.hero__title {
  font-size: clamp(2.375rem, 10.4vw, 4rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.03em;
  color: var(--ivory);
  text-shadow: 0 2px 1.875rem rgba(0, 0, 0, 0.45);
}

.hero__verse {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  max-width: 30em;
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.6vw, 1.4375rem);
  line-height: 1.95;
  color: var(--ivory-2);
}
.verse-phrase { display: block; white-space: nowrap; }

.hero__verse cite {
  display: inline-block;
  margin-top: .375rem;
  font-style: normal;
  font-size: 0.86em;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.hero__actions { margin-top: clamp(2.25rem, 4vw, 3.25rem); }

.hero__credit {
  position: absolute;
  right: var(--pad);
  bottom: 1.5rem;
  max-width: none;
  white-space: nowrap;
  letter-spacing: 0;
  text-align: right;
}

@media (max-width: 899px) {
  .hero__credit {
    position: static;
    margin-top: 2.5rem;
    text-align: left;
  }
  .hero__content { padding-bottom: 2rem; }
}

@media (min-width: 900px) {
  /* Painting sits to the right and dissolves into the dark — like a gallery wall lit from one side */
  .hero__media {
    left: 28%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 34%);
    mask-image: linear-gradient(90deg, transparent, #000 34%);
  }
  .hero__media img { object-position: 60% 35%; }
  .hero__media::after {
    background:
      linear-gradient(90deg, var(--ink) 0%, rgba(30, 24, 16, 0.82) 16%, rgba(30, 24, 16, 0.25) 42%, rgba(30, 24, 16, 0) 62%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.85) 0%, rgba(30, 24, 16, 0) 34%),
      linear-gradient(180deg, rgba(30, 24, 16, 0.6) 0%, rgba(30, 24, 16, 0) 18%);
  }
  .hero__content {
    padding-bottom: clamp(6rem, 14vh, 9.375rem);
  }
  .hero__title { font-size: clamp(3.75rem, 6.2vw, 6.25rem); }
}

/* Hero entrance — CSS only, so content is always rendered without JS */
@media (prefers-reduced-motion: no-preference) {
  .hero__media img { animation: settle 2.4s var(--ease) both; }
  .rise { animation: rise 1.3s var(--ease) both; }
  .rise--2 { animation-delay: 0.15s; }
  .rise--3 { animation-delay: 0.3s; }
  .rise--4 { animation-delay: 0.45s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(1.375rem); }
  to { opacity: 1; transform: none; }
}
@keyframes settle {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   FIGURES gallery
   ========================================================================== */

.figures {
  padding-block: var(--section) 2rem;
  background: var(--ink);
}

.figures__head {
  display: grid;
  gap: 1.75rem;
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
}
@media (min-width: 1000px) {
  .figures__head { grid-template-columns: 7fr 5fr; align-items: end; gap: 4rem; }
}
.figures__title {
  margin-top: 1.5rem;
  font-size: clamp(2.75rem, 6vw, 5.75rem);
  font-weight: 700;
  line-height: 1.12;
}
.figures__intro {
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  color: var(--ivory-soft);
  max-width: 24em;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tile {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  aspect-ratio: 4 / 5;
  scroll-margin-top: 2rem;
  isolation: isolate;
}
.tile--paul { aspect-ratio: 3 / 4; }

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 1.4s var(--ease), filter 0.8s;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(30, 24, 16, 0.96) 0%, rgba(30, 24, 16, 0.78) 26%, rgba(30, 24, 16, 0.12) 58%, rgba(30, 24, 16, 0) 72%);
  pointer-events: none;
}

/* B&W engravings: warm, sepia-toned so they sit in the palette */
.tile--engraving img {
  height: 84%;
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
  filter: grayscale(1) sepia(0.6) saturate(1.1) contrast(1.3) brightness(0.6);
}
/* Elijah's open sky reads paler than the other plates — pull it down to match */
#elijah img { filter: grayscale(1) sepia(0.6) saturate(1.1) contrast(1.35) brightness(0.52); }
.tile--engraving::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(30, 24, 16, 0) 40%, rgba(30, 24, 16, 0.55) 100%),
    linear-gradient(160deg, rgba(160, 124, 48, 0.45), rgba(30, 24, 16, 0.72));
  mix-blend-mode: multiply;
  pointer-events: none;
}

.tile__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 2.4vw, 2.25rem);
  color: var(--ivory);
  text-decoration: none;
}

.tile__name {
  font-size: clamp(2.125rem, 2.8vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 1.25rem rgba(0, 0, 0, 0.5);
}
.tile__ref {
  order: -1;
  margin-bottom: .625rem;
  font-family: var(--serif);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--gold-hi);
}
.tile__note {
  margin-top: .625rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ivory-2);
}
.tile__soon {
  position: absolute;
  top: clamp(1.125rem, 2vw, 1.625rem);
  right: clamp(1.125rem, 2vw, 1.625rem);
  padding: .3125rem .875rem;
  border: 1px solid rgba(243, 234, 216, 0.38);
  border-radius: 62.4375rem;
  background: rgba(30, 24, 16, 0.55);
  font-size: .875rem;
  letter-spacing: 0.2em;
  color: var(--ivory-2);
  -webkit-backdrop-filter: blur(.375rem);
  backdrop-filter: blur(.375rem);
}

/* Live tiles — Abraham, Hannah */
.tile--live .tile__name { font-size: clamp(4rem, 7vw, 7.25rem); line-height: 1.05; }
.tile--live .tile__ref { font-size: 1rem; }
.tile--live .tile__note { font-family: var(--serif); font-size: clamp(1.25rem, 1.8vw, 1.625rem); }
.tile__open {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  align-self: flex-start;
  margin-top: 1.625rem;
  padding: .75rem 1.75rem;
  border-radius: 62.4375rem;
  background: var(--gold);
  color: #3B200C;
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  transition: background-color 0.35s;
}
.tile__open .arrow { font-family: var(--sans); font-weight: 400; transition: transform 0.35s var(--ease); }
.tile--live .tile__live {
  position: absolute;
  top: clamp(1.125rem, 2vw, 1.625rem);
  left: clamp(1.5rem, 2.4vw, 2.25rem);
  font-family: var(--serif);
  font-size: .9375rem;
  letter-spacing: 0.28em;
  color: var(--gold-hi);
}
.tile--live a:hover img,
.tile--live a:focus-visible img { transform: scale(1.04); }
.tile--live a:hover .tile__open { background: var(--gold-hi); }
.tile--live a:hover .tile__open .arrow { transform: translateX(.25rem); }
.tile--live a:focus-visible { outline-offset: -.375rem; }

/* Arriving from a mood pill */
.tile:target { outline: 2px solid var(--gold); outline-offset: -2px; }

/* Per-painting framing (mobile 4:5 defaults) */
#paul img       { object-position: 62% 30%; }
#lords-prayer img { object-position: 38% 40%; }
#david-51 img     { object-position: 50% 40%; }
#david-23 img     { object-position: 42% 30%; }
#solomon img      { object-position: 100% 100%; }
#jabez img        { object-position: 50% 55%; }
#elijah img       { object-position: 50% 50%; }
#daniel img       { object-position: 50% 28%; }
#jonah img        { object-position: 70% 50%; }
#gethsemane img   { object-position: 50% 55%; }
#nehemiah img     { object-position: 50% 50%; }

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(15rem, 34vw, 18.75rem);
    grid-auto-flow: dense;
  }
  .tile, .tile--paul { aspect-ratio: auto; grid-row: span 2; }
  .tile--paul { grid-column: span 2; }
  .tile--wide { grid-column: span 2; grid-row: span 1; }
  .tile--feature { grid-column: span 2; }
}
@media (min-width: 640px) and (max-width: 999px) {
  /* keep the 2-column grid free of holes */
  #gethsemane { grid-column: span 1; }
}

@media (min-width: 1000px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(15rem, 23vw, 20rem);
    gap: .875rem;
  }
  .tile--paul { grid-column: span 3; }
  .tile--wide { grid-column: span 2; grid-row: span 1; }
  .tile--feature { grid-column: span 2; grid-row: span 2; }
  #paul img  { object-position: 62% 30%; }
  #solomon img { object-position: 100% 100%; }
  .tile--live .tile__inner { padding: clamp(2rem, 3.6vw, 3.5rem); }
}

/* ==========================================================================
   QUOTE BAND
   ========================================================================== */

.band {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(25rem, 56svh, 38.75rem);
  padding-block: 4rem 5.5rem;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.band__media { position: absolute; inset: 0; z-index: -1; }
/* Short statements use the band's width, not the article's 1320px limit. */
.figure-page .band > .wrap { max-width: none; }
.band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 35%;
}
.band__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 50%, rgba(30, 24, 16, 0.55), rgba(30, 24, 16, 0.85) 100%),
    linear-gradient(180deg, var(--ink) 0%, rgba(30, 24, 16, 0) 22%, rgba(30, 24, 16, 0) 78%, var(--ink) 100%);
}
.band__line {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5.6vw, 5.25rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.06em;
  color: var(--ivory);
  text-shadow: 0 .25rem 2.5rem rgba(0, 0, 0, 0.6);
}
.band__rule {
  width: 4.5rem;
  height: 1px;
  margin: 0 auto clamp(1.75rem, 3vw, 2.75rem);
  background: var(--gold);
}
.band__credit {
  position: absolute;
  right: var(--pad);
  bottom: 1.375rem;
  text-align: right;
}
@media (max-width: 639px) {
  .band__credit { left: var(--pad); text-align: center; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  padding-block: clamp(4.5rem, 8vw, 7rem) 3rem;
  background: var(--ink);
  border-top: 1px solid rgba(201, 168, 76, 0.18);
}
.site-footer__top {
  display: grid;
  gap: 2rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid rgba(243, 234, 216, 0.1);
}
@media (min-width: 900px) {
  .site-footer__top { grid-template-columns: 1fr auto; align-items: end; }
}
.site-footer .wordmark { font-size: clamp(1.875rem, 3vw, 2.5rem); }
.site-footer__line {
  margin-top: .875rem;
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  color: var(--ivory-soft);
}
.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.25rem;
  margin: 0; padding: 0;
  list-style: none;
}
.site-footer__nav a {
  font-size: 1.125rem;
  color: var(--ivory-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.site-footer__nav a:hover { color: var(--ivory); border-color: var(--gold); }
.site-footer__credits {
  margin-top: 2rem;
  font-size: .9375rem;
  line-height: 1.8;
  color: var(--ivory-mute);
}
.site-footer__credits a {
  color: var(--gold);
  text-underline-offset: .25rem;
  text-decoration-thickness: 1px;
}
.site-footer__credits a:hover { color: var(--gold-hi); }

/* ==========================================================================
   HANNAH page
   ========================================================================== */

.p-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}
.p-hero__media { position: absolute; inset: 0; z-index: -1; }
.p-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 60%;
}
.p-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(30, 24, 16, 0.7) 0%, rgba(30, 24, 16, 0) 26%),
    linear-gradient(0deg, rgba(30, 24, 16, 0.97) 0%, rgba(30, 24, 16, 0.82) 30%, rgba(30, 24, 16, 0.1) 60%, rgba(30, 24, 16, 0) 75%);
}

.breadcrumb {
  padding-top: clamp(6rem, 12vh, 8rem);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 0;
  margin: 0; padding: 0;
  list-style: none;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--ivory-soft);
}
.breadcrumb li + li::before {
  content: "/";
  margin-inline: .875rem;
  color: var(--gold);
  opacity: 0.8;
}
.breadcrumb a {
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 234, 216, 0.3);
  transition: color 0.3s, border-color 0.3s;
}
.breadcrumb a:hover { color: var(--ivory); border-color: var(--gold); }
.breadcrumb [aria-current] { color: var(--ivory); }

.p-hero__content {
  margin-top: auto;
  padding-top: 3rem;
  padding-bottom: clamp(2.5rem, 8vh, 6rem);
}
.p-hero__name {
  margin-top: .5rem;
  font-size: clamp(6rem, 14vw, 12.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ivory);
  text-shadow: 0 .25rem 2.5rem rgba(0, 0, 0, 0.5);
}
.p-hero__sub {
  margin-top: clamp(1.25rem, 2.4vw, 2rem);
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.2vw, 2rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--ivory-2);
}
.p-hero__credit { margin-top: clamp(1.75rem, 4vh, 3rem); max-width: 26em; }

@media (min-width: 900px) {
  .p-hero__media img { object-position: 30% 50%; }
  /* Hannah and the child stay lit on the left; Eli's busy robe drops into calm darkness behind the title */
  .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.7) 0%, rgba(30, 24, 16, 0) 22%),
      linear-gradient(90deg, rgba(30, 24, 16, 0) 0%, rgba(30, 24, 16, 0) 45%, rgba(30, 24, 16, 0.6) 53%, rgba(30, 24, 16, 0.9) 61%, rgba(30, 24, 16, 0.96) 74%, rgba(30, 24, 16, 0.97) 100%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.8) 0%, rgba(30, 24, 16, 0) 30%);
  }
  .p-hero__content {
    display: flex;
    justify-content: flex-end;
  }
  .p-hero__block { width: min(46%, 40rem); }
  .p-hero__credit { max-width: none; }
}

/* Section scaffolding */
.chapter {
  padding-block: var(--section);
}
.chapter__num {
  display: flex;
  font-size: 1.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 1.125rem;
}
.scripture .chapter__num { justify-content: center; }
.chapter__title {
  font-size: clamp(2.375rem, 4.8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.18;
}

/* 一 · Story — ivory paper */
.story {
  background:
    radial-gradient(90% 70% at 10% 0%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 60%),
    var(--ivory);
  color: #3B200C;
}
.story .eyebrow { color: var(--gold-deep); }
.story__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
}
@media (min-width: 1000px) {
  .story__grid { grid-template-columns: 5fr 7fr; align-items: start; }
}
.story__text {
  max-width: 34em;
  font-family: var(--serif);
  font-size: clamp(1.3125rem, 1.9vw, 1.625rem);
  line-height: 2.05;
  color: #3B200C;
}
.story__text p + p { margin-top: 1em; }
.story__text::first-letter {
  float: left;
  margin: 0.08em 0.14em 0 0;
  font-size: 3.4em;
  line-height: 1;
  font-weight: 700;
  color: var(--gold-deep);
}

/* 二 · Scripture */
.scripture {
  position: relative;
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(201, 168, 76, 0.1), rgba(201, 168, 76, 0) 65%),
    linear-gradient(180deg, #1E1810 0%, #2C1A0E 100%);
  text-align: center;
}
.scripture .chapter__title { font-size: clamp(1.875rem, 3.4vw, 3rem); }
.scripture__quote {
  position: relative;
  max-width: 24em;
  margin: clamp(4rem, 7vw, 6rem) auto 0;
  padding: 0;
  font-size: clamp(1.625rem, 3vw, 2.75rem);
}
/* Brackets live in the blockquote's padding — never on top of the text */
.scripture__quote blockquote {
  position: relative;
  margin: 0;
  padding: clamp(2.25rem, 3.6vw, 3.25rem) clamp(3rem, 6vw, 5.25rem);
}
.scripture__ending { white-space: nowrap; }
.scripture__quote blockquote p {
  font-family: var(--serif);
  font-size: 1em;
  font-weight: 500;
  line-height: 1.95;
  letter-spacing: 0.04em;
  color: var(--ivory);
  text-align: left;
  text-align-last: left;
}
/* Corner brackets drawn as rules so their position is exact, independent of font metrics */
.qmark {
  position: absolute;
  width: clamp(1.25rem, 2.4vw, 1.875rem);
  height: clamp(2.75rem, 5.4vw, 4.5rem);
  border: 0 solid var(--gold);
  font-size: 0;
  color: transparent;
  opacity: 0.9;
  pointer-events: none;
}
.qmark--open { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.qmark--close { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
@media (max-width: 699px) {
  .scripture__quote blockquote { padding: 2rem 1.875rem; }
  .scripture__quote blockquote p { text-align: left; text-align-last: left; }
}
.scripture__cite {
  display: block;
  margin-top: 1.75rem;
  font-family: var(--serif);
  font-style: normal;
  font-size: 1.125rem;
  letter-spacing: 0.12em;
  color: var(--gold);
}

/* 三 · Prayer */
.prayer {
  background: var(--umber);
  background: linear-gradient(180deg, var(--umber) 0%, var(--ink) 100%);
}
.prayer__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5.5rem);
}
@media (min-width: 1000px) {
  .prayer__grid { grid-template-columns: 5fr 7fr; align-items: start; }
  .prayer__figure { position: sticky; top: 3rem; }
}
.prayer__figure { margin: 0; }
.detail {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink-2);
}
/* Explicit 4:5 crop of the 2000×1634 painting: x 360–1060, y 400–1275 —
   Hannah's face in the upper third, Samuel's face just below centre. */
.detail img {
  position: absolute;
  top: -45.71%;          /* 400 / 875 */
  left: -51.43%;         /* 360 / 700 */
  width: 285.71%;        /* 2000 / 700 */
  max-width: none;
  height: auto;
}
.detail::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(201, 168, 76, 0.35), inset 0 0 7.5rem rgba(0, 0, 0, 0.55);
}
.prayer__figure figcaption { margin-top: 1rem; }

.prayer__text {
  margin-top: clamp(2rem, 3vw, 2.75rem);
  padding-top: clamp(2rem, 3vw, 2.75rem);
  border-top: 1px solid var(--gold);
  max-width: 30em;
}
.prayer__text p {
  font-family: var(--serif);
  font-size: clamp(1.3125rem, 1.9vw, 1.625rem);
  line-height: 2.15;
  letter-spacing: 0.03em;
  color: var(--ivory);
}
.prayer__text p + p { margin-top: 0.9em; }
.prayer__amen {
  color: var(--gold-hi) !important;
  font-weight: 600;
  letter-spacing: 0.3em !important;
}
.prayer__lead {
  margin-top: 1.25rem;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  color: var(--ivory-mute);
}

@media (max-width: 999px) {
  .prayer__figure { max-width: 32.5rem; }
}

/* CTA */
.cta {
  padding-block: var(--section) 3rem;
  background: var(--ink);
  text-align: center;
  border-top: 1px solid rgba(201, 168, 76, 0.16);
}
.cta__title {
  font-size: clamp(2.125rem, 4.4vw, 4rem);
  font-weight: 700;
  line-height: 1.25;
}
.cta__sub {
  margin: 1.5rem auto 0;
  max-width: none;
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
  color: var(--ivory-soft);
}
.cta__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
}

/* Art-directed mobile covers: the painting resolves before the reading begins. */
@media (max-width: 899px) {
  .hero { min-height: max(48.75rem, 100svh); }
  .hero__media { bottom: auto; height: clamp(26.875rem, 58svh, 40rem); }
  .hero__media img { object-position: 55% 48%; }
  .hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, .65), transparent 24%),
      linear-gradient(0deg, var(--ink), rgba(30, 24, 16, .9) 12%, rgba(30, 24, 16, .25) 32%, transparent 52%);
  }
  .hero__content { padding-top: clamp(21.875rem, 46svh, 32.5rem); padding-bottom: 1.75rem; }
  .hero__title { font-size: clamp(2rem, 9.2vw, 4rem); }
  .hero__verse { font-size: clamp(1rem, 4.35vw, 1.375rem); margin-top: 1.5rem; line-height: 1.95; }
  .hero__verse cite { margin-top: .75rem; }
  .hero__actions { margin-top: 1.625rem; }
  .hero__credit { margin-top: 1.75rem; font-size: clamp(.5625rem, 2.7vw, .8125rem); }
  .p-hero { min-height: max(47.5rem, 100svh); }
  .p-hero__media { bottom: auto; height: clamp(30.625rem, 68svh, 45rem); }
  .p-hero__media img { object-position: 33% 50%; }
  .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, .8), rgba(30, 24, 16, .1) 30%, transparent 45%),
      linear-gradient(0deg, var(--ink), rgba(30, 24, 16, .6) 14%, transparent 35%);
  }
  .p-hero__content { padding-top: clamp(20rem, 41svh, 28.75rem); padding-bottom: 2rem; }
  .p-hero__name { font-size: clamp(5rem, 23vw, 9rem); }
  .p-hero__credit { max-width: 36em; font-size: .6875rem; }
}

/* Preserve the sleeping king and the descending light above the tile caption. */
#solomon::after {
  background: linear-gradient(90deg, rgba(30, 24, 16, .86), rgba(30, 24, 16, .5) 40%, transparent 75%),
    linear-gradient(0deg, rgba(30, 24, 16, .5), transparent 45%);
}
@media (max-width: 639px) {
  .site-nav__inner { gap: .75rem; }
  .site-nav ul { gap: 1rem; }
  .site-nav ul a { font-size: .8125rem; letter-spacing: .04em; display: inline-flex; align-items: center; min-height: 2.75rem; }
  .wordmark { font-size: 1.3125rem; }
  .breadcrumb { padding-top: 5.875rem; }
  .breadcrumb ol { font-size: .8125rem; }
  .breadcrumb li + li::before { margin-inline: .625rem; }
  .scripture__quote { font-size: 1.375rem; }
  .scripture__cite { font-size: .875rem; letter-spacing: .08em; }
  .band__credit { font-size: .625rem; letter-spacing: 0; }
  .band__line { letter-spacing: .03em; }
  .tile__name { font-size: 2rem; }
  .tile--paul { aspect-ratio: 3 / 5; }
  #paul img { height: 74%; object-position: 62% 30%; }
  #solomon { aspect-ratio: 4 / 5; }
  #solomon img { height: 76%; }
  #paul img, #solomon img {
    -webkit-mask-image: linear-gradient(#000 78%, transparent);
    mask-image: linear-gradient(#000 78%, transparent);
  }
  #solomon::after { background: linear-gradient(0deg, var(--ink) 22%, rgba(30, 24, 16, .5) 34%, transparent 52%); }
}
@media (max-width: 359px) {
  :root { --pad: 1.25rem; }
  .site-nav ul { gap: .75rem; }
  .wordmark { font-size: 1.125rem; }
  .site-nav ul a { font-size: .75rem; }
  .hero__verse { font-size: .9375rem; letter-spacing: 0; }
}

/* ==========================================================================
   ABRAHAM — Tiepolo, Abraham and the Three Angels (colour oil)
   ========================================================================== */

/* 1280×720 illustration: dark sky and plain on the left, Abraham kneeling at ~44–66% x,
   the three angels at ~67–92% x. Every crop keeps the span 44–92% in frame. */
.p-hero--abraham .p-hero__media img,
#abraham img { filter: brightness(0.95) contrast(1.04); }

.p-hero--abraham .p-hero__name {
  font-size: clamp(5rem, 8vw, 7.5rem);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
@media (min-width: 900px) {
  /* Scene fills the right ~88%; its dark left edge dissolves into the page behind the title */
  .p-hero--abraham .p-hero__media {
    left: max(12%, 50% - 35rem);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 24%);
    mask-image: linear-gradient(90deg, transparent, #000 24%);
  }
  .p-hero--abraham .p-hero__media img { object-position: 80% 40%; }
  .p-hero--abraham .p-hero__media::after {
    background:
      linear-gradient(90deg, rgba(30, 24, 16, 0.75) 0%, rgba(30, 24, 16, 0.35) 22%, rgba(30, 24, 16, 0) 40%),
      linear-gradient(180deg, rgba(30, 24, 16, 0.6) 0%, rgba(30, 24, 16, 0) 14%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.85) 0%, rgba(30, 24, 16, 0) 24%);
  }
  .p-hero--abraham .p-hero__content { justify-content: flex-start; }
  .p-hero--abraham .p-hero__block { width: auto; }
}
@media (max-width: 899px) {
  /* Landscape scene sits under the nav at a height that keeps Abraham and all three angels in */
  .p-hero--abraham .p-hero__media {
    top: 4rem;
    height: min(112vw, 62svh);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 8%);
    mask-image: linear-gradient(180deg, transparent, #000 8%);
  }
  .p-hero--abraham .p-hero__media img { object-position: 87% 50%; }
  .p-hero--abraham .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.6), rgba(30, 24, 16, 0) 14%),
      linear-gradient(0deg, var(--ink), rgba(30, 24, 16, 0.6) 16%, rgba(30, 24, 16, 0) 34%);
  }
  .p-hero--abraham { min-height: 0; }
  .p-hero--abraham .p-hero__content { padding-top: calc(min(112vw, 62svh) - 6.875rem); }
  .p-hero--abraham .p-hero__name { font-size: min(19.5vw, 9.375rem); letter-spacing: 0.04em; }
}

/* Scripture: a long plea, a descending count, then the answer */
.scripture__quote--long { max-width: 25em; font-size: clamp(1.4375rem, 2.5vw, 2.375rem); }
.scripture__quote--climax {
  max-width: 31em;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  font-size: clamp(1.25rem, 2vw, 1.875rem);
}
.scripture__answer { color: var(--gold-hi); }
.scripture__quote--climax .scripture__plea,
.scripture__quote--climax .scripture__answer {
  display: block;
  text-wrap: wrap;
  line-break: strict;
}
.scripture__quote--climax .scripture__answer { margin-top: 0.65em; }

.scripture__bridge {
  max-width: 26em;
  margin: clamp(4rem, 7vw, 6.5rem) auto 0;
}
.scripture__bridge p {
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.7vw, 1.5rem);
  line-height: 1.9;
  color: var(--ivory-soft);
}
.countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .375rem clamp(.875rem, 2vw, 1.875rem);
  margin: 0 0 clamp(1.25rem, 2vw, 1.75rem);
  padding: 0;
  list-style: none;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.countdown li { font-size: clamp(1.0625rem, 1.6vw, 1.375rem); }
.countdown li:nth-child(1) { opacity: 0.4; }
.countdown li:nth-child(2) { opacity: 0.5; }
.countdown li:nth-child(3) { opacity: 0.6; }
.countdown li:nth-child(4) { opacity: 0.7; }
.countdown li:nth-child(5) { opacity: 0.82; }
.countdown li:last-child { font-size: clamp(1.75rem, 2.8vw, 2.5rem); color: var(--gold-hi); }

@media (max-width: 639px) {
  .scripture__quote--long { font-size: 1.25rem; }
  .scripture__quote--climax { font-size: 1.1875rem; }
  .scripture__bridge { max-width: 18em; }
}

/* 4:5 crop of the 1280×720 illustration, full height, x ≈ 45–90%:
   Abraham's raised face and hands on the left, the three angels on the right. */
.detail--abraham img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 84% 50%;
}

/* ---------- Gallery lead tile — Abraham ---------- */

#abraham {
  aspect-ratio: 2 / 3;
  background: var(--ink);
}
/* Scene on top, the label below on page ink */
#abraham img {
  height: 58%;
  object-position: 90% 50%;
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}
#abraham::after {
  background: linear-gradient(0deg, rgba(30, 24, 16, 0.9) 0%, rgba(30, 24, 16, 0.6) 30%, rgba(30, 24, 16, 0) 46%);
}
#abraham .tile__name { font-size: min(4rem, 17vw); white-space: nowrap; letter-spacing: 0.02em; }
.tile__quote { display: none; }

@media (min-width: 640px) {
  /* Editorial lead: museum label on the left, the plate on the right */
  #abraham { grid-column: 1 / -1; grid-row: span 2; aspect-ratio: auto; }
  /* Crop to the kneeling Abraham and the three angels; the dark hillside left of him feathers into the label */
  #abraham img {
    left: auto;
    right: 0;
    width: 62%;
    height: 100%;
    object-position: 88% 50%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%);
    mask-image: linear-gradient(90deg, transparent, #000 12%);
  }
  #abraham::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.35) 0%, rgba(30, 24, 16, 0) 10%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.6) 0%, rgba(30, 24, 16, 0) 18%);
  }
  #abraham .tile__name { font-size: clamp(3.5rem, 7.4vw, 7.75rem); }
}
@media (min-width: 1000px) {
  #abraham img { width: 58%; }
  /* label, excerpt and caption share one left edge */
  .tile--live .tile__live { left: clamp(2rem, 3.6vw, 3.5rem); }
  .tile__quote {
    display: block;
    position: absolute;
    top: clamp(4rem, 6vw, 6rem);
    left: clamp(2rem, 3.6vw, 3.5rem);
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-family: var(--serif);
    font-size: clamp(1.375rem, 2vw, 1.875rem);
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.06em;
    color: var(--ivory-2);
  }
}

/* App integration: preserve existing state classes and DOM-driven visibility. */
:root {
  --bg: #1E1810; --bg-card: #2C1A0E; --text: var(--ivory);
  --text-muted: #c2b9a8; --gold-light: var(--gold-hi); 
  --border: rgba(201,168,76,.4); --font: var(--sans);
  --shadow: 0 .75rem 2.25rem #0003; --shadow-sm: 0 .25rem 1.25rem #0002;
  --pad: clamp(1.25rem,5vw,4.5rem); --section: clamp(3rem,6vw,5.5rem);
  color-scheme: dark;
}
html { scroll-padding-bottom: 5.625rem; }
body { font-size: 1rem; line-height: 1.75; }
button, input, textarea, select { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .logo-text { font-family: var(--serif); }
button, input, textarea, select, a { max-width: 100%; }
:focus-visible, .btn:focus-visible, .lang-toggle button:focus-visible, .nav-item:focus-visible,
.tone-option input[type="radio"]:focus-visible + label,
.tag-chip input:focus-visible + label {
  outline: .1875rem solid var(--gold-hi); outline-offset: .25rem;
}
.app-wrapper { max-width: none; background: #1E1810; box-shadow: none; padding-bottom: calc(5.75rem + env(safe-area-inset-bottom)); }
.top-bar, #topbar {
  background: rgba(30,24,16,.76); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(1rem); -webkit-backdrop-filter: blur(1rem);
  padding: .875rem var(--pad); min-height: 4.75rem; gap: 1rem;
}
.home-page .top-bar, .figure-page .top-bar { position: absolute; inset: 0 0 auto; background: linear-gradient(#1E1810b3,#1E18101a); border: 0; }
.top-bar .logo { gap: .5rem; }
.top-bar .logo-text, #topbar .logo-text { font-size: clamp(1.3125rem,2.2vw,1.75rem); color: var(--ivory); font-weight: 600; letter-spacing: .01em; }
.logo-icon { flex-shrink: 0; }
.top-bar .logo-icon { width: 1.5rem; height: 1.75rem; }
.wordmark-dot, .header-link { color: var(--gold-hi); }
.header-link { font-size: .9375rem; text-decoration: none; padding-block: .625rem; }
.lang-toggle { background: #1E181066; border: 1px solid var(--line); padding: 2px; gap: 0; border-radius: 62.4375rem; }
.lang-toggle button { color: var(--ivory); font-size: .8125rem; min-height: 2.375rem; min-width: 2.25rem; padding: .3125rem .5rem; }
.lang-toggle button.active { color: #3B200C; background: var(--gold); box-shadow: none; }
#authBtn { width: 2.5rem; height: 2.5rem; min-height: 2.5rem; border: 1px solid var(--line); color: var(--gold-hi); background: #1E181066; }
.top-bar-actions { gap: .625rem; }
.btn { min-height: 3rem; padding: .6875rem 1.5rem; border-radius: 62.4375rem; font-size: 1rem; letter-spacing: .02em; box-shadow: none; white-space: normal; line-height: 1.5; }
.btn-primary, .btn-save-reminder { color: #3B200C; background: var(--gold); border: 1px solid var(--gold); }
.btn-primary:hover, .btn-save-reminder:hover { background: var(--gold-hi); color: #3B200C; }
.btn-secondary, .btn-icon { color: var(--ivory); border: 1px solid var(--line); background: transparent; }
.btn-secondary:hover, .btn-icon:hover { background: #C9A84C1a; color: var(--gold-hi); border-color: var(--gold); }
.btn-sm { min-height: 2.75rem; padding: .5625rem 1rem; font-size: .875rem; }
.home-page .page-content { display: block; width: 100%; max-width: none; padding: 0; }
.hero { min-height: 100svh; }
.hero__content { padding-top: 9.375rem; padding-bottom: 7rem; }
.hero__title { max-width: 10em; font-size: clamp(2.75rem,6.2vw,5.5rem); line-height: 1.23; }
.hero__verse { max-width: 24em; margin-top: 1.625rem; font-size: clamp(1.125rem,1.7vw,1.375rem); line-height: 1.9; }
.hero-sub-ref { text-align: left; color: var(--gold-hi); font-size: .85em; margin-top: .75rem; }
.hero__actions { margin-top: 1.875rem; }
.hero-cta { width: auto; min-height: 3.75rem; padding: 1rem 2.375rem; font-family: var(--serif); font-size: 1.25rem; letter-spacing: .12em; }
.hero__credit { bottom: 5.5rem; font-size: .75rem; color: var(--ivory-soft); }
.pray-section { background: radial-gradient(ellipse at 80% 0%,#C9A84C0d,transparent 65%),#1E1810; padding: var(--section) var(--pad); scroll-margin-top: 1.25rem; }
.pray-wrap { max-width: 70rem; margin-inline: auto; display: flex; flex-direction: column; gap: 1.375rem; }
.generator-heading { margin-bottom: .375rem; }
.generator-heading h2 { font-size: clamp(1.875rem,4vw,3rem); margin: .75rem 0; }
.generator-heading > p:last-child { color: var(--ivory-soft); font-size: 1.0625rem; }
.card { background: #2C1A0Ecc; border-color: var(--line); padding: clamp(1.25rem,3vw,1.75rem); border-radius: 1rem; box-shadow: none; }
.card-title { color: var(--ivory); font-size: 1.0625rem; font-family: var(--serif); font-weight: 500; letter-spacing: .04em; display: block; }
.card-hint { color: var(--text-muted); font-size: .8125rem; white-space: normal; text-align: right; }
textarea, input[type="text"], input[type="url"], select, .diary-picker, .publish-select {
  background: #1E1810; border: 1px solid var(--line); color: var(--ivory); border-radius: .625rem; padding: .875rem 1rem; font-size: 1.0625rem;
}
textarea { line-height: 1.9; min-height: 9.375rem; }
#needInput { font-size: 1.1875rem; min-height: 10rem; }
::placeholder { color: #b7af9f; opacity: 1; }
.char-counter { color: var(--text-muted); font-size: .875rem; }
.char-counter-row { margin-top: .5rem; }
.tone-group { grid-template-columns: repeat(6,minmax(0,1fr)); gap: .75rem; }
.tone-option { min-width: 0; }
.tone-option label { min-height: 3.375rem; padding: .75rem .625rem; border: 1px solid var(--line); border-radius: 62.4375rem; background: transparent; color: var(--ivory); font-size: 1rem; font-weight: 400; gap: .5rem; }
.tone-option label > span:first-child { font-size: .9375rem; filter: saturate(.6); }
.tone-option label:hover { border-color: var(--gold); color: var(--gold-hi); background: #C9A84C0d; }
.tone-option input[type="radio"]:checked + label { color: #3B200C; background: var(--gold); border-color: var(--gold); box-shadow: none; font-weight: 500; }
.generate-btn { min-height: 4rem; font: 600 1.375rem/1.5 var(--serif); border-radius: 62.4375rem; }
.result-section { gap: 1.25rem; max-width: 53.125rem; width: 100%; align-self: center; }
.verse-card, .result-box, .verse-box { background: var(--ivory); color: #3B200C; color-scheme: light; border: 1px solid var(--gold); box-shadow: none; padding: clamp(1.375rem,3vw,2rem); font-family: var(--serif); font-size: 1.25rem; line-height: 1.9; }
.verse-card, .verse-box { border-left: .25rem solid var(--gold); border-radius: 0 .75rem .75rem 0; }
.verse-card .verse-text { color: #3B200C; font: 400 1.25rem/1.9 var(--serif); }
.verse-card .verse-ref { color: var(--gold-deep); font: 500 .9375rem/1.7 var(--serif); }
.prayer-title { color: #3B200C; font-size: 1.375rem; }
.prayer-body { font-size: 1.25rem; line-height: 1.9; }
.result-controls { gap: .625rem; padding: 1.5rem 0 0; }
.result-controls .btn-secondary { border: 1px solid var(--gold-deep); color: var(--gold-deep); border-radius: 62.4375rem; font: 500 .875rem/1.5 var(--sans); background: transparent; }
.result-controls .btn-secondary:hover { color: #3B200C; border-color: var(--ink); background: #C9A84C24; }
.result-controls svg { stroke: currentColor; }
.result-box :focus-visible { outline-color: var(--gold-deep); }
.step-indicator { color: var(--ivory-soft); font-size: 1rem; }
.spinner { border-color: #1E181040; border-top-color: var(--ink); }
.divider { color: var(--gold-hi); font-family: var(--serif); font-size: .9375rem; }
.save-prompt { background: #2C1A0E; border: 1px solid var(--line); box-shadow: none; padding: 1.125rem 1.25rem; flex-wrap: wrap; }
.save-prompt p { color: var(--ivory); font-size: 1rem; }
.result-status-error { background: #2C1A0E; color: #ffd3bc; border-color: #c18a70; }
.figures { padding-top: var(--section); }
.figures__head { margin-bottom: 2rem; }
.figures__title { font-size: clamp(2.25rem,5vw,4.125rem); margin-top: 1rem; }
.figures__intro { font-size: 1.125rem; }
.tile__ref { letter-spacing: .08em; }
.tile__name { overflow-wrap: anywhere; }
.tile__soon { color: var(--ivory); background: #1E1810cf; }
.tile .nowrap { white-space: normal; }
.compact-footer { padding-block: 2rem; }
.compact-footer .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; }
.compact-footer .wordmark { font-size: 1.625rem; }
.compact-footer p { font-size: .875rem; color: var(--ivory-soft); flex: 1; }
.compact-footer a:last-child { font-size: .875rem; color: var(--gold-hi); text-underline-offset: .25rem; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; display: flex; justify-content: space-around; align-items: stretch; z-index: 100; max-width: 45rem; background: #1E1810ea; border-top: 1px solid var(--line); padding: .5rem .25rem calc(.5rem + env(safe-area-inset-bottom)); backdrop-filter: blur(1.125rem); -webkit-backdrop-filter: blur(1.125rem); }
.nav-item { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: .25rem; text-decoration: none; color: var(--ivory-mute); font-size: .75rem; line-height: 1.25; min-height: 3.25rem; gap: .3125rem; justify-content: center; border-radius: .625rem; }
.nav-item.active { color: var(--gold-hi); background: #C9A84C12; }
.nav-item [data-i18n] { max-width: 100%; text-align: center; white-space: normal; }
.nav-item .nav-icon svg { width: 1.375rem; height: 1.375rem; flex-shrink: 0; }
.nav-item.active .nav-icon { transform: none; }
.nav-item .nav-icon { display: flex; align-items: center; justify-content: center; font-size: 1.25rem; line-height: 1; }
.modal-overlay { background: #0009; backdrop-filter: blur(.625rem); }
.modal { background: var(--umber); border: 1px solid var(--line); color: var(--ivory); box-shadow: 0 1.5rem 6.25rem #0008; max-height: calc(100svh - 2.5rem); overflow-y: auto; }
.modal h2 { color: var(--ivory); font: 600 1.5rem/1.4 var(--serif); }
.modal p { color: var(--text-muted); }
#authLoggedIn [data-i18n="authSyncStatus"] { color: #a4d6b6 !important; }
.auth-avatar { margin-inline: auto; }
.toast { background: var(--umber); border: 1px solid var(--gold); color: var(--ivory); max-width: calc(100vw - 2rem); white-space: normal; text-align: center; width: max-content; }
.utility-page .page-content { width: min(100%,55rem); padding: 1.5rem var(--pad) 2rem; }
.utility-page .page-title { text-align: left; padding: 1.75rem 1.5rem; border: 1px solid var(--line); border-radius: .875rem; background: radial-gradient(ellipse at right top,#C9A84C1f,transparent 70%),linear-gradient(135deg,#2C1A0E,#1E1810); }
.utility-page .page-title h1 { font-size: clamp(1.75rem,4vw,2.5rem); color: var(--ivory); letter-spacing: .01em; }
.utility-page .page-title p { margin: .75rem 0 0; max-width: none; color: var(--ivory-soft); font-size: .9375rem; }
.stat-card, .reminder-card, .group-bar { background: #2C1A0E; border-color: var(--line); }
.stat-card .stat-value { color: var(--gold-hi); font-family: var(--serif); }
.stat-card .stat-label { font-size: .875rem; }
.tag-chip label, .filter-tab { min-height: 2.75rem; display: inline-flex; align-items: center; border-color: var(--line); }
.tag-chip input:checked + label, .filter-tab.active { color: #3B200C; background: var(--gold); }
.journal-entry, .prayer-card { background: var(--ivory); color: #3B200C; --text: var(--ink); --text-muted: #62594c;  --gold-light: #C9A84C; }
.journal-entry .entry-text, .prayer-card .prayer-text { font-family: var(--serif); font-size: 1.125rem; line-height: 1.9; color: #3B200C; overflow-wrap: anywhere; }
.journal-entry .entry-delete { color: #74561c; }
.reminder-title, .reminder-footer-text { color: var(--text-muted); font-size: .875rem; }
.reminder-time-block { background: #1E1810; border-color: var(--gold); }
.reminder-time-label, .reminder-time-text, .btn-perm-request { color: var(--gold-hi); }
.reminder-time-label { font-size: .8125rem; }
.reminder-time-text { font-family: var(--serif); font-size: 1.875rem; }
.reminder-divider { border-color: var(--line); }
.btn-perm-request { border-color: var(--gold); border-radius: 62.4375rem; min-height: 2.75rem; font-size: .9375rem; }
.reminder-badge.default, .permission-badge.default { color: #74561c; }
.reminder-btn-wrap:focus-within { outline: .1875rem solid var(--gold-hi); outline-offset: .25rem; border-radius: .875rem; }
.group-bar { flex-wrap: wrap; }
.group-list-item:hover, .group-list-item.current { background: #2C1A0E; }
.group-list-item-badge { color: #3B200C; background: var(--gold); }
.code-box { background: var(--ink); color: var(--gold-hi); }
.publish-select { min-width: 0; }
.translation-label { opacity: 1; }
.figure-page { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
.figure-page .btn-primary { width: auto; }
.figure-cta { max-width: 100%; padding: 1.125rem 1.75rem; font-family: var(--serif); font-size: 1.1875rem; }
.figure-page .prayer__text p { line-height: 1.9; }
.figure-page .p-hero__content { padding-bottom: 6.25rem; }
.figure-page .site-footer { padding-block: 2.5rem 1.5rem; }
.figure-page .site-footer__top { padding-bottom: 1.5rem; }
.figure-page .site-footer__credits { margin-top: 1.25rem; }
.countdown li:nth-child(n) { opacity: 1; }
.bookmarks-page { padding: 6.25rem var(--pad) calc(6.875rem + env(safe-area-inset-bottom)); background: radial-gradient(ellipse at top right,#C9A84C15,transparent 50%),#1E1810; align-items: stretch; }
.bookmarks-page #topbar { height: auto; justify-content: space-between; flex-wrap: wrap; pointer-events: none; }
.bookmarks-page #topbar .logo { margin-right: auto; color: var(--ivory); text-decoration: none; }
.bookmarks-heading { width: min(100%,70rem); margin: 1.25rem auto 0; }
.bookmarks-heading h1 { font-size: clamp(2rem,5vw,3rem); margin-top: .75rem; }
.bookmarks-page #grid { max-width: 70rem; margin: 2rem auto 0; padding: 1.5rem 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #2C1A0E; gap: 1.75rem .75rem; }
.bookmarks-page .bookmark .icon-wrap, .bookmarks-page .icon-preview { background: var(--ivory); border: 1px solid var(--gold); }
.bookmarks-page .bookmark .label, .bookmarks-page .add-wrap .label { color: var(--ivory); font-size: .875rem; text-shadow: none; }
.bookmarks-page .add-btn { background: transparent; border-color: var(--gold); color: var(--gold-hi); }
.bookmarks-page #btn-login, .bookmarks-page .modal .btn-save { background: var(--gold); color: #3B200C; }
.bookmarks-page #btn-logout, .bookmarks-page .modal .btn-cancel { background: transparent; border: 1px solid var(--line); color: var(--ivory); }
.bookmarks-page .modal label { color: var(--ivory-soft); }
.bookmarks-page .modal input { background: #1E1810; color: var(--ivory); border-color: var(--line); }
.bookmarks-page .modal .hint { color: var(--text-muted); }
.bookmarks-page #ctx-menu { background: #2C1A0E; border: 1px solid var(--line); }
.bookmarks-page .ctx-item { color: var(--ivory); }
.bookmarks-page .ctx-item:hover { background: #C9A84C22; }
.bookmarks-page .ctx-item.danger { color: #ffb8ac; }
.bookmarks-page .ctx-item.danger:hover { background: #572720; }
.bookmarks-page .modal .btn { border-radius: 62.4375rem; }
@media (max-width: 1099px) { .tone-group { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 899px) {
  .hero { min-height: 88svh; }
  .hero__media { inset: 0; height: 100%; }
  .hero__media img { object-position: 55% 30%; }
  .hero__media::after { background: linear-gradient(180deg,#1E181080,transparent 24%),linear-gradient(0deg,#1E1810 0%,#1E1810ee 22%,#1E181088 48%,transparent 76%); }
  .hero__content { padding-top: max(18.75rem,36svh); padding-bottom: 1.75rem; }
  .hero__title { font-size: clamp(2.75rem,7.5vw,4rem); }
  .hero__verse { font-size: 1.125rem; max-width: 27em; margin-top: 1.25rem; }
  .hero__actions { margin-top: 1.375rem; }
  .hero__credit { position: static; white-space: normal; margin-top: 1.5rem; text-align: left; font-size: .6875rem; }
  .figure-page .p-hero__content { padding-bottom: 2.25rem; }
  .figure-page .nowrap, .scripture__ending { white-space: normal; }
}
@media (max-width: 599px) {
  .top-bar, #topbar { padding: .75rem 1rem; min-height: 4.5rem; gap: .375rem; }
  .top-bar .logo-icon { width: 1.125rem; }
  .top-bar .logo { gap: .25rem; }
  .top-bar .logo-text { font-size: 1.25rem; }
  .top-bar-actions { gap: .375rem; }
  #authBtn { width: 2.125rem; height: 2.375rem; min-height: 2.375rem; }
  .lang-toggle button { min-width: 1.8125rem; padding-inline: .375rem; font-size: .75rem; }
  .hero__title { font-size: clamp(2.5rem,11.3vw,3.75rem); letter-spacing: -.02em; }
  .hero-cta { min-height: 3.375rem; font-size: 1.125rem; }
  .pray-section { padding-inline: 1rem; }
  .pray-wrap { gap: 1.125rem; }
  .card { padding: 1.25rem 1rem; }
  .tone-group { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .625rem; }
  .tone-option label { min-height: 3.25rem; font-size: 1rem; }
  .card-heading-row { align-items: flex-start; flex-direction: row; gap: .75rem; }
  .card-hint { max-width: 48%; margin: 0; }
  .card-title { font-size: 1rem; }
  #needInput { font-size: 1.125rem; padding: .75rem; }
  .result-box, .verse-card { padding: 1.375rem; }
  .result-box, .verse-card .verse-text, .prayer-body { font-size: 1.1875rem; }
  .result-controls .btn { padding-inline: .75rem; }
  .save-prompt { gap: .75rem; }
  .save-prompt p { flex-basis: 100%; }
  .save-actions { margin-left: auto; }
  .utility-page .page-content { padding-inline: 1rem; gap: 1.25rem; }
  .utility-page .page-title { padding: 1.5rem 1.25rem; }
  .compact-footer .wrap { display: block; }
  .compact-footer p { margin: .625rem 0; }
  .figure-page .p-hero--abraham .p-hero__name { font-size: 19vw; }
  .figure-page .scripture__quote blockquote { padding-inline: 1.5rem; }
  .figure-page .chapter__title { font-size: 2.125rem; }
  .figure-page .prayer__text p { font-size: 1.25rem; }
  .bookmarks-page #logged-in-area { gap: .375rem; }
  .bookmarks-page #user-name { max-width: 4rem; }
  .bookmarks-page #sync-status { max-width: 4rem; white-space: normal; }
}
@media (max-width: 359px) {
  .top-bar { flex-wrap: wrap; }
  .top-bar-actions { margin-left: auto; }
  .hero__title { font-size: 2.1875rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Keep focus and icon contrast on the light reading surfaces. */
.skip-link { z-index: 1000; }
.result-controls .btn-secondary:hover svg { stroke: currentColor; }
.journal-entry :focus-visible, .prayer-card :focus-visible { outline-color: var(--gold-deep); }
#authUserEmail, .group-bar-name { overflow-wrap: anywhere; }

/* Undo the legacy desktop grid: 520px textareas, full-height cards, two-column utility pages. */
textarea { height: 11.25rem; min-height: 7.5rem; resize: vertical; }
#needInput { height: 11.875rem; min-height: 7.5rem; }
.card { min-height: 0; }
.pray-section { padding-top: clamp(2.25rem, 4.5vw, 4rem); }
.generate-btn { width: 100%; align-self: stretch; }
.utility-page .page-content { display: flex; flex-direction: column; gap: 1.5rem; }
.utility-page .page-content > * { min-width: 0; }
.stat-card { padding: 1.125rem 1rem; }
.group-action-row .btn { flex: 1; }
.utility-page .filter-tabs { align-self: flex-start; }
.utility-page .divider { margin-top: .5rem; }
.utility-page .empty-state { padding-block: 2rem 1rem; }
.empty-state p { color: var(--text-muted); }
.bookmarks-page .bookmark .label { word-break: normal; overflow-wrap: anywhere; }
@media (max-width: 599px) {
  textarea { height: 9.375rem; }
  #needInput { height: 9.375rem; }
}

/* Optional music control, alongside the account and language controls. */
.bgmusic-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; min-width: 2.25rem; min-height: 2.25rem;
  flex-shrink: 0; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ivory-mute);
  background: #1E181066; cursor: pointer; pointer-events: auto;
  transition: color .2s, border-color .2s, background-color .2s;
}
.bgmusic-toggle:hover, .bgmusic-toggle[aria-pressed="true"] {
  color: var(--gold-hi); border-color: var(--gold); background: #C9A84C12;
}
.bgmusic-header-actions { display: flex; align-items: center; gap: .625rem; }
.bgmusic-toggle--fixed { position: fixed; top: 1.125rem; right: 1rem; z-index: 110; }
@media (max-width: 599px) {
  .bottom-nav .nav-item { font-size: .6875rem; }
}

/* Prayer wall: stone, high-window light, and quiet parchment. */
[data-dust] { position: relative; isolation: isolate; }
.light-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; border-radius: inherit; }
.light-dust[hidden] { display: none; }
.prayer-wall-page {
  background-color: #1E1810;
  background-size: 11.25rem 11.25rem, auto, auto, auto, auto;
  background-repeat: repeat, no-repeat, repeat, repeat, no-repeat;
  background-position: 0 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' opacity='.07' filter='url(%23grain)' d='M0 0h180v180H0z'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 75% 0%, #A07C3033, transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 138px, #1E181050 139px 142px, #ffffff03 143px 145px),
    repeating-linear-gradient(90deg, #2C1A0E30 0 239px, #1E181040 240px 243px, transparent 244px 480px),
    linear-gradient(110deg, #1E1810, #2C1A0E 55%, #1E1810);
}
.prayer-wall-page .app-wrapper { background: transparent; }
.prayer-wall-page .page-content { width: min(100%, 920px); gap: 24px; }
.prayer-wall-page .wall-hero {
  position: relative; overflow: hidden; border: 0; border-radius: 0;
  background: transparent; text-align: center; padding: 68px 20px 48px;
}
.prayer-wall-page .wall-hero::before {
  content: ''; position: absolute; inset: -140px -10% -80px 5%; z-index: -1;
  background: linear-gradient(125deg, transparent 33%, #F3EAD80a 39%, #F3EAD833 44%, #E8D19414 52%, transparent 62%);
  filter: blur(15px); pointer-events: none;
}
.prayer-wall-page .wall-hero::after {
  content: ''; position: absolute; top: -22px; right: 22%; width: 38px; height: 70px;
  background: #E8D1949c; box-shadow: 0 0 45px 12px #E8D19440;
  transform: rotate(28deg); filter: blur(10px); z-index: -1; pointer-events: none;
}
.prayer-wall-page .wall-hero h1 { font-size: clamp(38px, 6vw, 58px); letter-spacing: .16em; font-weight: 500; }
.prayer-wall-page .wall-hero p { max-width: 36em; margin: 20px auto 0; font-family: var(--serif); line-height: 2; color: #d6cbb5; }
.prayer-wall-page .prayer-submit {
  border: 1px solid #C9A84C55; border-radius: 16px; padding: clamp(22px, 4vw, 36px);
  background: linear-gradient(135deg, #2C1A0Eed, #1E1810ee); box-shadow: 0 16px 48px #0003;
}
.prayer-wall-page .prayer-submit .card-title { color: #F3EAD8; font-size: 21px; font-weight: 500; letter-spacing: .06em; }
.prayer-wall-page #categoryGroup { display: flex; gap: 10px; margin: 22px 0 18px; }
.prayer-wall-page #categoryGroup .tag-chip { flex: 1 1 88px; }
.prayer-wall-page #categoryGroup label {
  display: flex; justify-content: center; min-height: 50px; padding: 10px 16px;
  font-family: var(--serif); font-size: 17px; color: #ded3be; background: #ffffff03; border: 1px solid #C9A84C4f;
}
.prayer-wall-page #categoryGroup input:checked + label { background: #E8D194; color: #3B200C; border-color: #E8D194; }
.prayer-wall-page #prayerNeedInput {
  height: 160px; padding: 20px; color: #3B200C; background: linear-gradient(120deg, #F3EAD8, #F3EAD8);
  border: 1px solid #E8D194; border-radius: 10px; font-family: var(--serif); font-size: 18px; line-height: 1.9; color-scheme: light;
}
.prayer-wall-page #prayerNeedInput::placeholder { color: #776d5d; }
.prayer-char-count { display: block; margin-top: 6px; text-align: right; color: #cbbd9f; font-size: 12px; font-variant-numeric: tabular-nums; }
.prayer-wall-page .publish-select { background: #1E1810; color: #F3EAD8; border-color: #C9A84C55; }
.prayer-wall-page .group-action-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.prayer-wall-page .group-action-row .btn { flex: 0 1 auto; min-height: 44px; padding: 8px 12px; font-size: 13px; border-color: transparent; color: #c2b69e; }
.prayer-wall-page .group-action-row .btn:hover { color: #F3EAD8; border-color: #C9A84C55; }
.prayer-wall-page .group-bar { background: #1E1810a8; border: 1px solid #C9A84C44; }
.prayer-wall-page .group-bar-name { color: #E8D194; font-weight: 500; }
.wall-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.prayer-wall-page .wall-filters .filter-tab { padding: 8px 20px; background: #1E181066; color: #d6c9af; border: 1px solid #C9A84C4d; border-radius: 999px; }
.prayer-wall-page .wall-filters .filter-tab.active { background: #E8D194; color: #3B200C; border-color: #E8D194; }
.prayer-wall-page #sortTabs { border: 0; background: transparent; margin: -8px 0 0; padding: 0; }
.prayer-wall-page #sortTabs .filter-tab { background: transparent; color: #b9ad94; border-radius: 0; border: 0; border-bottom: 1px solid transparent; padding: 6px 12px; }
.prayer-wall-page #sortTabs .filter-tab.active { color: #E8D194; border-bottom-color: #C9A84C; }
.prayer-wall-page #prayerList { display: grid; gap: 26px; padding-block: 8px 20px; }
.prayer-wall-page .prayer-card {
  position: relative; border: 1px solid #E8D194; border-radius: 5px 14px 5px 14px;
  padding: 30px clamp(22px, 4vw, 34px) 26px; margin: 0;
  background: radial-gradient(ellipse at 5% 0%, #F3EAD870, transparent 65%), linear-gradient(100deg, #F3EAD8, #F3EAD8 24%, #F3EAD8 78%, #e0d1b4);
  box-shadow: 0 12px 30px #0003; color-scheme: light;
}
.prayer-wall-page .prayer-card::before, .prayer-wall-page .prayer-card::after {
  content: ''; position: absolute; left: 7px; right: 7px; height: 7px; border-radius: 50%; pointer-events: none;
}
.prayer-wall-page .prayer-card::before { top: -3px; background: linear-gradient(#E8D194, #F3EAD8 60%, #C9A84C); box-shadow: 0 2px 3px #74561C14; }
.prayer-wall-page .prayer-card::after { bottom: -3px; background: linear-gradient(#C9A84C, #F3EAD8 55%, #F3EAD8); box-shadow: 0 3px 4px #0002; }
.prayer-wall-page .prayer-card .prayer-meta { justify-content: flex-start; gap: 8px 12px; padding-right: 40px; }
.prayer-wall-page .prayer-card .author { color: #74561C; font-weight: 400; letter-spacing: .08em; }
.prayer-wall-page .prayer-card .category-badge { color: #74561C; border: 1px solid #C9A84C40; background: #A07C300d; font-weight: 400; }
.prayer-wall-page .prayer-card .group-badge { color: #5a634b; background: #74805a12; }
.prayer-wall-page .prayer-card .prayer-text { margin: 24px 0; color: #3B200C; font-size: 19px; line-height: 2; }
.prayer-wall-page .prayer-footer { flex-wrap: wrap; gap: 12px; }
.prayer-wall-page .candle-count { color: #74561C; font-size: 13px; margin-bottom: 12px; }
.prayer-wall-page .candle-btn { min-height: 44px; font-family: var(--serif); font-size: 15px; color: #74561C; border-color: #A07C3066; padding: 9px 20px; }
.prayer-wall-page .candle-btn:hover, .prayer-wall-page .candle-btn.lit { background: #C9A84C24; border-color: #A07C30; color: #74561C; }
.prayer-wall-page .candle-btn:disabled { opacity: 1; cursor: default; }
.prayer-wall-page .prayer-time { margin-left: auto; }
.wall-candle { position: absolute; top: 33px; right: 30px; width: 20px; height: 40px; pointer-events: none; }
.candle-wax { position: absolute; bottom: 0; left: 2px; width: 16px; height: 27px; border-radius: 3px 3px 4px 4px; background: linear-gradient(90deg, #bcae90, #F3EAD8 42%, #E8D194); box-shadow: 0 3px 4px #74561C24; }
.candle-wax::before { content: ''; position: absolute; top: -5px; left: 7px; width: 2px; height: 6px; background: #74561C; border-radius: 1px; }
.candle-flame { position: absolute; top: -7px; left: 5px; width: 10px; height: 19px; border-radius: 65% 35% 55% 45%; background: radial-gradient(ellipse at 50% 80%, #F3EAD8 8%, #E8D194 45%, #C9A84C 80%); opacity: 0; transform-origin: 50% 100%; }
.candle-glow { position: absolute; width: 80px; height: 80px; top: -36px; left: -30px; background: radial-gradient(ellipse, #C9A84C70, #C9A84C22 40%, transparent 70%); opacity: 0; }
.is-lit .candle-flame, .is-answered .candle-flame { opacity: 1; }
.is-lit .candle-glow, .is-answered .candle-glow { opacity: 1; }
.is-answered .candle-wax { background: linear-gradient(90deg, #A07C30, #E8D194 42%, #C9A84C); }
.prayer-wall-page .prayer-card.is-answered { border-color: #C9A84C; padding-top: 58px; }
.answered-ribbon { position: absolute; top: 12px; left: 0; padding: 3px 18px 3px 26px; background: #A07C30; color: #F3EAD8; font-family: var(--serif); font-size: 12px; letter-spacing: .08em; border-radius: 0 2px 10px 0; }
.prayer-wall-page .empty-state { padding: 44px 24px; border: 1px solid #E8D19433; background: #1E181066; border-radius: 12px; text-align: center; }
.prayer-wall-page .empty-icon { color: #E8D194; font-size: 36px; margin-bottom: 18px; }
.prayer-wall-page .empty-state p { color: #d5c7ab; font-family: var(--serif); }
.comfort-verse { position: relative; padding: 24px 50px 24px 28px; border: 1px solid #E8D19455; border-left: 3px solid #E8D194; border-radius: 8px; background: #2C1A0E; color: #F3EAD8; font-family: var(--serif); font-size: 17px; line-height: 2; }
.comfort-verse[hidden] { display: none; }
.comfort-verse p { margin: 0; }
.comfort-dismiss { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: transparent; color: #E8D194; font-size: 24px; cursor: pointer; }
@keyframes wall-flame { 0%, 100% { transform: rotate(-3deg) scale(.95, 1); opacity: .85; } 50% { transform: rotate(4deg) scale(1.06, .94); opacity: 1; } }
@keyframes wall-glow-up { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes wall-comfort { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .is-lit .candle-flame, .is-answered .candle-flame { animation: wall-glow-up 1.6s ease-out both, wall-flame 3.8s 1.6s ease-in-out infinite; }
  .is-lit .candle-glow, .is-answered .candle-glow { animation: wall-glow-up 1.6s ease-out both; }
  .comfort-verse:not([hidden]) { animation: wall-comfort .7s ease-out both; }
}
@media (max-width: 480px) {
  .prayer-wall-page .wall-hero { padding: 48px 8px 28px; }
  .prayer-wall-page .wall-hero p { font-size: 14px; max-width: 20em; }
  .prayer-wall-page #categoryGroup { gap: 8px; }
  .prayer-wall-page #categoryGroup .tag-chip { flex-basis: calc(33.333% - 8px); }
  .prayer-wall-page #categoryGroup label { padding-inline: 10px; font-size: 16px; }
  .prayer-wall-page .wall-filters .filter-tab { padding-inline: 16px; }
  .prayer-wall-page .prayer-card { padding-inline: 22px; }
  .wall-candle { right: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .light-dust { display: none; }
  .prayer-wall-page .fade-in, .comfort-verse, .candle-flame, .candle-glow { animation: none !important; transition: none !important; }
  .reveal, .rise { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* English hero: Latin headline/verse is longer — scale down so the CTA stays above the fold. */
html[lang="en"] .hero__title { font-size: clamp(36px, 4.6vw, 68px); max-width: 12em; line-height: 1.12; }
html[lang="en"] .hero .hero-sub, html[lang="en"] .hero [data-i18n="heroSub"] { font-size: clamp(15px, 1.25vw, 18px); line-height: 1.7; max-width: 34em; }
@media (max-width: 480px) { html[lang="en"] .hero__title { font-size: clamp(32px, 9vw, 44px); } }


/* Finished figure pages and live gallery tiles, scoped to their app pages. */
/* ==========================================================================
   FIGURE PAGES — shared pieces for David, Solomon, Elijah, Gethsemane
   ========================================================================== */

/* Scripture: verse-by-verse lines, a gold highlight, a muted translator's note */
.figure-page .scripture__line {
  display: block;
  text-wrap: wrap;
  line-break: strict;
}
.figure-page .scripture__line + .scripture__line { margin-top: 0.4em; }
.figure-page .scripture__hl { color: var(--gold-hi); }
.figure-page .scripture__note {
  font-size: 0.6em;
  letter-spacing: 0;
  color: var(--ivory-mute);
  vertical-align: 0.15em;
}

/* Phones and small tablets: the painting starts just under the breadcrumb (its top fades into
   the nav), so the breadcrumb never sits on a face; the title sits on the darkened foot of the painting. */
@media (max-width: 899px) {
  .figure-page .p-hero--david .p-hero__media,
  .figure-page .p-hero--solomon .p-hero__media,
  .figure-page .p-hero--elijah .p-hero__media,
  .figure-page .p-hero--gethsemane .p-hero__media {
    top: clamp(5.5rem, 12svh, 7.5rem);
    height: clamp(28.75rem, 64svh, 43.75rem);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 9%);
    mask-image: linear-gradient(180deg, transparent, #000 9%);
  }
  .figure-page .p-hero--david .p-hero__media::after,
  .figure-page .p-hero--solomon .p-hero__media::after,
  .figure-page .p-hero--elijah .p-hero__media::after,
  .figure-page .p-hero--gethsemane .p-hero__media::after {
    background: linear-gradient(0deg, var(--ink), rgba(30, 24, 16, .75) 16%, rgba(30, 24, 16, 0) 40%);
  }
}

/* Footer: with six live pages the link list wraps inside a fixed measure
   instead of squeezing the wordmark column */
.figure-page .site-footer__nav { max-width: 36em; }
@media (min-width: 900px) {
  .figure-page .site-footer__nav ul { justify-content: flex-end; }
}

/* ==========================================================================
   DAVID · Psalm 23 — Honthorst, 1601×2000 portrait: face ≈ (0.30, 0.22),
   crown from y ≈ 0.12, harp and hands at the lower right
   ========================================================================== */

/* Desktop: Hannah's layout — the face stays lit on the left; the title sits on the dark
   background and harp at the right. Top-aligned so the crown clears the breadcrumb. */
@media (min-width: 900px) {
  .figure-page .p-hero--david .p-hero__media img { object-position: 30% 0%; }
  .figure-page .p-hero--david .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.65) 0%, rgba(30, 24, 16, 0) 18%),
      linear-gradient(90deg, rgba(30, 24, 16, 0) 0%, rgba(30, 24, 16, 0) 47%, rgba(30, 24, 16, 0.55) 55%, rgba(30, 24, 16, 0.85) 64%, rgba(30, 24, 16, 0.92) 100%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.8) 0%, rgba(30, 24, 16, 0) 30%);
  }
}
@media (max-width: 899px) {
  .figure-page .p-hero--david .p-hero__media img { object-position: 30% 0%; }
}

/* 4:5 crop: x 240–1160, y 160–1310 — crown, upturned face and beard, the harp's scroll at the right edge */
.figure-page .detail--david img {
  top: -13.91%;       /* 160 / 1150 */
  left: -26.09%;      /* 240 / 920 */
  width: 174.02%;     /* 1601 / 920 */
}

/* Verses set line by line, like a song */
.figure-page .scripture__quote--verses { max-width: 28em; font-size: clamp(1.375rem, 2.3vw, 2.125rem); }
@media (max-width: 639px) {
  .figure-page .scripture__quote--verses { font-size: 1.25rem; }
}

/* ==========================================================================
   SOLOMON — Giordano, 1280×883. Safe source rectangle: x 280–584, y 0–380.
   This shows the robed figure and raised hand, excluding the sleeping king,
   the lower-left figure and the bare-chested angels. Each window clips before
   the decorative scrim; darkness is not used to hide an exposed torso.
   ========================================================================== */

/* Cover the window with the safe rectangle, preserving the painting's proportions.
   Container units keep both source limits intact at every window aspect ratio. */
:is(.figure-page, .home-page) .solomon-window {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  container-type: size;
  --painting-width: max(421.052632cqw, 336.842105cqh);
  --painting-left: -0.21875;
}
.figure-page .p-hero--solomon .solomon-window img,
.figure-page .band .solomon-window img,
.home-page #figures #solomon .solomon-window img {
  position: absolute;
  inset: 0 auto auto;
  left: calc(var(--painting-width) * var(--painting-left));
  width: var(--painting-width);
  max-width: none;
  height: auto;
  object-fit: fill;
  transform: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.figure-page .p-hero--solomon .p-hero__media { overflow: hidden; }
.figure-page .p-hero--solomon .p-hero__name { white-space: nowrap; }

/* The safe portrait occupies the left; the title has its own dark space on the right. */
@media (min-width: 900px) {
  .figure-page .p-hero--solomon .solomon-window { right: 40%; }
  .figure-page .p-hero--solomon .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.6) 0%, rgba(30, 24, 16, 0) 20%),
      linear-gradient(90deg, transparent 36%, var(--ink) 60%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.8), transparent 30%);
  }
  .figure-page .p-hero--solomon .p-hero__name { font-size: clamp(5rem, 10vw, 9.75rem); letter-spacing: 0.06em; }
}

/* 4:5 detail: the same safe source rectangle, without a hover transform. */
.figure-page .detail--solomon img {
  top: 0;
  left: -92.105263%;  /* 280 / 304 */
  width: 421.052632%; /* 1280 / 304 */
}

/* The shared band uses only clouds and light: x 640–900, y 0–300. */
.figure-page .band .solomon-window {
  --painting-width: max(492.307693cqw, 426.666667cqh);
  --painting-left: -0.5;
}

/* ==========================================================================
   ELIJAH — Ferdinand Bol, 2000×1814: the angel in white at the left (face ≈ 0.29, 0.15),
   reaching toward Elijah asleep in a red cloak (head ≈ 0.69, 0.37); flask ≈ (0.22, 0.61)
   ========================================================================== */

.figure-page .p-hero--elijah .p-hero__name { white-space: nowrap; }

/* Desktop: full-bleed, dropped just below the breadcrumb so the angel's face is clear of it;
   the title sits low on the left over the darkened ground, well below both faces. */
@media (min-width: 900px) {
  .figure-page .p-hero--elijah .p-hero__media {
    top: clamp(2.25rem, 6vh, 4rem);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 10%);
    mask-image: linear-gradient(180deg, transparent, #000 10%);
  }
  .figure-page .p-hero--elijah .p-hero__media img { object-position: 50% 0%; }
  .figure-page .p-hero--elijah .p-hero__media::after {
    background:
      linear-gradient(90deg, rgba(30, 24, 16, 0.7) 0%, rgba(30, 24, 16, 0.35) 30%, rgba(30, 24, 16, 0) 48%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.96) 0%, rgba(30, 24, 16, 0.8) 18%, rgba(30, 24, 16, 0) 42%);
  }
  .figure-page .p-hero--elijah .p-hero__content {
    max-width: none;
    justify-content: flex-start;
    padding-bottom: clamp(2.5rem, 7vh, 5.5rem);
  }
  .figure-page .p-hero--elijah .p-hero__block { width: min-content; }
  .figure-page .p-hero--elijah .p-hero__name { font-size: clamp(4.5rem, min(8vw, 13vh), 9.375rem); }
}
@media (max-width: 899px) {
  .figure-page .p-hero--elijah .p-hero__media img { object-position: 43% 0%; }
}

/* 4:5 crop: x 800–1600, y 280–1280 — the reaching hand and Elijah's whole face, hand on his brow */
.figure-page .detail--elijah img {
  top: -28%;          /* 280 / 1000 */
  left: -100%;        /* 800 / 800 */
  width: 250%;        /* 2000 / 800 */
}

/* Scripture: the plea, then the two gentle wake-up calls */
.figure-page .scripture__quote--again { margin-top: clamp(1.75rem, 3vw, 2.75rem); }

/* ==========================================================================
   GETHSEMANE — Carl Bloch, 1669×2000 portrait: Jesus in red kneeling, head bowed against
   the angel (faces ≈ 0.52–0.56, 0.38–0.45; group x 0.2–0.65, y 0.38–0.75). The painting's
   left edge is near-black, which lets it dissolve into the page on wide screens.
   ========================================================================== */

.figure-page .p-hero--gethsemane .p-hero__name { white-space: nowrap; letter-spacing: 0.04em; }

/* Desktop: the painting hangs to the right of the title like the homepage hero,
   its black left edge melting into the ink; the title sits in that darkness. */
@media (min-width: 900px) {
  .figure-page .p-hero--gethsemane .p-hero__media {
    left: 22%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%);
    mask-image: linear-gradient(90deg, transparent, #000 18%);
  }
  .figure-page .p-hero--gethsemane .p-hero__media img { object-position: 50% 60%; }
  .figure-page .p-hero--gethsemane .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.6) 0%, rgba(30, 24, 16, 0) 18%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.85) 0%, rgba(30, 24, 16, 0) 30%);
  }
  .figure-page .p-hero--gethsemane .p-hero__content {
    max-width: none;
    justify-content: flex-start;
  }
  .figure-page .p-hero--gethsemane .p-hero__block { width: min-content; }
  .figure-page .p-hero--gethsemane .p-hero__name { font-size: clamp(3.5rem, 5.6vw, 6.5rem); }
}
@media (max-width: 899px) {
  /* phones crop only sideways; on tablets the 45% keeps the whole kneeling group above the title */
  .figure-page .p-hero--gethsemane .p-hero__media img { object-position: 45% 45%; }
  .figure-page .p-hero--gethsemane .p-hero__name { font-size: min(15.5vw, 7.5rem); }
}

/* 4:5 crop: x 520–1240, y 620–1520 — the angel leaning toward Jesus' bowed head, down to his clasped hands */
.figure-page .detail--gethsemane img {
  top: -68.89%;       /* 620 / 900 */
  left: -72.22%;      /* 520 / 720 */
  width: 231.81%;     /* 1669 / 720 */
}

/* The quote's last sentence — the turn — on its own gold line */
.figure-page .scripture__quote--gethsemane .scripture__hl { margin-top: 0.6em; }

/* ==========================================================================
   INDEX — six live pages
   ========================================================================== */

/* Live tiles in the single, wide and feature slots: same pieces, scaled to the tile;
   the caption (now with a button) is taller, so the scrim reaches a little higher */
.home-page #figures .tile--compact::after {
  background: linear-gradient(0deg, rgba(30, 24, 16, 0.96) 0%, rgba(30, 24, 16, 0.85) 32%, rgba(30, 24, 16, 0.3) 58%, rgba(30, 24, 16, 0) 74%);
}
.home-page #figures .tile--compact .tile__name { font-size: 3rem; }
.home-page #figures .tile--live.tile--compact .tile__note { font-size: 1.1875rem; }
.home-page #figures .tile--compact .tile__open {
  gap: .625rem;
  margin-top: 1.25rem;
  padding: .625rem 1.25rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
}
@media (min-width: 640px) {
  .home-page #figures .tile--compact .tile__name { font-size: clamp(2.25rem, 3.6vw, 3.25rem); }
}
@media (min-width: 1000px) {
  .home-page #figures .tile--compact .tile__inner { padding: clamp(1.375rem, 2.2vw, 2rem); }
  .home-page #figures .tile--live.tile--compact .tile__live { left: clamp(1.375rem, 2.2vw, 2rem); }
}

/* Elijah — Bol's colour painting replaces the engraving: angel and sleeper both in frame */
.home-page #figures #elijah img { object-position: 42% 50%; }

/* Solomon uses the shared safe portrait window at every gallery breakpoint. */
.home-page #figures #solomon::after {
  background: linear-gradient(0deg, var(--ink), rgba(30, 24, 16, 0.85) 32%, transparent 70%);
}



/* Bol's colour painting replaces the old engraving in this tile. */
.home-page #figures #elijah img { filter: none; }
.home-page #figures #david-23 .tile__name { font-size: clamp(1.75rem, 3vw, 2.625rem); }

/* Mood links: spacious gold hairline pills above the gallery. */
.home-page #figures .mood-picker { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.home-page #figures .mood-picker__title {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.625rem);
  font-weight: 500;
  line-height: 1.3;
}
.home-page #figures .moods {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-page #figures .mood {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 1rem 1.625rem;
  border: 1px solid var(--gold);
  border-radius: 62.4375rem;
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.4;
  color: var(--ivory);
  text-decoration: none;
  background: rgba(30, 24, 16, .25);
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s;
}
.home-page #figures .mood .arrow {
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  color: var(--gold);
  transition: transform .35s var(--ease), color .35s;
}
.home-page #figures .mood:hover,
.home-page #figures .mood:focus-visible { background: var(--gold); color: #3B200C; }
.home-page #figures .mood:hover .arrow,
.home-page #figures .mood:focus-visible .arrow { color: #3B200C; transform: translateX(.25rem); }
@media (max-width: 899px) {
  .home-page #figures .moods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
  .home-page #figures .mood { width: 100%; gap: .375rem; padding: .875rem 1rem; font-size: 1.1875rem; letter-spacing: .02em; }
}
@media (max-width: 599px) {
  .home-page #figures .moods { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .home-page #figures .moods li { display: flex; }
  .home-page #figures .mood { min-height: 4rem; font-size: clamp(1rem, 4.6vw, 1.1875rem); padding: .875rem .75rem .875rem 1rem; letter-spacing: 0; }
}
@media (max-width: 359px) {
  .home-page #figures .mood { padding-inline: .75rem .625rem; font-size: 1rem; }
}

@media (max-width: 639px) {
  .figure-page .scripture__quote--gethsemane { font-size: clamp(1.125rem, 5.6vw, 1.375rem); }
}

/* brand logo image */
.site-logo{display:block;height:2.75rem;width:auto}
@media (max-width:640px){.site-logo{height:2rem}}

.logo:has(.site-logo) .logo-icon{display:none!important}

/* ===== top sky banner ===== */
.sky-banner{position:relative;width:100%;overflow:hidden;background:#1E1810;line-height:0}

.sky-banner__img{display:block;width:100%;height:auto;max-height:78vh;object-fit:cover;object-position:center}
.sky-banner__stars{position:absolute;inset:0 0 35% 0;pointer-events:none;
 background-image:
 radial-gradient(1.2px 1.2px at 62% 18%,#F3EAD8 60%,transparent),radial-gradient(1px 1px at 71% 9%,#fff 60%,transparent),
 radial-gradient(1.4px 1.4px at 83% 22%,#F3EAD8 60%,transparent),radial-gradient(1px 1px at 91% 12%,#fff 60%,transparent),
 radial-gradient(1px 1px at 55% 30%,#fff 60%,transparent),radial-gradient(1.3px 1.3px at 96% 35%,#E8D194 60%,transparent),
 radial-gradient(1px 1px at 76% 40%,#fff 60%,transparent),radial-gradient(1px 1px at 4% 8%,#fff 60%,transparent);
 animation:sbTwinkle 4.5s ease-in-out infinite}
.sky-banner__stars--b{background-image:
 radial-gradient(1px 1px at 66% 28%,#fff 60%,transparent),radial-gradient(1.3px 1.3px at 87% 6%,#F3EAD8 60%,transparent),
 radial-gradient(1px 1px at 79% 15%,#fff 60%,transparent),radial-gradient(1.1px 1.1px at 59% 8%,#fff 60%,transparent),
 radial-gradient(1px 1px at 93% 26%,#fff 60%,transparent),radial-gradient(1px 1px at 8% 30%,#fff 60%,transparent);
 animation-delay:2.2s;animation-duration:5.5s}
.sky-banner__glow{position:absolute;left:7%;top:8%;width:24%;aspect-ratio:1;border-radius:50%;pointer-events:none;
 background:radial-gradient(circle,rgba(232,209,148,.35) 0%,rgba(232,209,148,.12) 35%,transparent 70%);mix-blend-mode:screen;animation:sbBreathe 6s ease-in-out infinite}
.sky-banner__horizon{position:absolute;left:-10%;right:-10%;bottom:0;height:30%;pointer-events:none;
 background:radial-gradient(60% 55% at 22% 100%,rgba(232,209,148,.28),transparent 70%);mix-blend-mode:screen;animation:sbBreathe 7s ease-in-out infinite reverse}
@keyframes sbTwinkle{0%,100%{opacity:.25}50%{opacity:1}}
@keyframes sbBreathe{0%,100%{opacity:.55;transform:scale(1)}50%{opacity:1;transform:scale(1.04)}}
.sky-banner::after{content:"";position:absolute;left:0;right:0;bottom:0;height:18%;background:linear-gradient(to bottom,transparent,#1E1810);pointer-events:none}
@media (prefers-reduced-motion:reduce){.sky-banner *{animation:none!important}}
.sky-banner::after{height:30%}
@media (max-width:700px){
 .sky-banner{padding-top:4rem}
 .sky-banner__img{max-height:none;object-fit:contain}
}
@media (min-width:701px){
 .sky-banner{padding-top:3.5rem}
 .sky-banner__img{height:clamp(15rem,40vh,23.75rem);max-height:none;width:100%;object-fit:cover;object-position:42% 45%}
}
@media (min-width:701px){
 .sky-banner__img{object-fit:contain;object-position:center;background:#1E1810}
 .sky-banner{background:#1E1810}
}

.logo.brand{gap:.25rem}
.home-page .hero__title{font-size:clamp(2rem,3.6vw,3.25rem)!important;text-align:left;line-height:1.2}
.home-page .hero__content{text-align:left;align-items:flex-start}

.site-logo{display:block;height:2.875rem;width:auto;mix-blend-mode:normal}
@media (max-width:640px){.site-logo{height:2.125rem}}
section.hero h1.hero__title{font-size:clamp(1.875rem,3.4vw,3rem)!important;max-width:14em;text-align:left}
@media (max-width:640px){section.hero h1.hero__title{font-size:clamp(1.75rem,7.6vw,2.25rem)!important}}
.sky-banner__img{-webkit-mask-image:linear-gradient(to right,transparent 0,#000 12%,#000 88%,transparent 100%),linear-gradient(to bottom,#000 70%,transparent 100%);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent 0,#000 12%,#000 88%,transparent 100%),linear-gradient(to bottom,#000 70%,transparent 100%);mask-composite:intersect}
.sky-banner,.sky-banner__img{background:#1E1810!important}
@media (max-width:700px){.sky-banner__img{-webkit-mask-image:linear-gradient(to bottom,#000 75%,transparent);mask-image:linear-gradient(to bottom,#000 75%,transparent)}}

.sky-banner{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:6rem 1.25rem 3.5rem!important;line-height:1.4;background:radial-gradient(70% 90% at 50% 40%,#1E1810 0%,#1E1810 70%)!important}
.sky-banner__logo{display:block;width:min(40rem,86vw);height:auto;position:relative;z-index:1;filter:drop-shadow(0 0 1.5rem rgba(232,209,148,.25))}
.sky-banner__tag{position:relative;z-index:1;margin:.875rem 0 0;color:#E8D194;letter-spacing:.5em;font-size:.9375rem;font-family:"Noto Serif SC",serif;opacity:.9}
.sky-banner__stars{inset:0!important}
.sky-banner__glow{left:22%!important;top:4%!important;width:22%!important}
.sky-banner::after{height:22%}
@media (max-width:700px){.sky-banner{padding:5.25rem 1rem 2.25rem!important}.sky-banner__tag{font-size:.8125rem;letter-spacing:.35em}.sky-banner__glow{left:4%!important;width:40%!important}}

.site-logo{height:4rem!important;width:auto}
@media (max-width:640px){.site-logo{height:2.75rem!important}}


#lang-en,#lang-yue{display:none!important}
/* desktop: bottom nav becomes top menu */
@media (min-width:1024px){
 .bottom-nav{top:1.125rem;bottom:auto!important;left:50%;transform:translateX(-50%);width:auto!important;max-width:none!important;background:transparent!important;border:0!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;padding:0!important;gap:.375rem;z-index:120}
 .bottom-nav .nav-item{flex-direction:row!important;gap:.5rem;padding:.5rem 1rem!important;border-radius:62.4375rem;font-size:.9375rem!important;color:#D9B970;min-width:0!important;flex:none!important;background:transparent}
 .bottom-nav .nav-item svg{width:1.125rem;height:1.125rem}
 .bottom-nav .nav-item:hover{background:rgba(232,209,148,.10);color:#E8D194}
 .bottom-nav .nav-item.active{background:rgba(232,209,148,.14)!important;color:#C9A25A!important}
 body,.app-wrapper,.figure-page{padding-bottom:0!important}
 .site-footer{margin-bottom:0!important}
}
@media (min-width:1024px){.bottom-nav{position:absolute!important}}
@media (min-width:1024px) and (max-width:1199px){.bottom-nav{gap:2px}.bottom-nav .nav-item{padding:.5rem .375rem!important;font-size:.875rem!important;gap:.375rem}}

/* ==========================================================================
   PAUL · Ephesians 3 — Rembrandt, 1200×1460 portrait: face ≈ (0.62, 0.30)
   ========================================================================== */
@media (min-width: 900px) {
  .figure-page .p-hero--paul .p-hero__media {
    left: 30%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%);
    mask-image: linear-gradient(90deg, transparent, #000 20%);
  }
  .figure-page .p-hero--paul .p-hero__media img { object-position: 60% 22%; }
  .figure-page .p-hero--paul .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.6) 0%, rgba(30, 24, 16, 0) 18%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.85) 0%, rgba(30, 24, 16, 0) 30%);
  }
  .figure-page .p-hero--paul .p-hero__content { max-width: none; justify-content: flex-start; }
}
@media (max-width: 899px) {
  .figure-page .p-hero--paul .p-hero__media {
    top: clamp(5.5rem, 12svh, 7.5rem);
    height: clamp(28.75rem, 64svh, 43.75rem);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 9%);
    mask-image: linear-gradient(180deg, transparent, #000 9%);
  }
  .figure-page .p-hero--paul .p-hero__media::after {
    background: linear-gradient(0deg, var(--ink), rgba(30, 24, 16, .75) 16%, rgba(30, 24, 16, 0) 40%);
  }
  .figure-page .p-hero--paul .p-hero__media img { object-position: 62% 20%; }
}
/* 4:5 crop: x 600–1080, y 300–900 — his face, hand at his beard, down to the open book */
.figure-page .detail--paul img {
  top: -50%;          /* 300 / 600 */
  left: -125%;        /* 600 / 480 */
  width: 250%;        /* 1200 / 480 */
}

.footer-loc{font-size:.75rem;opacity:1;letter-spacing:.05em;margin-top:.375rem;}

.site-footer__nav a{font-size:1.125rem!important;opacity:1}
.site-footer__nav ul{gap:.375rem 1.25rem!important}

/* ==========================================================================
   SITE BACKGROUND — warm deep brown-black + ecclesiastical damask in the side gutters.
   images/pattern-sanctuary.svg (3KB tile: quatrefoil tracery + cross, olive branch,
   grapevine, dove). The pattern is a layer *behind* all content (z-index -1) spanning
   the whole page, so it can never cover the hero cross; it fades out toward the
   centre so the content column stays clean (clear from 50% ± 580px — the widest
   content column is 1156px). Desktop only (≥1024px).
   Gold at 18%: at 8% it was effectively ~3% in a 1440px gutter — invisible.
   ========================================================================== */
html {
  background-color: #1E1810;
  background-image: radial-gradient(130% 87.5rem at 50% 0, #1E1810 0%, #1E1810 45%, #1E1810 100%);
  background-repeat: no-repeat;
}
body,
body.home-page, body.figure-page, body.utility-page, body.bookmarks-page { background: transparent; }
body::before { display: none; }
@media (min-width: 1024px) {
  :root {
    /* gentle stepped fade that reaches right up to the content column, which stays clean */
    --pat-fade: #000 0, #000 calc(50% - 51.25rem), rgba(0,0,0,.75) calc(50% - 43.75rem), rgba(0,0,0,.35) calc(50% - 38.75rem), transparent calc(50% - 36.25rem),
                transparent calc(50% + 36.25rem), rgba(0,0,0,.35) calc(50% + 38.75rem), rgba(0,0,0,.75) calc(50% + 43.75rem), #000 calc(50% + 51.25rem), #000 100%;
  }
  body { position: relative; }   /* style.css already does this from 1024px */
  body::before,
  .figure-page .scripture::before,
  .figure-page .prayer::before {
    content: "";
    display: block;          /* style.css hides body::before on desktop; this layer replaces it */
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: url(../images/pattern-baroque.webp) center top / 20rem 20rem repeat;
    opacity: .28;
    -webkit-mask-image: linear-gradient(90deg, var(--pat-fade));
    mask-image: linear-gradient(90deg, var(--pat-fade));
  }
  /* figure-page colour bands (navy scripture, umber prayer) are full-width fills that hid the
     page pattern: they carry their own copy above their fill and below their content */
  .figure-page .scripture,
  .figure-page .prayer { position: relative; isolation: isolate; }
}
/* flat full-width fills that used to hide the gutters (heroes and the ivory story chapters keep theirs) */
.app-wrapper { background: transparent; }
.home-page .pray-section { background: radial-gradient(ellipse at 80% 0%, #C9A84C0d, transparent 65%); }
.figures, .cta { background: transparent; }
/* footers were opaque/85% and hid the pattern; keep them a darker band but let it show through */
.site-footer { background: rgba(30, 24, 16, .55); }
.bookmarks-page { background: radial-gradient(ellipse at top right, #C9A84C15, transparent 50%); }
.bookmarks-page #grid { background: rgba(30, 24, 16, .78); }
/* warm the homepage prayer cards to match the band (were navy) */
.home-page .pray-section .card { background: rgba(30, 24, 16, .82); }
.home-page .pray-section textarea { background: #1E1810; }

/* ===== Gutter pattern continuity: all pattern layers share ONE origin (the viewport), so tile
   phase never jumps at section boundaries; footer no longer dims or rules the gutters. ===== */
@media (min-width: 1024px) {
  body::before,
  .figure-page .scripture::before,
  .figure-page .prayer::before { background-attachment: fixed; background-position: center top; }
}
.site-footer,
.diary-page .site-footer,
.wall-page .site-footer,
.about-page .site-footer { background: transparent !important; border-top: 0 !important; }
/* page-level glows on .app-wrapper ended abruptly at the footer and brightened the pattern above it */
@media (min-width: 1024px) {
  .diary-page .app-wrapper, .wall-page .app-wrapper, .about-page .app-wrapper, body .app-wrapper { background: transparent !important; }
}

/* === figs7 pages === */
/* ==========================================================================
   Seven figure pages — 主祷文 / 但以理 / 摩西 / 尼希米 / 希西家 / 约伯 / 哈拿.
   They share Paul's hero: on desktop the painting hangs to the right and melts into the ink
   behind the title; on phones it sits under the breadcrumb with the title on its darkened foot.
   Everything for these pages (hero, detail crops, tiles, moods, footer columns) lives in this block.
   ========================================================================== */
.figure-page :is(.p-hero--lords-prayer, .p-hero--daniel, .p-hero--nehemiah, .p-hero--hezekiah) .p-hero__name { white-space: nowrap; }
@media (min-width: 900px) {
  .figure-page :is(.p-hero--lords-prayer, .p-hero--daniel, .p-hero--moses, .p-hero--nehemiah, .p-hero--hezekiah, .p-hero--job, .p-hero--hannah) .p-hero__media {
    left: 30%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%);
    mask-image: linear-gradient(90deg, transparent, #000 20%);
  }
  .figure-page :is(.p-hero--lords-prayer, .p-hero--daniel, .p-hero--moses, .p-hero--nehemiah, .p-hero--hezekiah, .p-hero--job, .p-hero--hannah) .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.6) 0%, rgba(30, 24, 16, 0) 18%),
      linear-gradient(90deg, rgba(30, 24, 16, 0.8) 0%, rgba(30, 24, 16, 0.45) 22%, rgba(30, 24, 16, 0) 42%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.85) 0%, rgba(30, 24, 16, 0) 30%);
  }
  .figure-page :is(.p-hero--lords-prayer, .p-hero--daniel, .p-hero--moses, .p-hero--nehemiah, .p-hero--hezekiah, .p-hero--job, .p-hero--hannah) .p-hero__content {
    max-width: none;
    justify-content: flex-start;
  }
  /* three-character names stay on one line inside the title column */
  .figure-page :is(.p-hero--lords-prayer, .p-hero--daniel, .p-hero--nehemiah, .p-hero--hezekiah) .p-hero__name {
    font-size: clamp(4.5rem, 9.5vw, 9.375rem);
  }
}
@media (max-width: 899px) {
  .figure-page :is(.p-hero--lords-prayer, .p-hero--daniel, .p-hero--moses, .p-hero--nehemiah, .p-hero--hezekiah, .p-hero--job, .p-hero--hannah) .p-hero__media {
    top: clamp(5.5rem, 12svh, 7.5rem);
    height: clamp(28.75rem, 64svh, 43.75rem);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 9%);
    mask-image: linear-gradient(180deg, transparent, #000 9%);
  }
  .figure-page :is(.p-hero--lords-prayer, .p-hero--daniel, .p-hero--moses, .p-hero--nehemiah, .p-hero--hezekiah, .p-hero--job, .p-hero--hannah) .p-hero__media::after {
    background: linear-gradient(0deg, var(--ink), rgba(30, 24, 16, .75) 16%, rgba(30, 24, 16, 0) 40%);
  }
  .figure-page :is(.p-hero--lords-prayer, .p-hero--daniel, .p-hero--nehemiah, .p-hero--hezekiah) .p-hero__name {
    font-size: clamp(4.5rem, 21vw, 9rem);
  }
}

/* Pale or crowded left edges (Tissot's white robes, de Backer's red gown): a deeper scrim under the title */
@media (min-width: 900px) {
  .figure-page :is(.p-hero--lords-prayer, .p-hero--hezekiah) .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.6) 0%, rgba(30, 24, 16, 0) 18%),
      linear-gradient(90deg, rgba(30, 24, 16, 0.94) 0%, rgba(30, 24, 16, 0.78) 20%, rgba(30, 24, 16, 0.3) 38%, rgba(30, 24, 16, 0) 52%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.85) 0%, rgba(30, 24, 16, 0) 30%);
  }
}

/* ---------- 主祷文 — Tissot, 1111×1480 portrait: Jesus standing ≈ (0.38, 0.14–0.60), disciples seated below ---------- */
@media (min-width: 900px) {
  .figure-page .p-hero--lords-prayer .p-hero__media img { object-position: 40% 28%; }
}
@media (max-width: 899px) {
  .figure-page .p-hero--lords-prayer .p-hero__media img { object-position: 35% 22%; }
}
/* 4:5 crop: x 180–780, y 180–930 — Jesus with open arms, the nearest listeners at his feet */
.figure-page .detail--lords-prayer img {
  top: -24%;          /* 180 / 750 */
  left: -30%;         /* 180 / 600 */
  width: 185.17%;     /* 1111 / 600 */
}

/* ---------- 但以理 — Rubens, landscape 1.478:1: Daniel ≈ x 0.60–0.80, face (0.70, 0.17) ---------- */
@media (min-width: 900px) {
  .figure-page .p-hero--daniel .p-hero__media img { object-position: 88% 50%; }
}
@media (max-width: 899px) {
  .figure-page .p-hero--daniel .p-hero__media img { object-position: 80% 50%; }
}
/* 4:5 crop (of 2000×1353): x 1010–1650, y 100–900 — upturned face, clasped hands, the red cloak */
.figure-page .detail--daniel img {
  top: -12.5%;        /* 100 / 800 */
  left: -157.81%;     /* 1010 / 640 */
  width: 312.5%;      /* 2000 / 640 */
}

/* ---------- 摩西 — Rembrandt, 1202×1500 portrait: tablets y 0.02–0.36, face ≈ (0.50, 0.45) ---------- */
@media (min-width: 900px) {
  .figure-page .p-hero--moses .p-hero__media img { object-position: 50% 4%; }
}
@media (max-width: 899px) {
  .figure-page .p-hero--moses .p-hero__media img { object-position: 50% 6%; }
}
/* 4:5 crop: x 200–1000, y 0–1000 — the raised tablets down to his face and beard */
.figure-page .detail--moses img {
  top: 0;
  left: -25%;         /* 200 / 800 */
  width: 150.25%;     /* 1202 / 800 */
}

/* ---------- 尼希米 — color painting 1672×941, figure kneeling right (≈0.73, 0.3) ---------- */
.figure-page .p-hero--nehemiah .p-hero__media img { object-position: 74% 30%; }

/* ---------- 希西家 — de Backer, square: Isaiah ≈ x 0.37–0.55, the king ≈ x 0.52–0.72, y 0.27–0.70 ---------- */
@media (min-width: 900px) {
  .figure-page .p-hero--hezekiah .p-hero__media img { object-position: 50% 25%; }
}
@media (max-width: 899px) {
  .figure-page .p-hero--hezekiah .p-hero__media img { object-position: 60% 40%; }
}
/* 4:5 crop (of 1200×1196): x 390–870, y 250–850 — the prophet's raised hand and the king turning toward him */
.figure-page .detail--hezekiah img {
  top: -41.67%;       /* 250 / 600 */
  left: -81.25%;      /* 390 / 480 */
  width: 250%;        /* 1200 / 480 */
}

/* ---------- 约伯 — Bonnat, 1324×1500: face ≈ (0.49, 0.23), open hands at y ≈ 0.75–0.85 ---------- */
@media (min-width: 900px) {
  .figure-page .p-hero--job .p-hero__media img { object-position: 50% 22%; }
}
@media (max-width: 899px) {
  .figure-page .p-hero--job .p-hero__media img { object-position: 50% 18%; }
}
/* 4:5 crop: x 300–1020, y 200–1100 — upturned face, the long beard, the thin chest */
.figure-page .detail--job img {
  top: -22.22%;       /* 200 / 900 */
  left: -41.67%;      /* 300 / 720 */
  width: 183.89%;     /* 1324 / 720 */
}

/* ---------- 哈拿 — Victors, 1237×1500: face ≈ (0.57, 0.30), clasped hands ≈ (0.53, 0.65) ---------- */
@media (min-width: 900px) {
  .figure-page .p-hero--hannah .p-hero__media img { object-position: 55% 40%; }
}
@media (max-width: 899px) {
  .figure-page .p-hero--hannah .p-hero__media img { object-position: 58% 40%; }
}
/* 4:5 crop: x 300–1020, y 180–1080 — the red hat, her face, down to the clasped hands */
.figure-page .detail--hannah img {
  top: -20%;          /* 180 / 900 */
  left: -41.67%;      /* 300 / 720 */
  width: 171.81%;     /* 1237 / 720 */
}

/* ---------- Scripture: a long passage, and a second, quieter quote under the first ---------- */
.figure-page .scripture__quote--passage { max-width: 28em; font-size: clamp(1.25rem, 2vw, 1.875rem); }
.figure-page .scripture__quote--second {
  max-width: 26em;
  margin-top: clamp(1.75rem, 3vw, 2.75rem);
  font-size: clamp(1.25rem, 2.1vw, 2rem);
}
/* closing sentences here are longer than the measure: let them wrap, without stranding a lone character */
.figure-page :is(.scripture__quote--passage, .scripture__quote--second, .scripture__quote--lords) .scripture__ending { white-space: normal; }
.figure-page :is(.scripture__quote--passage, .scripture__quote--second, .scripture__quote--lords) blockquote p { text-wrap: wrap; }
@media (max-width: 639px) {
  .figure-page .scripture__quote--passage,
  .figure-page .scripture__quote--second { font-size: 1.1875rem; }
}

/* ---------- Index gallery: thirteen live pages ---------- */
.home-page #figures #lords-prayer img { object-position: 38% 30%; }
.home-page #figures #daniel img       { object-position: 80% 30%; }
.home-page #figures #moses img        { object-position: 50% 12%; }
.home-page #figures #hezekiah img     { object-position: 58% 35%; }
.home-page #figures #job img          { object-position: 50% 15%; }
.home-page #figures #hannah img       { object-position: 55% 12%; }
.home-page #figures #nehemiah img     { object-position: 50% 50%; }
@media (min-width: 1000px) {
  .home-page #figures #daniel img { object-position: 72% 30%; }
}

/* Mood pills: ten of them — on the 3-column tablet grid the last one closes the block full-width */
@media (min-width: 600px) and (max-width: 899px) {
  .home-page #figures .moods li:last-child { grid-column: 1 / -1; }
}

/* ---------- Footer: thirteen figure links set in neat columns ---------- */
.site-footer__nav .footer-figs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: .5rem 1.75rem !important;
  justify-content: start;
}
.figure-page .site-footer__nav:has(.footer-figs) { max-width: none; }
@media (min-width: 640px) {
  .site-footer__nav .footer-figs { grid-template-columns: repeat(3, minmax(0, max-content)); }
}
@media (min-width: 1000px) {
  .site-footer__nav .footer-figs { grid-template-columns: repeat(4, minmax(0, max-content)); }
}
/* === /figs7 pages === */
/* === overflow fix: long scripture endings must wrap everywhere === */
.scripture__ending { white-space: normal !important; }
/* hannah: on very wide screens show the whole figure (face + clasped hands) */
@media (min-width: 1600px) {
  .figure-page .p-hero--hannah .p-hero__media img { object-fit: contain; object-position: 72% 50%; }
}

/* === more-prayers === */
.more-prayers {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-top: 1px solid rgba(201, 168, 76, 0.16);
}
.more-prayers__title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ivory);
  margin-bottom: 1.5rem;
}
.more-prayers__title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  margin-top: .875rem;
  background: #C9A84C;
}
.more-prayers__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .875rem;
}
.more-prayers__list a {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: center;
  height: 100%;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: .75rem;
  overflow: hidden;
  background: rgba(243, 234, 216, 0.03);
  color: var(--ivory);
  text-decoration: none;
  transition: border-color 0.3s, background-color 0.3s;
}
.more-prayers__list a:hover,
.more-prayers__list a:focus-visible {
  border-color: #C9A84C;
  background: rgba(201, 168, 76, 0.07);
}
.more-prayers__list img {
  grid-row: 1 / span 2;
  width: 7rem;
  height: 5.25rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 25%;
  background: var(--ink-2);
}
.more-prayers__name {
  align-self: end;
  padding-right: 1rem;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}
.more-prayers__note {
  align-self: start;
  padding-right: 1rem;
  margin-top: 2px;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ivory-soft);
}
@media (min-width: 768px) {
  .more-prayers__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .more-prayers__list a { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-items: start; }
  .more-prayers__list img { grid-row: auto; width: 100%; height: auto; }
  .more-prayers__name { align-self: start; padding: 1rem 1.125rem 0; font-size: 1.1875rem; }
  .more-prayers__note { padding: 0 1.125rem 1.125rem; margin-top: .25rem; }
}
/* footer brand: small Chinese name beside the say.church wordmark */
.wordmark__cn {
  display: inline-block;
  margin-left: 0.7em;
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ivory-soft);
  vertical-align: 0.2em;
}
/* === /more-prayers === */
/* === solomon closing band: praying king (left) + distant city (right); text on the dark wall between === */
.band--king .band__media img { object-position: 50% 45%; filter: none; }
.band--king .band__media::after {
  background:
    radial-gradient(34% 70% at 50% 50%, rgba(30, 24, 16, 0.55), rgba(30, 24, 16, 0) 100%),
    linear-gradient(180deg, var(--ink) 0%, rgba(30, 24, 16, 0.15) 18%, rgba(30, 24, 16, 0.15) 82%, var(--ink) 100%);
}
@media (max-width: 699px) {
  /* mobile: king fills the upper part, line sits low on the darkened bottom */
  .band--king { min-height: 32.5rem; align-items: end; padding-block: 0 3.5rem; }
  .band--king .band__media img { object-position: 20% 30%; }
  .band--king .band__media::after {
    background:
      linear-gradient(180deg, var(--ink) 0%, rgba(30, 24, 16, 0) 14%, rgba(30, 24, 16, 0) 42%, rgba(30, 24, 16, 0.88) 72%, var(--ink) 100%);
  }
  .band--king .band__line { font-size: clamp(1.875rem, 8.6vw, 2.5rem); }
}
@media (min-width: 700px) { .band--king .wrap { padding-left: calc(var(--pad, 1.5rem) + 8vw); } }
/* === figs17 pages (generated) === */
/* same hero as the figs7 pages: painting hangs right on desktop, sits under the breadcrumb on phones */
@media (min-width: 900px) {
  .figure-page .p-hero--new .p-hero__media { left: 30%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%); mask-image: linear-gradient(90deg, transparent, #000 20%); }
  .figure-page .p-hero--new .p-hero__media::after { background: linear-gradient(180deg, rgba(30,24,16,.6) 0%, rgba(30,24,16,0) 18%), linear-gradient(90deg, rgba(30,24,16,.85) 0%, rgba(30,24,16,.5) 22%, rgba(30,24,16,0) 42%), linear-gradient(0deg, rgba(30,24,16,.85) 0%, rgba(30,24,16,0) 30%); }
  .figure-page .p-hero--new .p-hero__content { max-width: none; justify-content: flex-start; }
}
@media (max-width: 899px) {
  .figure-page .p-hero--new .p-hero__media { top: clamp(5.5rem, 12svh, 7.5rem); height: clamp(28.75rem, 64svh, 43.75rem); -webkit-mask-image: linear-gradient(180deg, transparent, #000 9%); mask-image: linear-gradient(180deg, transparent, #000 9%); }
  .figure-page .p-hero--new .p-hero__media::after { background: linear-gradient(0deg, var(--ink), rgba(30,24,16,.75) 16%, rgba(30,24,16,0) 40%); }
}
.figure-page .p-hero--new .p-hero__name { white-space: nowrap; }
@media (min-width: 900px) { .figure-page .p-hero--joshua .p-hero__name, .figure-page .p-hero--samuel .p-hero__name, .figure-page .p-hero--jehoshaphat .p-hero__name, .figure-page .p-hero--ezra .p-hero__name, .figure-page .p-hero--jeremiah .p-hero__name, .figure-page .p-hero--habakkuk .p-hero__name, .figure-page .p-hero--jabez .p-hero__name, .figure-page .p-hero--mary .p-hero__name, .figure-page .p-hero--stephen .p-hero__name { font-size: clamp(4.5rem, 9.5vw, 9.375rem); } }
@media (max-width: 899px) { .figure-page .p-hero--joshua .p-hero__name, .figure-page .p-hero--samuel .p-hero__name, .figure-page .p-hero--jehoshaphat .p-hero__name, .figure-page .p-hero--ezra .p-hero__name, .figure-page .p-hero--jeremiah .p-hero__name, .figure-page .p-hero--habakkuk .p-hero__name, .figure-page .p-hero--jabez .p-hero__name, .figure-page .p-hero--mary .p-hero__name, .figure-page .p-hero--stephen .p-hero__name { font-size: clamp(4rem, 20vw, 9rem); } }
@media (min-width: 900px) { .figure-page .p-hero--zechariah .p-hero__name { font-size: clamp(4rem, 7.6vw, 7.75rem); } }
@media (max-width: 899px) { .figure-page .p-hero--zechariah .p-hero__name { font-size: clamp(3.5rem, 16vw, 7rem); } }
.figure-page .p-hero--isaac .p-hero__media img { object-position: 45% 30%; }
.figure-page .p-hero--jacob .p-hero__media img { object-position: 50% 35%; }
.figure-page .p-hero--joseph .p-hero__media img { object-position: 72% 40%; }
.figure-page .p-hero--joshua .p-hero__media img { object-position: 50% 50%; }
.figure-page .p-hero--gideon .p-hero__media img { object-position: 55% 35%; }
.figure-page .p-hero--samuel .p-hero__media img { object-position: 70% 40%; }
.figure-page .p-hero--jehoshaphat .p-hero__media img { object-position: 40% 30%; }
.figure-page .p-hero--ezra .p-hero__media img { object-position: 28% 30%; }
.figure-page .p-hero--jeremiah .p-hero__media img { object-position: 60% 45%; }
.figure-page .p-hero--habakkuk .p-hero__media img { object-position: 22% 30%; }
.figure-page .p-hero--jabez .p-hero__media img { object-position: 80% 30%; }
.figure-page .p-hero--samson .p-hero__media img { object-position: 72% 30%; }
.figure-page .p-hero--mary .p-hero__media img { object-position: 60% 20%; }
.figure-page .p-hero--zechariah .p-hero__media img { object-position: 10% 50%; }
.figure-page .p-hero--simeon .p-hero__media img { object-position: 60% 55%; }
.figure-page .p-hero--stephen .p-hero__media img { object-position: 50% 60%; }
.figure-page .p-hero--peter .p-hero__media img { object-position: 66% 35%; }
/* tall paintings: on desktop show the whole figure (no upscaling), hung to the right */
@media (min-width: 900px) {
  .figure-page .p-hero--gideon .p-hero__media { left: auto; right: 0; width: auto; aspect-ratio: 1084 / 1500; max-width: 62%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
}
/* detail figures of the new pages are their own 4:5 files */
.figure-page .detail--own img { position: absolute; inset: 0; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* === /figs17 pages === */
/* === figure gallery (30 prayers, filter by theme) === */
.fig-tabs { display: flex; flex-wrap: wrap; gap: .5rem .625rem; margin: 0 0 clamp(1.5rem, 3vw, 2.5rem); padding: 0; list-style: none; }
.fig-tab { font: 500 .9375rem/1 var(--sans); letter-spacing: .04em; color: var(--ivory-soft); background: transparent; border: 1px solid var(--line); border-radius: 62.4375rem; padding: .625rem 1.125rem; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.fig-tab:hover { border-color: var(--gold); color: var(--ivory); }
.fig-tab[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #3B200C; }
.fig-tab:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.fig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.75rem, 1.6vw, 1.375rem); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .fig-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .fig-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .fig-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.fig-card[hidden] { display: none; }
.fig-card a { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink-2); color: var(--ivory); text-decoration: none; border: 1px solid rgba(201,168,76,.16); }
.fig-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.fig-card--engraving img { filter: grayscale(1) sepia(.6) saturate(1.1) contrast(1.15) brightness(.85); }
.fig-card a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(30,24,16,.94) 0%, rgba(30,24,16,.7) 28%, rgba(30,24,16,0) 58%); }
.fig-card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(.75rem, 1.4vw, 1.25rem); }
.fig-card__ref { margin: 0 0 .25rem; font: 400 .75rem/1.4 var(--sans); letter-spacing: .08em; color: var(--gold-hi); }
.fig-card__name { margin: 0; font: 700 clamp(1.375rem, 2vw, 1.875rem)/1.15 var(--serif); color: var(--ivory); }
.fig-card__note { margin: .375rem 0 0; font: 400 clamp(.8125rem, 1vw, .9375rem)/1.45 var(--serif); color: var(--ivory-soft); }
.fig-card a:hover img, .fig-card a:focus-visible img { transform: scale(1.05); }
.fig-card a:hover { border-color: rgba(201,168,76,.5); }
.fig-card a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 639px) {
  .fig-tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .fig-tabs::-webkit-scrollbar { display: none; }
  .fig-tab { flex: 0 0 auto; padding: .5625rem .9375rem; font-size: .875rem; }
}
/* footer: figure links grouped by theme */
.footer-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.125rem 1.75rem; }
@media (min-width: 640px) { .footer-groups { grid-template-columns: repeat(4, minmax(0, max-content)); } }
@media (min-width: 1100px) { .footer-groups { grid-template-columns: repeat(7, minmax(0, max-content)); } }
.footer-group__title { margin: 0 0 .75rem; font: 700 1.25rem/1.5 var(--serif); letter-spacing: .08em; color: var(--gold); }
.footer-group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .625rem; }
.footer-group a, .footer-groups__more a { font-size: .8125rem; color: var(--ivory-mute); text-decoration: none; }
.footer-group a:hover, .footer-groups__more a:hover { color: var(--ivory); }
.footer-groups__more { margin: 1.125rem 0 0; font-size: .8125rem; color: var(--ivory-mute); }
.site-footer__nav:has(.footer-groups) { max-width: none; }
/* === /figure gallery === */
.figure-page .p-hero__sub .nowrap { display: inline-block; max-width: 100%; }

/* prayer text: indent + right amen */
.prayer__text p{text-indent:2em!important}
.prayer__text p.prayer__amen,.prayer__amen{text-align:right!important;text-indent:0!important}
/* === faq === */
.faq { padding-block: clamp(3rem, 6vw, 5.5rem); border-top: 1px solid rgba(201, 168, 76, 0.16); }
.faq__title { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: 700; line-height: 1.18; color: var(--ivory); margin: 0 0 clamp(1.25rem, 2.4vw, 2rem); }
.faq__intro { max-width: 46em; margin: 0 0 clamp(1.25rem, 2.4vw, 2rem); font-size: 1.0625rem; line-height: 1.9; color: rgba(243, 234, 216, 0.82); }
.faq__list { display: grid; gap: 0; max-width: 52em; }
.faq__item { padding: 1.125rem 0; border-bottom: 1px solid rgba(201, 168, 76, 0.14); }
.faq__item:first-child { border-top: 1px solid rgba(201, 168, 76, 0.14); }
.faq__q { margin: 0 0 .5rem; font-family: var(--serif); font-size: 1.125rem; font-weight: 700; line-height: 1.5; color: var(--gold, #c9a84c); }
.faq__a { margin: 0; font-size: 1rem; line-height: 1.85; color: rgba(243, 234, 216, 0.78); }
@media (max-width: 599px) { .faq__q { font-size: 1.0625rem; } .faq__a, .faq__intro { font-size: .9688rem; } }
/* === topic hubs === */
.figure-page .p-hero__name.p-hero__name--hub { font-size: clamp(3rem, 6.2vw, 6.5rem); white-space: normal; }
@media (max-width: 899px) { .figure-page .p-hero__name.p-hero__name--hub { font-size: clamp(2.5rem, 11.5vw, 4.5rem); } }
.hub-figs { list-style: none; margin: clamp(2rem, 4vw, 3.5rem) 0 0; padding: 0; display: grid; gap: 1.125rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 28.75rem), 1fr)); }
.hub-fig { display: grid; grid-template-columns: 7rem 1fr; gap: 1.125rem; align-items: start; padding: 1rem; border: 1px solid rgba(201, 168, 76, 0.18); border-radius: .375rem; background: rgba(255, 255, 255, 0.02); }
.hub-fig img { width: 7rem; height: 8.75rem; object-fit: cover; border-radius: .25rem; display: block; }
.hub-fig__name { margin: 0 0 .25rem; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.hub-fig__name a { color: var(--ivory); text-decoration: none; }
.hub-fig__ref { margin: 0 0 .5rem; font-size: .8125rem; letter-spacing: .08em; color: var(--gold, #c9a84c); }
.hub-fig__text { margin: 0 0 .625rem; font-size: .9688rem; line-height: 1.8; color: rgba(243, 234, 216, 0.78); }
.prayer--hub .prayer__text { max-width: 40em; }
.hub-more, .faq__related { margin: 1.5rem 0 0; font-size: .9375rem; line-height: 1.9; color: rgba(243, 234, 216, 0.7); }
.hub-more a, .faq__related a, .topic-links a { color: var(--gold, #c9a84c); }
.topic-links { display: flex; flex-wrap: wrap; gap: .625rem; margin: 0 0 clamp(1.75rem, 3vw, 2.5rem); padding: 0; list-style: none; }
.topic-links a { display: inline-block; padding: .5rem 1rem; border: 1px solid rgba(201, 168, 76, 0.35); border-radius: 62.4375rem; text-decoration: none; font-size: .9375rem; }
.footer-group__title a { color: inherit; text-decoration: none; }
.footer-group__title a:hover { text-decoration: underline; }
.site-footer__nav .footer-group__title a { font-size: 1.25rem !important; }
.home-page .faq--home { padding-bottom: 1.5rem; border-top: 0; }
.home-page .faq--home > .wrap { position: relative; }
.home-page .faq--home > .wrap::before { content: ""; position: absolute; top: calc(-1 * clamp(3rem, 6vw, 5.5rem)); left: var(--pad); right: var(--pad); height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--rule-gold) 14%, var(--rule-gold) 86%, transparent); }
.home-prayer-banner { margin-block: 0; padding-block: 0; }
.home-prayer-banner img { width: 100%; height: auto; margin-inline: auto; object-fit: contain; border: 1px solid rgba(201, 168, 76, .85); border-radius: 0; -webkit-mask-image: none; mask-image: none; }
.home-page .site-footer { padding-top: 2rem; }
@media (min-width: 1024px) { .site-footer__top .footer-groups { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 639px) { .site-footer__nav a { font-size: 1.0625rem !important; } .site-footer__nav .footer-group__title a, .footer-group__title { font-size: 1.1875rem !important; } }
@media (max-width: 599px) { .hub-fig { grid-template-columns: 5.25rem 1fr; gap: .875rem; padding: .75rem; } .hub-fig img { width: 5.25rem; height: 6.5625rem; } }
.faq__intro { max-width: 52em; text-wrap: wrap; } .faq__a, .hub-more, .faq__related { text-wrap: wrap; }
.faq__intro, .faq__list { max-width: 55rem; }
.faq__intro, .faq__list { max-width: none; }
.compact-footer .footer-loc { flex: 0 0 100%; margin: 0; }
/* === footer: two columns on desktop — brand left, links + © + music credit right === */
@media (min-width: 1024px) {
  .site-footer__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto auto; column-gap: 3rem; row-gap: 0; align-items: start; }
  .site-footer__top > div:first-child { display: contents; }
  .site-footer__top .wordmark { grid-column: 1; grid-row: 1 / 3; align-self: end; justify-self: start; }
  .site-footer__top .site-footer__line { grid-column: 1; grid-row: 3 / 5; align-self: start; margin-top: .75rem; }
  .site-footer__top .site-footer__nav { grid-column: 2; grid-row: 1 / 3; justify-self: end; margin: 0 0 1.125rem; max-width: none; }
  .site-footer__top .site-footer__nav ul, .site-footer__top .footer-groups__more { justify-content: end; text-align: right; }
  .site-footer__top .footer-loc { grid-column: 2; grid-row: 3; justify-self: end; text-align: right; margin: 0; }
  .site-footer__top:not(:has(.site-footer__nav)) .footer-loc { grid-row: 1 / 3; align-self: end; }
  .compact-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 3rem; row-gap: .375rem; align-items: center; }
  .compact-footer .wrap > .wordmark { grid-column: 1; grid-row: 1; }
  .compact-footer .wrap > .footer-loc { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; align-self: end; flex: none; }
}
/* === footer with eight independently titled themes === */
@media (min-width: 1024px) {
  .site-footer__top:has(.footer-groups) { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto auto; row-gap: 0; }
  .site-footer__top:has(.footer-groups) .site-footer__nav { display: contents; }
  .site-footer__top .footer-groups { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1.5rem 1.75rem; width: 100%; padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(243, 234, 216, 0.1); text-align: left; }
  .site-footer__top .footer-group ul { justify-content: start; text-align: left; }
  .site-footer__top:has(.footer-groups) .wordmark { grid-column: 1; grid-row: 2; align-self: end; }
  .site-footer__top:has(.footer-groups) .site-footer__line { grid-column: 1; grid-row: 3 / 5; align-self: start; }
  .site-footer__top:has(.footer-groups) .footer-groups__more { grid-column: 2; grid-row: 2; justify-self: end; text-align: right; align-self: end; margin: 0 0 .375rem; }
  .site-footer__top:has(.footer-groups) .footer-loc { grid-column: 2; grid-row: 3; }
}
@media (max-width: 1023px) { .site-footer__top .footer-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .site-footer__top:has(.footer-groups) { display: flex; flex-direction: column; gap: 1.75rem; } .site-footer__top:has(.footer-groups) .site-footer__nav { order: -1; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(243, 234, 216, 0.1); } }
/* footer: soft warm text instead of bright white */
.site-footer .wordmark span { color: var(--gold-hi, #E8D194); }
.site-footer .footer-group a:hover, .site-footer .footer-figs a:hover, .site-footer .footer-groups__more a:hover, .site-footer .wordmark:hover { color: rgba(232, 209, 148, .95); }
/* === Solomon v3 (repaint of the Dream of Solomon, 1672×941; figure + raised hand in the left half, dark clouds right): full-bleed, title on the right === */
.figure-page .p-hero--solomon .p-hero__media img { object-position: 30% 30%; }
@media (min-width: 900px) {
  .figure-page .p-hero--solomon .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30, 24, 16, 0.6) 0%, rgba(30, 24, 16, 0) 18%),
      linear-gradient(270deg, rgba(30, 24, 16, 0.85) 0%, rgba(30, 24, 16, 0.45) 30%, rgba(30, 24, 16, 0) 50%),
      linear-gradient(0deg, rgba(30, 24, 16, 0.8) 0%, rgba(30, 24, 16, 0) 30%);
  }
  .figure-page .p-hero--solomon .p-hero__content { justify-content: flex-end; }
}
@media (max-width: 899px) { .figure-page .p-hero--solomon .p-hero__media img { object-position: 22% 30%; } }
.home-page #figures #solomon img, #solomon img { object-position: 50% 40%; height: 100%; }
@media (min-width: 900px) { .figure-page .p-hero--solomon .p-hero__block { margin-right: -4vw; transform: translateX(4vw); } }
/* === Jacob v3 (repaint, 1672×941; figures x 35–99%): title on the dark left === */
.figure-page .p-hero--jacob .p-hero__media img { object-position: 100% 0%; }
@media (min-width: 900px) {
  .figure-page .p-hero--jacob .p-hero__content { justify-content: flex-start; max-width: none; }
  .figure-page .p-hero--jacob .p-hero__block { width: min(34%, 32.5rem); }
  .figure-page .p-hero--jacob .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30,24,16,.35) 0%, rgba(30,24,16,0) 6%),
      linear-gradient(90deg, rgba(30,24,16,.8) 0%, rgba(30,24,16,.35) 26%, rgba(30,24,16,0) 40%),
      linear-gradient(0deg, rgba(30,24,16,.8) 0%, rgba(30,24,16,0) 30%);
  }
}
@media (max-width: 899px) { .figure-page .p-hero--jacob .p-hero__media img { object-position: 80% 35%; } }
/* === footer: every variant in the muted warm tone (gold dot keeps its gold) === */
html body footer.site-footer :is(.wordmark, .wordmark__cn, p, a, small) { color: #A07C30 !important; opacity: 1; }
html body footer.site-footer .wordmark > span { color: var(--gold-hi, #E8D194) !important; }
html body footer.site-footer a:hover { color: #C9A84C !important; }
@media (min-width: 900px) { .figure-page .p-hero--jacob .p-hero__media { top: 4rem; } }
/* === Paul v3 (repaint, 1672×941; Paul seated right ≈ 55–95%): full-width hero, title on the dark wall left === */
@media (min-width: 900px) {
  .figure-page .p-hero--paul .p-hero__media img { object-position: 100% 30%; }
  .figure-page .p-hero--paul .p-hero__block { width: min(34%, 32.5rem); }
  .figure-page .p-hero--paul .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30,24,16,.45) 0%, rgba(30,24,16,0) 10%),
      linear-gradient(0deg, rgba(30,24,16,.85) 0%, rgba(30,24,16,0) 30%);
  }
}
@media (max-width: 899px) { .figure-page .p-hero--paul .p-hero__media img { object-position: 92% 30%; } }
.home-page #figures #paul img, #paul img { object-position: 50% 30%; }
/* === Samuel v3 (repaint, 1672×941; figures x 36–100%, heads ≈ 25–30%): image starts under the nav, title on the dark left === */
.figure-page .p-hero--samuel .p-hero__media img { object-position: 100% 20%; }
@media (min-width: 900px) {
  .figure-page .p-hero--samuel .p-hero__media { top: 4rem; left: 34%; }
  .figure-page .p-hero--samuel .p-hero__block { width: min(32%, 31.25rem); }
  .figure-page .p-hero--samuel .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30,24,16,.35) 0%, rgba(30,24,16,0) 6%),
      linear-gradient(90deg, rgba(30,24,16,.7) 0%, rgba(30,24,16,0) 22%),
      linear-gradient(0deg, rgba(30,24,16,.85) 0%, rgba(30,24,16,0) 30%);
  }
}
@media (max-width: 899px) { .figure-page .p-hero--samuel .p-hero__media img { object-position: 82% 20%; } }
.home-page #figures #samuel img, #samuel img { object-position: 50% 30%; }
/* === start these heroes under the nav bar so no head touches it (desktop) === */
@media (min-width: 900px) {
  .figure-page :is(.p-hero--mary, .p-hero--samson, .p-hero--stephen, .p-hero--zechariah) .p-hero__media { top: 4rem; }
  .figure-page :is(.p-hero--mary, .p-hero--samson, .p-hero--stephen, .p-hero--zechariah) .p-hero__media::after {
    background:
      linear-gradient(180deg, rgba(30,24,16,.35) 0%, rgba(30,24,16,0) 6%),
      linear-gradient(90deg, rgba(30,24,16,.85) 0%, rgba(30,24,16,.5) 22%, rgba(30,24,16,0) 42%),
      linear-gradient(0deg, rgba(30,24,16,.85) 0%, rgba(30,24,16,0) 30%);
  }
  .figure-page .p-hero--mary .p-hero__media img { object-position: 60% 0%; }
  .figure-page .p-hero--stephen .p-hero__media img { object-position: 50% 35%; }
}
/* Mary + Stephen: picture starts further right so the title sits on plain dark */
@media (min-width: 900px) {
  .figure-page :is(.p-hero--mary, .p-hero--stephen) .p-hero__media { left: 40%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%); mask-image: linear-gradient(90deg, transparent, #000 14%); }
  .figure-page :is(.p-hero--mary, .p-hero--stephen) .p-hero__block { width: min(36%, 35rem); }
}
@media (min-width: 900px) {
  .figure-page :is(.p-hero--mary, .p-hero--stephen) .p-hero__media { left: max(40%, 42.5rem); }
}
/* topic hubs: center the prayer block */
.prayer--hub .wrap > .reveal { max-width: 45rem; margin-inline: auto; text-align: center; }
.prayer--hub .prayer__lead { margin-inline: auto; }
.prayer--hub .prayer__text { max-width: none; text-align: left; }
.prayer--hub .prayer__text p.prayer__amen { text-align: right !important; }
.prayer--hub .wrap > .reveal > .eyebrow { justify-content: center; display: flex; }
/* topic hubs: hero title on one line on desktop, sized to the dark column */
@media (min-width: 900px) {
  .figure-page .p-hero__name.p-hero__name--hub { white-space: nowrap; font-size: clamp(2.75rem, 4.6vw, 5.75rem); letter-spacing: 0.04em; }
}
/* thanksgiving hub: painting on the right, title on the dark left */
@media (min-width: 900px) {
  .figure-page .p-hero--hub-thanks .p-hero__media { left: auto; right: 0; width: 55%; }
  .figure-page .p-hero--hub-thanks .p-hero__media img { object-fit: cover; object-position: 50% 30%; }
  .figure-page .p-hero--hub-thanks .p-hero__media::after {
    background: linear-gradient(180deg, rgba(30,24,16,.75) 0%, rgba(30,24,16,0) 20%), linear-gradient(270deg, rgba(30,24,16,0) 62%, rgba(30,24,16,.85) 90%, #1E1810 100%), linear-gradient(0deg, rgba(30,24,16,.8) 0%, rgba(30,24,16,0) 30%);
  }
  .figure-page .p-hero--hub-thanks .p-hero__content { justify-content: flex-start; }
}
/* flipped heroes: painting right, title on the dark left */
@media (min-width: 900px) {
  .figure-page .p-hero.p-hero--flip .p-hero__media { left: auto; right: 0; width: 56%; }
  .figure-page .p-hero.p-hero--flip .p-hero__media img { object-fit: cover; object-position: 50% 25%; }
  .figure-page .p-hero.p-hero--flip .p-hero__media::after {
    background: linear-gradient(180deg, rgba(30,24,16,.75) 0%, rgba(30,24,16,0) 20%), linear-gradient(270deg, rgba(30,24,16,0) 60%, rgba(30,24,16,.85) 90%, #1E1810 100%), linear-gradient(0deg, rgba(30,24,16,.8) 0%, rgba(30,24,16,0) 30%);
  }
  .figure-page .p-hero.p-hero--flip .p-hero__content { justify-content: flex-start; }
}
/* home hero v2: keep text clear of the praying hands */
@media (min-width: 900px) {
  .home-page .hero__media { left: 40%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
  .home-page .hero__media img { object-position: 55% 35%; }
}
@media (max-width: 899px) {
  .home-page .hero { min-height: 0; }
  .home-page .hero__media { inset: 0 0 auto 0; height: min(134vw, 66svh); }
  .home-page .hero__media img { object-position: 50% 30%; }
  .home-page .hero__media::after { background: linear-gradient(180deg,#1E181080,transparent 22%),linear-gradient(0deg,#1E1810 0%,#1E1810cc 14%,transparent 40%); }
  .home-page .hero__content { padding-top: calc(min(134vw, 66svh) - 1.5rem); }
}

/* Painting light: percentages belong to the full rendered image, before cropping. */
.home-page .hero__media { z-index: 0; overflow: hidden; isolation: isolate; }
.home-page .hero__content { position: relative; z-index: 1; }
.home-page .hero__media img { display: block; animation: none; transform: none; }
.home-page .hero__media::after { z-index: 2; pointer-events: none; }
.hero__glow {
  position: absolute;
  left: var(--image-left, 0px);
  top: var(--image-top, 0px);
  width: var(--image-width, 100%);
  height: var(--image-height, 100%);
  /* Above the painting and its gradients, inside the media below the text. */
  z-index: 3;
  pointer-events: none;
  visibility: hidden;
}
.hero--anim-ready .hero__glow { visibility: visible; }
.hero__glow > span { position: absolute; z-index: 0; mix-blend-mode: screen; }
/* Restore the foreground hair above the light, in the same image coordinates. */
.home-page .hero__glow > .hero__head {
  position: absolute;
  left: 31.9521%;
  top: 25.1381%;
  width: 32.5046%;
  height: 21.8232%;
  z-index: 2;
  object-fit: fill;
  animation: none;
  transform: none;
}

.hero__glow > .hero__halo {
  z-index: 1;
  left: 48.5%;
  top: 28%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 209, 148, .95), rgba(201, 168, 76, .65) 36%, rgba(201, 168, 76, .22) 58%, transparent 72%);
  transform: translate(-50%, -50%) scale(.94);
  opacity: .15;
}
.hero__beam {
  left: 32%;
  top: 14.5%;
  width: 14%;
  height: 35%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(232, 209, 148, .9), rgba(232, 209, 148, .5) 40%, rgba(201, 168, 76, .15) 58%, transparent 72%);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%) rotate(-32deg);
  opacity: .08;
}
.hero__mote, .hero__star { left: var(--x); top: var(--y); }
.hero__mote {
  width: var(--size, .25rem);
  height: var(--size, .25rem);
  border-radius: 50%;
  background: rgb(232, 209, 148);
  box-shadow: 0 0 .3125rem 1px rgba(232, 209, 148, .7), 0 0 .625rem rgba(232, 209, 148, .35);
  opacity: .4;
}
.hero__star {
  width: var(--size, .75rem);
  height: var(--size, .75rem);
  filter: drop-shadow(0 0 .1875rem rgba(232, 209, 148, .85));
  transform: translate(-50%, -50%) scale(.6);
  opacity: .1;
}
.hero__star::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(243, 234, 216);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
/* The left sky falls under the desktop title fade. */
@media (min-width: 900px) {
  .hero__star--left { display: none; }
}
.hero--anim-ready .hero__halo { animation: hero-halo 8s ease-in-out infinite; }
.hero--anim-ready .hero__beam { animation: hero-beam 10s ease-in-out infinite; }
.hero--anim-ready .hero__mote { animation: hero-mote var(--duration, 16s) ease-in-out var(--delay, 0s) infinite alternate; }
.hero--anim-ready .hero__star { animation: hero-star var(--duration, 4s) ease-in-out var(--delay, 0s) infinite; }
.hero .hero__glow > span { animation-play-state: paused; }
.hero--anim-visible.hero--anim-ready .hero__glow > span { animation-play-state: running; }
@keyframes hero-halo {
  0%, 100% { opacity: .15; transform: translate(-50%, -50%) scale(.94); }
  50% { opacity: .45; transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes hero-beam {
  0%, 100% { opacity: .08; }
  50% { opacity: .3; }
}
@keyframes hero-mote {
  from { opacity: .4; transform: translate(-2px, .3125rem); }
  to { opacity: .9; transform: translate(2px, -.5rem); }
}
@keyframes hero-star {
  0%, 100% { opacity: .1; transform: translate(-50%, -50%) scale(.6) rotate(-8deg); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero .hero__glow { display: none; }
  .hero .hero__glow > span { animation: none; }
}

/* Section sky: above the background/painting, below the content. */
.hero__sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  visibility: hidden;
}
.hero--anim-ready .hero__sky { visibility: visible; }
.hero__sky-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  opacity: .08;
  transform: translate(-50%, -50%) scale(.85);
}
.hero__sky-star:not(.hero__star) {
  border-radius: 50%;
  background: rgb(243, 234, 216);
  box-shadow: 0 0 .25rem 1px rgba(232, 209, 148, .3);
}
.hero--anim-ready .hero__sky > .hero__sky-star {
  animation: hero-sky-twinkle var(--duration) ease-in-out var(--delay) infinite;
  animation-play-state: paused;
}
.hero--anim-ready.hero--anim-visible .hero__sky > .hero__sky-star {
  animation-play-state: running;
}
@keyframes hero-sky-twinkle {
  0%, 100% { opacity: .08; transform: translate(-50%, -50%) scale(.85); }
  50% { opacity: var(--peak); transform: translate(-50%, -50%) scale(1.05); }
}
/* The painting stacks above the copy at tablet widths; keep the sky sparse too. */
@media (max-width: 899px) {
  .hero__sky-star { left: var(--mobile-x); top: var(--mobile-y); }
  .hero__sky-star:nth-child(n + 7) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .hero__sky { display: none; }
  .hero .hero__sky > .hero__sky-star { animation: none; }
}

/* Public prayer engagement */
.engage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 1.25rem 0 1.5rem; }
.engage-btn { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; min-height: 2.75rem; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: .5rem; background: transparent; color: var(--gold); font: inherit; font-size: .875rem; line-height: 1.6; cursor: pointer; text-decoration: none; }
.engage-btn:hover, .engage-btn[aria-pressed="true"] { background: rgba(201,168,76,.12); color: var(--gold-hi); }
.engage-btn:disabled { opacity: .6; cursor: wait; }
.engage-btn:focus-visible, .share-sheet :focus-visible { outline: 2px solid var(--gold-hi); outline-offset: .1875rem; }
.engage-status { flex-basis: 100%; color: var(--ivory-mute); font-size: .8125rem; }
.engage-status:empty { display: none; }
.engage-dialog { width: min(33.75rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.5rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--ink-2); color: var(--gold); }
.engage-dialog::backdrop { background: rgba(0,0,0,.8); }
.engage-dialog__close { display: flex; margin-left: auto; margin-bottom: .75rem; }
.engage-card-preview { display: block; width: 100%; max-height: 65dvh; object-fit: contain; }
.engage-qr { width: 17rem; max-width: 100%; padding: 1rem; margin: 1.25rem auto; background: #fff; }
.engage-qr img, .engage-qr canvas { max-width: 100%; }
.wall-card.is-share-target { outline: 2px solid var(--gold); outline-offset: .25rem; scroll-margin-top: 6.25rem; }
.wall-card__foot { flex-wrap: wrap; }
.wall-card__foot .engage-btn { font-size: .75rem; padding: .375rem .625rem; }
.wall-card__foot .engage-btn .ic { width: 1rem; height: 1rem; }
.hero__actions .engage-btn { margin-left: .75rem; }

/* Sharing action placement; the shared metallic treatment is defined below. */
.p-hero__actions { margin-top: 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.hero__actions .engage-btn { margin-left: 0; }
[data-page-engage] { gap: .75rem; margin-top: 1.5rem; }
[data-page-engage] [data-scripture-card] { min-height: 3rem; padding: .6875rem 1.25rem; font-size: 1rem; font-weight: 600; border-color: var(--gold); }
.share-float { display: none; }
@media (max-width: 768px) {
  .share-float {
    display: inline-flex; position: fixed; z-index: 130;
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: max(var(--share-nav-clearance, 6.25rem), calc(5.5rem + env(safe-area-inset-bottom, 0px)));
    min-height: 3.5rem; padding: .75rem 1.125rem; border-radius: 62.4375rem; font-size: 1.125rem;
    box-shadow: 0 .25rem 1.125rem rgba(30,24,16,.35);
  }
  .wall-card .wall-card__foot { gap: .5rem; }
  .wall-card__foot .wall-who { flex-basis: 100%; }
  .wall-card__foot .engage-btn, .wall-card__foot .wall-count, .wall-card__foot .wall-pray { white-space: nowrap; }
  [data-page-engage] .share-btn, [data-page-engage] [data-scripture-card] { flex: 1 1 auto; }
  [data-page-engage] [data-page-amen] { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .share-btn { transition: none; }
}

/* Shared bottom sheet, on every screen size. */
.share-sheet { position: fixed; inset: auto 0 0; margin: 0 auto; box-sizing: border-box; width: 100%; max-width: 30rem; max-height: calc(100dvh - 1.5rem); overflow-y: auto; padding: 1.5rem 0 0; border: 1px solid rgba(232,209,148,.2); border-top-color: #E8D194; border-bottom: 0; border-radius: 1.375rem 1.375rem 0 0; background: linear-gradient(180deg,#2C1A0E 0%,#1E1810 40%); background-color: #1E1810; color: #F3EAD8; box-shadow: 0 -.75rem 3rem rgba(30,24,16,.35); }
.share-sheet[open] { animation: share-sheet-in 240ms cubic-bezier(.16,1,.3,1); }
.share-sheet::backdrop { background: rgba(30,24,16,.72); }
.share-sheet h2 { margin: 0 1.5rem 1.375rem; text-align: center; font: inherit; font-size: 1.125rem; font-weight: 600; color: #F3EAD8; }
.share-sheet__row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 1.375rem 0; padding: .1875rem .75rem 1.25rem; }
.share-sheet__item { grid-column: span 2; min-width: 0; display: flex; align-items: center; flex-direction: column; gap: .625rem; border: 0; padding: 0; background: transparent; color: #E8D194; font: inherit; font-size: .6875rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.share-sheet__icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; box-sizing: border-box; border: 2px solid #E8D194; border-radius: 50%; color: #E8D194; background: #1E1810; box-shadow: 0 0 .625rem rgba(232,209,148,.28); }
.share-sheet__icon svg { width: 1.75rem; height: 1.75rem; }
.share-sheet__wordmark { font-size: .75rem; font-weight: 700; }
.share-sheet__letter { font-size: 1.625rem; font-weight: 600; }
.share-sheet__item:hover .share-sheet__icon, .share-sheet__item:focus-visible .share-sheet__icon { border-color: #E8D194; background: #2C1A0E; box-shadow: 0 0 .625rem rgba(232,209,148,.42); }
.share-sheet__panel { padding: .5rem 1.5rem 1.25rem; text-align: center; }
.share-sheet__panel p { color: #E8D194; font-size: .8125rem; line-height: 1.7; }
.share-sheet__panel .engage-qr { margin: 1rem auto; width: 12.5rem; }
.share-sheet__panel .engage-qr img, .share-sheet__panel .engage-qr canvas { max-width: 100%; }
.share-sheet__panel textarea { width: 100%; color: #E8D194; background: #1E1810; }
.share-sheet__panel .engage-btn { color: #E8D194; border-color: #E8D194; background: #1E1810; }
.share-sheet__toast { margin: 0; min-height: 1.5rem; padding: 0 1.5rem .75rem; text-align: center; color: #E8D194; font-size: .8125rem; }
.share-sheet__cancel { width: 100%; min-height: 3.5rem; padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid rgba(232,209,148,.35); color: #E8D194; background: #1E1810; font: inherit; font-size: .9375rem; cursor: pointer; }
.share-sheet__cancel:hover { background: #2C1A0E; }
.share-sheet :focus-visible { outline: 2px solid #E8D194; outline-offset: .1875rem; }
@keyframes share-sheet-in { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .share-sheet[open] { animation: none; } }

/* Framed gold actions. At DPR 1, 128px assets render at half size.
   WCAG contrast: #2C1A0E on #C9A84C = 8.35:1. */
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save) {
  --gold-button-height: 4rem;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; height: var(--gold-button-height); min-height: 0;
  min-width: 0; max-width: 100%; gap: .75rem;
  padding: 0 calc(var(--gold-button-height) * .62);
  border: 0; border-radius: 62.4375rem;
  background: url(/images/ui/btn-cap-l3.webp) left center / auto 100% no-repeat,
    url(/images/ui/btn-cap-r3.webp) right center / auto 100% no-repeat,
    url(/images/ui/btn-mid2.webp) center / 100% 100% no-repeat;
  color: #3B200C; font-family: var(--serif); font-size: 1.1875rem;
  font-weight: 700; line-height: 1; letter-spacing: .025em;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(232,209,148,.65), 0 -1px 0 rgba(44,26,14,.35);
  box-shadow: 0 0 1.125rem rgba(201,168,76,.25), 0 .25rem .5rem rgba(44,26,14,.3);
  opacity: 1; filter: none; cursor: pointer;
  transition: filter .4s ease, transform .2s ease;
}
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save)::before { content: none; }
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save)::after {
  content: ""; position: absolute; z-index: -1; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(243,234,216,.5) 50%, transparent 70%);
  transform: translateX(-140%);
}
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save):is(:hover, :focus-visible):not(:disabled) { filter: brightness(1.06); }
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save):focus-visible { outline: 2px solid #E8D194; outline-offset: .25rem; }
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save):active:not(:disabled) { transform: translateY(1px); }
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save):disabled { opacity: .6; cursor: not-allowed; }
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save) svg, :is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save) .arrow {
  color: #3B200C; flex-shrink: 0;
  filter: drop-shadow(0 1px 0 rgba(232,209,148,.6));
}
.share-classic > span { display: inline-flex; align-items: center; gap: .75rem; background: none; color: inherit; }
.share-classic > span::before {
  content: ""; width: 2px; height: calc(var(--gold-button-height) * .55); flex: 0 0 2px;
  background: linear-gradient(to right, #2C1A0E 0 1px, rgba(232,209,148,.65) 1px 2px);
}
.share-classic .share-icon, #shareBtn.share-classic svg,
.wall-card__foot .share-classic .share-icon {
  width: 1.625rem; height: 1.625rem; flex: 0 0 auto; fill: #2C1A0E; stroke: none;
  filter: drop-shadow(0 1px 0 rgba(232,209,148,.6));
}
.share-classic:disabled { opacity: 1; cursor: wait; }
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save):is(.btn-sm, [class*="--sm"], .share-classic--card, .share-classic--footer, .btn-save-reminder, .dy-hint__btn,
  :where(.wall-card, .dy-card, .p-card, .card, footer, .site-footer) *) {
  --gold-button-height: 2.875rem; font-size: 1rem; gap: .5rem;
}
.share-classic:is([class*="--sm"], [class*="--card"], [class*="--footer"]) > span { gap: .5rem; }
.share-classic:is([class*="--sm"], [class*="--card"], [class*="--footer"]) .share-icon,
.wall-card__foot .share-classic .share-icon { width: 1.25rem; height: 1.25rem; }
:is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save):is(.share-float, .share-classic--floating) {
  --gold-button-height: 3.5rem; width: 3.5rem; height: 3.5rem; padding: 0; gap: 0;
  background: radial-gradient(circle, #E8D194 0%, #C9A84C 55%, #A07C30 100%);
  box-shadow: inset 0 0 0 .1875rem #C9A84C, inset 0 0 0 .3125rem #74561C,
    0 0 1.125rem rgba(201,168,76,.25), 0 .25rem .5rem rgba(44,26,14,.3);
}
.share-classic:is(.share-float, .share-classic--floating) > span { display: none; }
@media (max-width: 768px) {
  :is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save):is(.share-float, .share-classic--floating) { position: fixed; }
}
@media (max-width: 480px) {
  :is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save) { font-size: 1rem; letter-spacing: 0; gap: .5rem; }
  /* Long figure CTAs need slightly tighter in-rim padding on narrow screens. */
  .figure-page .btn-primary.figure-cta { padding-inline: 2rem; gap: .25rem; }
}
.reminder-btn-wrap { width: 7.75rem; height: 2.875rem; align-self: center; }
/* Dim example content individually so share actions retain full contrast. */
.dy-card.dy-card--sample:has(.share-classic) { opacity: 1; filter: none; }
.dy-card--sample:has(.share-classic) .dy-card__thumb,
.dy-card--sample:has(.share-classic) .dy-card__body > :not(.dy-card__share) { opacity: .72; filter: saturate(.8); }
.dy-card__share { opacity: 1; filter: none; }
@media (prefers-reduced-motion: no-preference) {
  :is(button.share-classic, :is(.btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save)):is(:hover, :focus-visible):not(:disabled)::after { animation: gold-cta-shimmer 1.8s ease-out; }
}
@keyframes gold-cta-shimmer { to { transform: translateX(140%); } }
@media (prefers-reduced-motion: reduce) {
  :is(button.share-classic, :is(.btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save)), :is(.btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save) .arrow { transition: none; }
  :is(button.share-classic, :is(.btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save))::after { animation: none; }
  :is(button.share-classic, :is(.btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save)):active, :is(.btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save):hover .arrow { transform: none; }
}
@media (min-width: 900px) {
  /* Match every section's .wrap, overriding earlier full-width hero variants. */
  .figure-page .p-hero .p-hero__content {
    max-width: var(--maxw);
    margin-block: auto;
    padding-block: 3.5rem;
    align-items: center;
  }
  .figure-page .p-hero .p-hero__block { margin-right: 0; transform: none; }
  .figure-page .p-hero--solomon:not(.p-hero--flip) .p-hero__block { text-align: right; }
  .figure-page .p-hero .p-hero__sub .nowrap { display: inline; white-space: normal; }
}
@media (min-width: 1280px) {
  .figure-page .p-hero .p-hero__name { font-size: clamp(6.75rem, 10vw, 10.25rem);
  }
  .figure-page .p-hero.p-hero--moses .p-hero__name { font-size: clamp(12.5rem, 11vw, 13.5rem); }
  .figure-page .p-hero .p-hero__name--hub { font-size: clamp(3.25rem, 4.8vw, 5.875rem); }
  .figure-page .p-hero .p-hero__sub { font-size: clamp(1.625rem, 1.8vw, 2.1875rem); }
  .figure-page .p-hero.p-hero--gethsemane .p-hero__name { font-size: clamp(4.5rem, 5.8vw, 7rem); }
  .figure-page .p-hero.p-hero--zechariah .p-hero__name { font-size: clamp(5.5rem, 7.8vw, 7.75rem); }
}
@media (min-width: 769px) { :is(.share-classic, .btn-gold, .btn-primary, .btn-save-reminder, .dy-save, .dy-hint__btn, .ab-btn--gold, .bookmarks-page #btn-login, .bookmarks-page .modal .btn-save):is(.share-float, .share-classic--floating) { display: none; } }

@media (min-width: 1280px) {
  .figure-page .p-hero.p-hero--abraham .p-hero__name { font-size: clamp(6rem, 8vw, 7.75rem); }
  .figure-page .p-hero.p-hero--samuel .p-hero__name { font-size: clamp(6.25rem, 7vw, 7.25rem); }
  .figure-page .p-hero:is(.p-hero--mary, .p-hero--stephen) .p-hero__name { font-size: clamp(6.75rem, 8vw, 8.125rem); }
}
@media (min-width: 1600px) {
  .figure-page .p-hero--moses .p-hero__sub { max-width: 100%; }
}

/* Old Safari/WebView modal surface; vh precedes dvh for older engines. */
.share-fallback-surface { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: rgba(30,24,16,.8); }
.share-modal-fallback { display: block; z-index: 10001; max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); }
.engage-dialog.share-modal-fallback { position: relative; inset: auto; margin: auto; box-sizing: border-box; }
.share-sheet.share-modal-fallback { position: absolute; inset: auto 0 0; margin: 0 auto; }
.share-inapp { position: fixed; inset: 0; z-index: 10000; box-sizing: border-box; padding: 11.875rem 1.5rem 2rem; overflow: auto; color: #E8D194; background: rgba(0,0,0,.9); text-align: center; }
.share-inapp__arrow { position: absolute; top: calc(.75rem + env(safe-area-inset-top)); right: 1rem; width: 10rem; height: 10rem; }
.share-inapp p { font-size: 1.3125rem; line-height: 1.7; }
.share-inapp small { display: block; margin: 1.5rem 0 1rem; font-size: .875rem; }
.share-inapp .engage-actions { justify-content: center; flex-wrap: wrap; }
.share-global-toast { position: fixed; z-index: 2147483647; bottom: calc(5rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 3rem); box-sizing: border-box; padding: .75rem 1.125rem; border: 1px solid #E8D194; border-radius: .5rem; background: #1E1810; color: #E8D194; text-align: center; font-size: .875rem; pointer-events: none; }

/* Keep the painting's shading over the light and head cutout so the cutout matches the painting exactly. */
.home-page .hero__media::after { z-index: 4; pointer-events: none; }

/* v150: clearer halo and beam, brighter left stars. */
.hero__glow > .hero__halo { width: 19%; }
@keyframes hero-halo {
  0%, 100% { opacity: .35; transform: translate(-50%, -50%) scale(.94); }
  50% { opacity: .75; transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes hero-beam {
  0%, 100% { opacity: .2; }
  50% { opacity: .5; }
}
@media (min-width: 900px) { .hero__star--left { display: block; } }
.hero__star--left { width: calc(var(--size, .75rem) * 1.7); height: calc(var(--size, .75rem) * 1.7); filter: drop-shadow(0 0 .25rem rgba(232, 209, 148, .95)) drop-shadow(0 0 .5625rem rgba(232, 209, 148, .5)); }
.hero__sky-star { width: calc(var(--size) * 1.8); height: calc(var(--size) * 1.8); }
.hero__sky-star.hero__star { width: calc(var(--size) * 1.8); height: calc(var(--size) * 1.8); min-width: .6875rem; min-height: .6875rem; filter: drop-shadow(0 0 .25rem rgba(232, 209, 148, .95)) drop-shadow(0 0 .625rem rgba(232, 209, 148, .5)); }
.hero__sky-star:not(.hero__star) { box-shadow: 0 0 .375rem 2px rgba(232, 209, 148, .6), 0 0 .75rem rgba(232, 209, 148, .3); }
@keyframes hero-sky-twinkle {
  0%, 100% { opacity: .2; transform: translate(-50%, -50%) scale(.8); }
  50% { opacity: .95; transform: translate(-50%, -50%) scale(1.1); }
}

/* v152: individual light rays fanning from the painted light source toward the head. */
.hero__glow > .hero__beam { display: none; }
.hero__glow > .hero__ray {
  left: 24%;
  top: 2.5%;
  width: var(--w);
  height: var(--len);
  transform-origin: 50% 0;
  transform: translateX(-50%) rotate(var(--a));
  background: linear-gradient(180deg, rgba(243, 234, 216, 0) 0%, rgba(243, 234, 216, .95) 8%, rgba(232, 209, 148, .55) 45%, rgba(232, 209, 148, 0) 100%);
  filter: blur(.1875rem);
  border-radius: 50%;
  opacity: .1;
}
.hero--anim-ready .hero__glow > .hero__ray { animation: hero-ray var(--duration) ease-in-out var(--delay) infinite; }
@keyframes hero-ray {
  0%, 100% { opacity: .08; }
  45% { opacity: var(--peak); }
  60% { opacity: calc(var(--peak) * .6); }
}
@media (prefers-reduced-motion: reduce) { .hero__glow > .hero__ray { animation: none !important; } }

/* ===== Phones & tablets (<1024px): the same grapevine/baroque pattern as the desktop gutters,
   as one continuous, unmasked layer behind all content (scroll-attached; fixed is janky on iOS). ===== */
@media (max-width: 1023px) {
  body { position: relative; }
  body::before,
  .figure-page .scripture::before,
  .figure-page .prayer::before {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: url(../images/pattern-baroque.webp) center top / 12.5rem 12.5rem repeat;
    opacity: .22;
  }
  .figure-page .scripture,
  .figure-page .prayer { position: relative; isolation: isolate; }
}

/* footer divider rules: brighter muted antique gold, 1px, fading at both ends (all pages) */
.site-footer .site-footer__top,
.site-footer .site-footer__nav,
.site-footer .footer-groups {
  border-image: linear-gradient(90deg, rgba(201,168,76,0), rgba(201,162,90,.6) 14%, rgba(201,162,90,.6) 86%, rgba(201,168,76,0)) 1;
}

/* ===== Sitewide divider lines (v175): same as the footer rules — 1px muted antique gold
   rgba(201,162,90,.6); standalone separators fade out at both ends. Frames, cards, buttons untouched. ===== */
:root { --rule-gold: rgba(201,162,90,.6); --rule-fade: linear-gradient(90deg, rgba(201,162,90,0), var(--rule-gold) 14%, var(--rule-gold) 86%, rgba(201,162,90,0)) 1; }
section.faq, section.cta, section.more-prayers, .faq--home,
.faq__list .faq__item, .ab-list > li, .reminder-divider { border-image: var(--rule-fade); }
/* Desktop content dividers follow the inner text width, not the viewport. */
@media (min-width: 900px) {
  section.faq, section.cta, section.more-prayers,
  body:not(.about-page) .site-footer {
    position: relative;
    border-top: 0;
  }
  section.faq::before, section.cta::before, section.more-prayers::before,
  body:not(.about-page) .site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 2 * var(--pad)), calc(var(--maxw) - 2 * var(--pad)));
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--rule-gold) 14%, var(--rule-gold) 86%, transparent);
  }
  .home-page .faq--home > .wrap::before { display: none; }
}
.modal-divider { background: linear-gradient(90deg, rgba(201,168,76,0), var(--rule-gold) 14%, var(--rule-gold) 86%, rgba(201,168,76,0)); }
/* full-width bar edges (top bar / bottom tab bar) */
.top-bar, #topbar { border-bottom-color: var(--rule-gold); }
.bottom-nav { border-top-color: var(--rule-gold); }

/* homepage "你今天怎么了？" options: one line on phones (360–430px), arrow stays aligned */
@media (max-width: 639px) {
  .home-page #figures .mood { white-space: nowrap; font-size: clamp(.8125rem, 3.9vw, 1rem); letter-spacing: 0; gap: .25rem; }
  .home-page #figures .mood > span:first-child { min-width: 0; overflow: hidden; text-overflow: clip; }
}
/* figure-page prayers: 阿们 centred, large Songti (gold on the dark band) */
.prayer__text p.prayer__amen, .prayer__amen, .prayer--hub .prayer__text p.prayer__amen { text-align: center !important; text-indent: 0 !important; font-family: "Noto Serif SC", var(--serif) !important; font-weight: 700; font-size: 1.9em; line-height: 1.5; letter-spacing: .45em !important; padding-left: .45em; margin-top: .7em; }
/* mood heading (此刻，你心里有什么想对神说？): one balanced line on phones */
.home-page #figures .mood-picker__title { text-wrap: wrap; }
@media (max-width: 639px) { .home-page #figures .mood-picker__title { font-size: clamp(1.1875rem, 6.1vw, 1.625rem); letter-spacing: 0; } }

/* Prayer invitation: warm photographic backdrop and accessible live text. */
.home-page #figures .mood-picker {
  position: relative; isolation: isolate; padding: 3.25rem 0 0;
  margin-bottom: 4rem;
}
.home-page #figures .mood-picker::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 0 -2.5rem 0;
  background: linear-gradient(90deg, var(--ink) 0%, rgba(30,24,16,.84) 35%, rgba(30,24,16,.08) 78%), linear-gradient(0deg, var(--ink) 5%, transparent 70%), url('../images/cross-wide.webp') right top / cover no-repeat;
}
.home-page #figures .mood-picker__eyebrow {
  display: flex; align-items: center; gap: 1.5rem; max-width: 41.875rem;
  margin: 0 0 1.5rem; color: var(--gold); font: 500 1rem/1.6 var(--serif); letter-spacing: .16em;
}
.home-page #figures .mood-picker__eyebrow::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.home-page #figures .mood-picker__title {
  max-width: 100%; margin: 0 0 1.375rem; color: var(--gold-hi);
  font-size: clamp(1.875rem, 3.6vw, 3.25rem); font-weight: 600; line-height: 1.45; letter-spacing: .02em;
  text-wrap: wrap;
}
.home-page #figures .mood-picker__verse { margin: 0 0 2.125rem; max-width: 46.25rem; color: var(--ivory-soft); font: 400 1.25rem/1.8 var(--serif); }
.home-page #figures .mood-picker__verse p { margin: 0; }
.home-page #figures .mood-picker__verse cite { font-style: normal; font-size: 1.0625rem; }
.home-page #figures .moods { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.home-page #figures .moods li { display: flex; min-width: 0; }
.home-page #figures .mood {
  width: 100%; min-height: 3.875rem; padding: .8125rem .9375rem; gap: .5625rem;
  font-size: 1rem; letter-spacing: 0; white-space: nowrap;
  border-color: var(--gold); background: linear-gradient(180deg, rgba(201,168,76,.14), rgba(30,24,16,.86));
}
.home-page #figures .mood > span[data-i18n] { flex: 1; }
.home-page #figures .mood__icon { width: 1.4375rem; height: 1.4375rem; flex: 0 0 1.4375rem; color: var(--gold-hi); }
.home-page #figures .mood .arrow { font-size: 1.125rem; }
.home-page #figures .mood:hover, .home-page #figures .mood:focus-visible { background: var(--gold); color: #3B200C; }
.home-page #figures .mood:hover .mood__icon, .home-page #figures .mood:focus-visible .mood__icon { color: #3B200C; }
.home-page #figures .mood:focus-visible { outline: 2px solid var(--ivory); outline-offset: .25rem; }
.home-page #figures .mood-picker__divider { display: flex; align-items: center; gap: 1.125rem; margin-top: 2.5rem; color: var(--gold); }
.home-page #figures .mood-picker__divider::before, .home-page #figures .mood-picker__divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.home-page #figures .mood-picker__divider::after { transform: rotate(180deg); }
.home-page #figures .mood-picker__divider .mood-picker__cross { flex: none; display: block; width: 1.125rem; height: 1.875rem; color: #A07C30; }
@media (min-width: 900px) and (max-width: 1199px) {
  .home-page #figures .moods { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .home-page #figures .mood { padding-inline: .8125rem; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .home-page #figures .moods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-page #figures .moods li:last-child { grid-column: auto; }
}
@media (max-width: 599px) {
  .home-page #figures .mood-picker { padding-top: 1.75rem; margin-bottom: 2.75rem; }
  .home-page #figures .mood-picker::before { display: none; }
  .home-page #figures .mood-picker__eyebrow { font-size: .75rem; gap: .75rem; margin-bottom: 1.125rem; }
  .home-page #figures .mood-picker__title { font-size: clamp(1.6875rem, 7.4vw, 2.375rem); line-height: 1.55; letter-spacing: 0; }
  .home-page #figures .mood-picker__verse { font-size: 1rem; line-height: 1.85; margin-bottom: 1.625rem; }
  .home-page #figures .mood-picker__verse cite { font-size: .875rem; }
  .home-page #figures .moods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; }
  .home-page #figures .mood { min-height: 3.4375rem; padding: .75rem .625rem; gap: .375rem; font-size: clamp(.75rem, 3.5vw, 1rem); }
  .home-page #figures .mood__icon { width: 1.25rem; height: 1.25rem; flex-basis: 1.25rem; }
  .home-page #figures .mood .arrow { font-size: 1rem; }
  .home-page #figures .mood-picker__divider { margin-top: 1.875rem; }
}

/* Position the invitation cross lower and to the right of the heading. */
@media (min-width: 600px) {
  .home-page #figures .mood-picker::before {
    background-size: auto, auto, auto 100%;
    background-position: center, center, calc(100% + 19.375rem) 4.0625rem;
  }
}

/* Three rows keep the prayer links clear of the cross on the right. */
@media (min-width: 900px) {
  .home-page #figures .moods { width: 68%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-page #figures .mood { padding-inline: .75rem; gap: .4375rem; font-size: .9375rem; }
  .home-page #figures .mood-picker::before { background-size: auto, auto, auto 26.875rem; background-position: center, center, calc(86% + 18.125rem) 4.0625rem; }
}

@media (min-width: 900px) and (max-width: 1199px) {
 .home-page #figures .mood { font-size: .8125rem; padding-inline: .5rem; gap: .3125rem; }
 .home-page #figures .mood__icon { width: 1.25rem; height: 1.25rem; flex-basis: 1.25rem; }
 .home-page #figures .moods { width: 74%; }
}

/* Bring the invitation closer to the generate-prayer action. */
.home-page .pray-section { padding-bottom: 1.5rem; }
.home-page #figures { padding-top: 1rem; }
.home-page #figures .mood-picker { padding-top: 1.5rem; }

/* Phone sky: soft optical cores and thin, fading diffraction rays. */
@media (max-width: 599px) {
  .home-page .hero .hero__glow > .hero__mote,
  .home-page .hero .hero__glow > .hero__star--left { display: none; }
  .home-page .hero .hero__glow > .hero__star--left:nth-of-type(3n) { display: block; }
  .home-page .hero .hero__star,
  .home-page .hero .hero__sky-star {
    --star-flare: calc(.25rem + var(--size, 2px) * .24);
    width: var(--star-flare);
    height: var(--star-flare);
    min-width: 0;
    min-height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243, 234, 216, .95) 0, rgba(243, 234, 216, .72) .6px, rgba(223, 232, 247, .2) 1.2px, transparent .175rem);
    filter: none;
    box-shadow: none;
    transform: translate(-50%, -50%);
    opacity: var(--star-low, .18);
    --star-low: .18;
    --star-high: .48;
  }
  .home-page .hero .hero__star::before,
  .home-page .hero .hero__star::after,
  .home-page .hero .hero__sky-star::before,
  .home-page .hero .hero__sky-star::after {
    content: "";
    position: absolute;
    inset: auto;
    left: 50%;
    top: 50%;
    width: 100%;
    height: .65px;
    transform: translate(-50%, -50%);
    clip-path: none;
    background: linear-gradient(90deg, transparent, rgba(235, 239, 248, .12) 25%, rgba(243, 234, 216, .85) 50%, rgba(235, 239, 248, .12) 75%, transparent);
  }
  .home-page .hero .hero__star::after,
  .home-page .hero .hero__sky-star::after { transform: translate(-50%, -50%) rotate(90deg); }
  .home-page .hero .hero__star:nth-child(3n),
  .home-page .hero .hero__sky-star:nth-child(3n) { --star-low: .12; --star-high: .36; }
  .home-page .hero .hero__star:nth-child(4n),
  .home-page .hero .hero__sky-star:nth-child(4n) {
    --star-flare: calc(.625rem + var(--size, 2px) * .3);
    --star-low: .24;
    --star-high: .82;
  }
  .home-page .hero--anim-ready .hero__glow > .hero__star,
  .home-page .hero--anim-ready .hero__sky > .hero__sky-star {
    animation-name: hero-phone-starlight;
    animation-duration: calc(var(--duration, 6s) * 1.5 + 4s);
    animation-delay: calc(var(--delay, -1s) * 4);
    animation-timing-function: ease-in-out;
  }
}
@keyframes hero-phone-starlight {
  0%, 100% { opacity: var(--star-low); }
  29% { opacity: var(--star-high); }
  57% { opacity: calc(var(--star-low) + .03); }
  78% { opacity: calc(var(--star-high) - .03); }
}

/* Keep image previews, their existing patterned artwork and their actions centered. */
.engage-dialog{margin:auto}
.engage-dialog:has(.engage-card-preview)>.engage-actions{justify-content:center}
.engage-dialog:has(.engage-card-preview)>p{text-align:center}

/* Shared public sharing: quiet classical details and a readable preview before sending. */
.share-sheet{--share-ink:oklch(90% .055 84);--share-muted:oklch(77% .045 83);--share-line:oklch(64% .07 81 / .4);max-width:47.5rem;padding-top:0;border-radius:1rem 1rem 0 0;color:var(--share-ink);background:#1E1810}
.share-sheet__head{position:relative;isolation:isolate;padding:1.375rem 1.5rem 1.125rem;border-bottom:1px solid var(--share-line)}
.share-sheet__head::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url('../images/pattern-baroque.webp') center/11.25rem repeat;opacity:.1;border-radius:1rem 1rem 0 0}
.share-sheet .share-sheet__head h2{margin:0 0 .4375rem;text-align:left;font-size:1.5rem;font-weight:600;line-height:1.4;color:var(--share-ink)}
.share-sheet__hint{margin:0;max-width:65ch;font-size:.8125rem;line-height:1.75;color:var(--share-muted)}
.share-preview{display:grid;grid-template-columns:7rem minmax(0,1fr);align-items:start;column-gap:.875rem;row-gap:.4375rem;margin:1.25rem 1.5rem 1.375rem;padding-bottom:1.25rem;border-bottom:1px solid var(--share-line,rgba(232,209,148,.25));text-align:left}
.share-preview__image{grid-column:1;grid-row:1/3;display:block;width:7rem;height:7rem;object-fit:cover;border-radius:.1875rem}
.share-preview__copy{display:contents}
.share-preview h3{grid-column:2;margin:0;font:inherit;font-size:1.125rem;font-weight:600;line-height:1.55;color:var(--share-ink,#E8D194);overflow-wrap:normal;word-break:normal;text-wrap:wrap}
.share-preview__brand{white-space:nowrap}
.share-preview__summary{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden;margin:0;font-size:.875rem;line-height:1.7;color:var(--share-muted,#E8D194);overflow-wrap:anywhere}
.share-preview__summary{grid-column:2}
.share-sheet__row{gap:1.25rem 0;padding-bottom:1.375rem}
.share-sheet__item{min-height:4.75rem;gap:.5rem;font-size:.8125rem;line-height:1.5;color:var(--share-ink)}
.share-sheet__icon{width:2.875rem;height:2.875rem;border:1px solid var(--share-line);background:#2C1A0E;box-shadow:none}
.share-sheet__icon svg{width:1.5625rem;height:1.5625rem}
.share-sheet__item:nth-child(-n+2) .share-sheet__icon{border-color:#C9A84C;background:#2C1A0E}
.share-sheet__item:hover .share-sheet__icon,.share-sheet__item:focus-visible .share-sheet__icon{background:#2C1A0E;border-color:#E8D194;box-shadow:none}
.share-sheet__cancel{min-height:3.25rem;font-size:1rem;border-top-color:var(--share-line);background:#1E1810}
.share-sheet__toast{font-size:.875rem;line-height:1.6;color:var(--share-ink)}
.share-sheet__panel p{font-size:.9375rem;color:var(--share-ink)}
.share-inapp .share-preview{max-width:44.5rem;margin:0 auto 1.5rem}
.share-inapp .share-preview__summary{font-size:.875rem;line-height:1.7;margin:0;color:#E8D194}
.share-inapp .share-preview h3{font-size:1.125rem}
@media(max-width:600px){.share-preview{row-gap:.875rem}.share-preview h3{grid-column:1/-1;grid-row:1}.share-preview__image{grid-row:2}.share-preview__summary{grid-row:2}}
@media(max-width:400px){.share-preview{grid-template-columns:6.25rem minmax(0,1fr)}.share-preview__image{width:6.25rem;height:6.25rem}}
@media(max-width:360px){.share-preview{margin-inline:1.125rem;gap:.75rem;grid-template-columns:5.5rem minmax(0,1fr)}.share-preview__image{width:5.5rem;height:5.5rem}.share-sheet__head{padding-inline:1.125rem}.share-sheet__item{font-size:.75rem}}

/* Interface copy fills the available line; scripture and poetry keep their own layout. */
.hero__title,.mood-picker__title,.figure-page :is(.chapter__title,.cta__title,.band__line,.p-hero__sub),.dy-sub,.ab-tagline{text-wrap:wrap}
.figure-page .p-hero .p-hero__sub .nowrap{display:inline;white-space:normal}
@media(min-width:900px){
 .figure-page .p-hero .p-hero__block{width:max-content;max-width:100%;min-width:0}
 .figure-page .p-hero .p-hero__sub{max-width:100%;white-space:normal;text-wrap:wrap}
}

/* Text uses its region before wrapping; artwork and reading columns remain separate. */
.home-page .hero .hero__verse,
.home-page .figures__intro,
.home-page #figures .mood-picker__verse { max-width: none; }
.home-page .hero-sub-ref { display: inline-block; max-width: 100%; margin: 0; }
.figure-page .scripture :is(.scripture__quote,.scripture__bridge) { max-width: none; }
.figure-page .scripture__quote blockquote { padding-inline: clamp(1.5rem, 3vw, 2.5rem); }
.figure-page .scripture__quote :is(.scripture__ending,.nowrap) { white-space: normal; }
.figure-page .scripture__quote :is(.scripture__line,.scripture__plea,.scripture__answer) { display: inline; margin: 0; text-wrap: wrap; }
.figure-page .scripture__bridge .nowrap { display: inline; white-space: normal; }
.figure-page .prayer__text { max-width: none; }
.home-page #figures .mood-picker__verse p { display: inline; }
.home-page #figures .mood-picker__verse cite { display: inline-block; max-width: 100%; }
.home-page #figures :is(.mood-picker__title,.mood-picker__verse) .text-phrase,
.figure-page .scripture__quote :is(.scripture__ending,.nowrap) { display: inline-block; max-width: 100%; white-space: normal; vertical-align: baseline; }
.home-page .fig-card__name .nowrap { white-space: normal; }
@media(max-width:599px){ .home-page .card-hint { max-width: 100%; } }
@media(max-width:599px){
 .home-page #figures > .wrap { padding-inline: .75rem; }
 .home-page #figures .fig-tabs { margin-inline: -.75rem; padding-inline: .75rem; }
}

/* A larger visitor text size must not force the Google sign-in label outside its dialog. */
.auth-google-btn, #authModal #googleSignInBtn { height: auto; min-height: var(--gold-button-height, 4rem); padding-block: .625rem; white-space: normal; }
.auth-google-btn > span, #authModal #googleSignInBtn > span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.site-footer .wordmark { max-width: 100%; min-width: 0; overflow-wrap: anywhere; white-space: normal; }

/* Home page: light-gold text instead of white */
body.home-page { --ivory: #E8D194; --ivory-2: #E8D194; --ivory-soft: #E8D194; }
.home-page :is(.verse-card, .result-box, .verse-box, .journal-entry, .prayer-card) { background: #f3ead8; }
.home-page .hero .hero__title { color: #E8D194; }
.home-page .hero .hero__verse { color: #E8D194; }
.home-page .faq__intro { color: rgba(232, 209, 148, 0.85); }
.home-page .faq__a { color: rgba(232, 209, 148, 0.8); }
.home-page .auth-desc { color: #E8D194; }
/* Shared navigation palette; geometry and markup stay unchanged. */
html body .bottom-nav .nav-item,html body .site-nav a{color:#D9B970!important}
html body .bottom-nav .nav-item:is(.active,[aria-current="page"]),html body .site-nav a:is(.active,[aria-current="page"]){color:#C9A25A!important}
html body .bottom-nav .nav-item svg{color:inherit!important}

/* The shared homepage navigation palette, across every template. */
html body .top-bar :is(a,button,.logo-text),html body #bgMusicBtn{color:#D9B970!important}
html body .top-bar :is(button.active,a[aria-current=page]){color:#C9A25A!important}
html body .top-bar svg{color:inherit}
html body .top-bar{background:linear-gradient(180deg,rgba(30,23,15,.98),rgba(30,23,15,.92))!important}
/* Keep visual dimensions; enlarge the pointer area without rearranging controls. */
html body .top-bar :is(button,.logo){position:relative}
html body .top-bar :is(button,.logo)::before{content:'';position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);min-width:2.75rem;min-height:2.75rem;width:100%;height:100%}
html body .top-bar .lang-toggle button.active{background:#3B2917!important;color:#C9A25A!important;box-shadow:inset 0 0 0 1px rgba(201,162,90,.6)!important}

html body .top-bar #authBtn{overflow:visible}
html body .top-bar{border:0!important}
html body .top-bar #authBtn{font-family:var(--serif)!important}
html body :is(.top-bar,.top-bar-actions,.top-bar .lang-toggle){color:#D9B970!important}

/* v376: show the home painting without shading; keep stars and light layers. */
.home-page .hero__media { -webkit-mask-image: none; mask-image: none; }
.home-page .hero__media::after { background: none; }

/* v377: painted landscape fills the desktop hero, with existing sky effects above it. */
.home-page .hero__media picture { display: block; width: 100%; height: 100%; }
@media (min-width: 900px) {
  .home-page .hero__media { left: 0; }
  .home-page .hero__media img { object-position: 70% 35%; }
  .home-page .hero__glow > .hero__head { display: none; }
  .home-page .hero__glow > .hero__halo { left: 71.6%; top: 30%; width: 10%; }
  .home-page .hero__glow > .hero__ray { left: 57%; }
}
/* v378: use the painted halo; the added glow must not wash over Jesus's head. */
@media (min-width: 900px) {
  .home-page .hero__glow > .hero__halo { visibility: hidden; }
}
@media (min-width: 900px) {
  .home-page .hero__glow > .hero__star[style*="--x:73%;--y:35%"] { --x: 82% !important; }
}

/* v379: retain the painted head and halo without any foreground glow/cutout. */
.home-page .hero__glow > :is(.hero__halo, .hero__head) { display: none; }
/* v382: soft brown backing belongs only to the two hero text lines. */
.home-page .hero :is(.hero__title, .hero__verse) { position: relative; isolation: isolate; }
.home-page .hero :is(.hero__title, .hero__verse)::before {
  content: "";
  position: absolute;
  inset: -.5rem 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(30,24,16,.68) 16%, rgba(30,24,16,.68) 84%, transparent);
  filter: blur(.4375rem);
  border-radius: .5rem;
}
/* v383: faster, more pronounced light breathing, preserving head exclusion. */
@media (prefers-reduced-motion: no-preference) {
  .home-page .hero--anim-ready .hero__glow > .hero__ray {
    animation-name: home-ray-v383;
    animation-duration: calc(var(--duration) * .65);
  }
}
@keyframes home-ray-v383 {
  0%, 100% { opacity: .04; }
  45% { opacity: calc(var(--peak) * 1.3); }
  60% { opacity: calc(var(--peak) * .65); }
}
/* v384: keep this invitation aligned to the left of its content area. */
.home-page #figures #moods-title { text-align: left !important; }
.home-page .faq--home :is(.faq__title, .faq__q) { text-align: left !important; }
/* v384: pale gold replaces ivory text within character prayer content. */
.figure-page main { color: #E8D194; }
.figure-page main :is(.chapter__title, .p-hero__name, .p-hero__sub, .band__line, .cta__title, .scripture__quote blockquote p, .prayer__text p) { color: #E8D194; }
/* v385: include secondary text on dark sections; keep paper headings readable. */
.figure-page main :is(.breadcrumb a, .breadcrumb [aria-current], .scripture__bridge p, .scripture__note, .more-prayers__title, .more-prayers__name, .more-prayers__note, .cta__sub, .text-link, .faq__title, .faq__a, .faq__intro, .faq__related, .hub-more, .hub-fig__name a, .hub-fig__text) { color: #E8D194; }
.figure-page main .story .chapter__title { color: #74561C; }

/* v386: give the mobile invitation its own space below the painting. */
@media (max-width: 899px) {
  .home-page .hero .hero__content {
    padding-top: calc(min(134vw, 66svh) + 1.25rem);
    padding-inline: 1.5rem;
  }
  .home-page section.hero h1.hero__title {
    font-size: clamp(1.25rem, 6.1vw, 2rem) !important;
    max-width: none;
    line-height: 1.4;
    letter-spacing: 0;
  }
  .home-page .hero .hero__verse {
    margin-top: 1.25rem;
    max-width: none;
    font-size: 1.125rem;
    line-height: 1.85;
    letter-spacing: 0;
    text-align: center;
    text-align-last: center;
  }
  .home-page .hero .hero-sub-ref { margin-top: .5rem; letter-spacing: 0; }
}
/* Embossed gold vine follows the full-width edge of the home painting. */
.home-page .pray-section { position: relative; }
.home-page .pray-section::before {
  content: "";
  position: absolute;
  top: -.75rem;
  left: 0;
  right: 0;
  height: 1.5rem;
  z-index: 2;
  pointer-events: none;
  border-top: 1.5rem solid transparent;
  border-image: url('../images/prayer-antique-frame-v340.webp') 135 / 1.5rem 0 0 / 0 round;
  background: #2b1d10;
  box-shadow: 0 1px 0 #e8ca7e66, 0 .1875rem .4375rem #100b0580;
}

/* v388: mobile hero fits the visible screen above the fixed bottom navigation. */
@media (max-width: 899px) {
  .home-page .hero {
    height: calc(100svh - 5.0625rem - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    padding-top: 4.5rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
  }
  .home-page .hero__media {
    position: relative;
    inset: auto;
    flex: 1 1 0;
    min-height: 8.75rem;
    height: auto;
    width: 100%;
    overflow: hidden;
  }
  .home-page .hero .hero__content {
    flex: none;
    padding: 1rem 1.5rem 1.5rem;
  }
  .home-page .hero .hero__verse { margin-top: .875rem; }
  .home-page .hero .hero__actions { margin-top: 1.125rem; }
}
@media (max-width: 359px) {
  .home-page .hero { padding-top: 6.625rem; }
  .home-page .hero__media { min-height: 6.25rem; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .home-page .hero { padding-top: 4.75rem; }
}

/* v390: fine gold edges frame the mobile painting. */
@media (max-width: 899px) {
  .home-page .hero__media::after { border-block: 1px solid #C9A25A; }
}
/* Desktop painting starts visually below the 76px navigation header. */
@media (min-width: 900px) {
  .home-page .hero__media::after { top: 4.75rem; border-top: 2px solid #C9A25A; }
}

/* v391: show the entire share image, including portrait heads. */
.share-preview__image { object-fit: contain; object-position: center; }
.figure-page .more-prayers__title::after { content: none; }

/* A restrained double gold outline around the family prayer painting. */
.home-page .public-prayer-entry > .public-prayer-banner { position: relative; }
.home-page .public-prayer-entry > .public-prayer-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: 1px solid #B79853;
  box-shadow: inset 0 0 0 .25rem rgba(30,24,16,.45), inset 0 0 0 .3125rem rgba(201,168,76,.6);
}
.home-page #figures #moods-title {
  margin-top: 1rem;
  padding: .875rem 1.25rem;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  background: linear-gradient(90deg, rgba(30,24,16,.86) 0%, rgba(30,24,16,.86) 92%, rgba(30,24,16,0) 100%);
  border-radius: .25rem;
}
.home-page #figures .mood-picker__eyebrow { margin-bottom: 2.5rem; }
.home-page #figures #moods-title { margin-top: 0; }
/* Slightly shift the mobile subject right while keeping the painting edge covered. */
@media (max-width: 899px) {
  .home-page .hero__media img { transform: translateX(2%) scale(1.06); transform-origin: center; }
}

/* v392: subdued grape ornament behind related-prayer card captions. */
.figure-page .more-prayers__list a {
  background-image: linear-gradient(rgba(30,24,16,.8), rgba(30,24,16,.8)), url('../images/pattern-baroque.webp');
  background-size: auto, 12.5rem 12.5rem;
  background-position: center;
}

/* v395: one consistent fine gold rule below every site navigation. */
html body .top-bar, html body #topbar { border-bottom: 1px solid #C9A25A !important; }

/* v400: the existing landscape painting fills the mobile invitation. */
.home-mobile-menu { display: none; }
@media (max-width: 899px) {
  .home-page .hero {
    height: 100svh;
    min-height: 38.75rem;
    padding-top: 4.25rem;
    justify-content: flex-end;
    overflow: hidden;
  }
  .home-page .hero__media {
    position: absolute;
    inset: 4.25rem 0 0;
    width: 100%;
    height: auto;
    min-height: 0;
  }
  .home-page .hero__media img {
    object-position: 73% 50%;
    transform: none;
  }
  .home-page .hero__media::after {
    border-block: 1px solid #C9A25A;
    background: linear-gradient(0deg, rgba(22,17,12,.88), rgba(22,17,12,.52) 18%, transparent 43%);
  }
  .home-page .hero .hero__content { padding: 1.5rem 1.25rem 2.25rem; }
  .home-page .hero .hero__verse { margin-top: .75rem; line-height: 1.75; }
  .home-page .hero .hero__actions { margin-top: 1.25rem; }
  .home-page .hero :is(.hero__title,.hero__verse)::before { content: none; }
  .home-page .hero :is(.hero__title,.hero__verse) { text-shadow: 0 2px .5rem #100c08; }
  .home-page .bottom-nav { display: none; }
  .home-page .app-wrapper { padding-bottom: 0; }
  .home-page .top-bar {
    min-height: 4.25rem;
    height: 4.25rem;
    padding: .625rem .75rem;
    flex-wrap: nowrap;
    gap: .25rem;
    z-index: 130;
  }
  .home-page .top-bar .brand { --brand-h: 1.75rem; --brand-fs: 1.875rem; }
  .home-page .top-bar .site-logo { width: 8rem; height: auto; }
  .home-page .top-bar-actions { gap: .25rem; }
  .home-page .home-mobile-menu { display: block; }
  .home-mobile-menu summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    cursor: pointer;
    list-style: none;
    padding: 0;
    color: #D9B970;
  }
  .home-mobile-menu summary::-webkit-details-marker { display: none; }
  .home-mobile-menu summary:focus-visible { outline: 2px solid #D9B970; outline-offset: -2px; }
  .home-mobile-menu[open] summary { background: #3B2917; border-radius: .375rem; }
  .home-mobile-menu nav {
    position: absolute;
    top: 4.25rem;
    right: .75rem;
    width: min(16.25rem, calc(100vw - 1.5rem));
    padding: .5rem;
    background: #21190F;
    border: 1px solid #A07C30;
    box-shadow: 0 .75rem 2rem #0006;
    border-radius: .375rem;
  }
  .home-mobile-menu nav a { display: block; padding: .625rem 1rem; min-height: 2.75rem; text-decoration: none; }
  .home-mobile-menu nav a:is(:hover,:focus-visible,[aria-current]) { background: #3B2917; }
}
@media (max-width: 359px) {
  .home-page .top-bar .brand { --brand-h: 1.5rem; --brand-fs: 1.625rem; }
  .home-page .top-bar-actions { gap: 2px; }
}
@media (max-width: 899px) and (max-height: 650px) {
  .home-page .hero .hero__content { padding-bottom: 1.5rem; }
}
@media (max-width: 899px) {
  html body.home-page .home-mobile-menu > summary::after { content: none; display: none; }
}
@media (max-width: 359px) {
  .home-page .top-bar .site-logo { width: 6.75rem; }
}

/* v401: dark, close shadows keep the gold invitation legible over the painting. */
.home-page .hero :is(.hero__title, .hero__verse, .hero-sub-ref) {
  text-shadow: 0 1px 2px #080603, 0 2px .3125rem #080603, 0 .25rem .75rem rgba(8,6,3,.95);
}

/* v402: mobile uses the same wide painting, so its rays share the painted source. */
.home-page .hero__glow > .hero__ray { left: 57%; }

/* v403: a broader source pulse and brighter rays make the light unmistakable. */
.home-page .hero__glow > .hero__ray {
  width: calc(var(--w) * 1.6);
  height: calc(var(--len) * 1.55);
  background: linear-gradient(180deg, transparent, rgba(255,249,221,.8) 8%, rgba(255,226,151,.55) 48%, transparent);
  filter: blur(.4375rem);
}
.home-page .hero__glow::before {
  content: "";
  position: absolute;
  left: 42%;
  top: 0;
  width: 32%;
  height: 49%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse at 50% 5%, rgba(255,249,221,.92), rgba(255,226,151,.6) 28%, rgba(255,214,125,.2) 52%, transparent 73%);
  filter: blur(.625rem);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .home-page .hero--anim-ready .hero__glow > .hero__ray { animation-name: home-ray-v403; }
  .home-page .hero--anim-ready .hero__glow::before { animation: home-source-v403 3.4s ease-in-out infinite; animation-play-state: paused; }
  .home-page .hero--anim-ready.hero--anim-visible .hero__glow::before { animation-play-state: running; }
}
@keyframes home-ray-v403 {
  0%, 100% { opacity: .01; }
  40% { opacity: min(1, calc(var(--peak) * 2)); }
  64% { opacity: calc(var(--peak) * .3); }
}
@keyframes home-source-v403 {
  0%, 100% { opacity: .02; }
  40% { opacity: .7; }
  64% { opacity: .22; }
}

/* v405: gentler holy light, with clearer and quicker individual star twinkles. */
@media (prefers-reduced-motion: no-preference) {
  .home-page .hero--anim-ready .hero__glow > .hero__ray { animation-name: home-ray-v405; }
  .home-page .hero--anim-ready .hero__glow::before { animation-name: home-source-v405; }
  .home-page .hero--anim-ready .hero__glow > .hero__star,
  .home-page .hero--anim-ready .hero__sky > .hero__sky-star {
    animation-name: home-star-v405;
    animation-duration: calc(var(--duration, 5s) * .65);
    animation-delay: var(--delay, -1s);
  }
  .home-page .hero :is(.hero__star, .hero__sky-star) {
    filter: drop-shadow(0 0 .1875rem rgba(255,239,190,.9));
  }
}
@keyframes home-ray-v405 {
  0%, 100% { opacity: .01; }
  40% { opacity: calc(var(--peak) * 1.3); }
  64% { opacity: calc(var(--peak) * .2); }
}
@keyframes home-source-v405 {
  0%, 100% { opacity: .01; }
  40% { opacity: .4; }
  64% { opacity: .12; }
}
@keyframes home-star-v405 {
  0%, 100% { opacity: .04; transform: translate(-50%, -50%) scale(.8); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1.22); }
  64% { opacity: .12; transform: translate(-50%, -50%) scale(.88); }
}
@media (max-width: 599px) {
  .home-page .hero :is(.hero__star, .hero__sky-star) { --star-flare: calc(.5rem + var(--size, 2px) * .45); }
}

/* v406: viewport-based stars stay evenly distributed when the painting is cropped. */
.home-page .hero .hero__sky > .hero__sky-star {
  display: block;
  width: var(--size);
  height: var(--size);
  min-width: 0;
  min-height: 0;
  --star-flare: var(--size);
}
@media (max-width: 899px) {
  .home-page .hero .hero__sky > .hero__sky-star:nth-child(n + 36) { display: none; }
}

/* v408: let holy light and stars breathe more slowly at their existing brightness. */
@media (prefers-reduced-motion: no-preference) {
  .home-page .hero--anim-ready .hero__glow > .hero__ray {
    animation-duration: var(--duration);
  }
  .home-page .hero--anim-ready .hero__glow::before {
    animation-duration: 5.2s;
  }
  .home-page .hero--anim-ready .hero__glow > .hero__star,
  .home-page .hero--anim-ready .hero__sky > .hero__sky-star {
    animation-duration: var(--duration, 5s);
  }
}

/* Homepage prayer generator: parchment, church gold, and carved frames. */
#pray { --generator-ink: #493019; --generator-gold: #C9A84C; }
#pray .pray-wrap { gap: 2rem; min-width: 0; }
#pray :where(.generator-input, .generator-topics, .verse-card, #resultBox) {
  position: relative;
  border: 0;
  border-radius: .25rem;
  padding: 2.375rem 2.5rem;
  overflow: visible;
  background: linear-gradient(135deg, #F3EAD8, #F3EAD8);
  color: var(--generator-ink);
  box-shadow: inset 0 0 1.75rem #74561C22, 0 .5rem 1.5rem #1E181033;
}
#pray :where(.generator-input, .generator-topics, .verse-card, #resultBox)::before {
  content: "";
  position: absolute;
  inset: -.625rem;
  border: 2.75rem solid transparent;
  border-image: url(../images/ui/ornate-frame.svg) 80 / 2.75rem stretch;
  pointer-events: none;
}
#pray .card-heading-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.25rem; margin-bottom: 1.125rem; }
#pray .card-title { display: flex; align-items: center; gap: .625rem; margin: 0; color: var(--generator-ink); font: 700 1.5rem/1.4 var(--serif); flex-shrink: 0; }
#pray .generator-quill { width: 1.75rem; height: 1.75rem; flex-shrink: 0; color: #A07C30; }
#pray .card-hint { color: #74561C; font-size: .8125rem; line-height: 1.7; }
#pray .generator-writing { position: relative; }
#pray #needInput { display: block; box-sizing: border-box; width: 100%; height: 11.875rem; min-height: 9.375rem; padding: 1rem 1.125rem 2.375rem; background: linear-gradient(135deg, #F3EAD8, #F3EAD8); border: 1px solid #C9A84C99; border-radius: .5rem; color: var(--generator-ink); font: 400 1.125rem/1.9 var(--serif); box-shadow: inset 0 2px .5rem #74561C13; color-scheme: light; }
#pray #needInput::placeholder { color: #A07C30; }
#pray #needInput:focus-visible { outline: 2px solid #A07C30; outline-offset: .1875rem; }
#pray .char-counter-row { position: absolute; bottom: .625rem; right: 1.125rem; margin: 0; pointer-events: none; }
#pray #charCount { color: #A07C30; font-size: .75rem; }
#pray .generator-topics { background: radial-gradient(ellipse at top, #2C1A0E66, transparent 80%), #1E1810; }
#pray .generator-topics .card-title { color: #E8D194; }
#pray .generator-topic-verse { color: #C9A84C; max-width: 38.75rem; }
#pray .tone-group { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
#pray .tone-option label { border: 1px solid #C9A84C8c; border-radius: 62.4375rem; background: #1E181033; color: #E8D194; min-height: 3rem; padding: .625rem .5rem; font-size: .9375rem; gap: .375rem; height: 100%; box-sizing: border-box; }
#pray .tone-option label > span:first-child { filter: none; }
#pray .tone-option label:hover { background: #C9A84C18; border-color: #E8D194; }
#pray .tone-option input:checked + label { background: linear-gradient(135deg, #E8D194, #C9A84C); color: #3B200C; border-color: #E8D194; font-weight: 700; box-shadow: 0 0 1rem #C9A84C33; }
#pray .tone-option input:focus-visible + label { outline: 2px solid #E8D194; outline-offset: .1875rem; }
#pray #generateBtn { --gold-button-height: 4.75rem; width: 100%; max-width: 40rem; align-self: center; margin: .375rem 0; font: 700 1.625rem/1 var(--serif); letter-spacing: .2em; background: url(../images/ui/btn-cap-l3.webp) left center / auto 100% no-repeat, url(../images/ui/btn-cap-r3.webp) right center / auto 100% no-repeat, url(../images/ui/btn-mid2.webp) center / 100% 100% no-repeat; }
#pray #btnText { display: inline-flex; align-items: center; justify-content: center; }
#pray .result-section { gap: 1.875rem; min-width: 0; }
#pray .verse-cards { gap: 1.75rem; }
#pray .verse-card { padding: 2rem 2.75rem; }
#pray .verse-card .verse-text { color: var(--generator-ink); font: 400 1.125rem/2 var(--serif); }
#pray .verse-card .verse-ref { text-align: right; color: #A07C30; font: 500 .875rem/1.7 var(--serif); margin-top: .625rem; }
#pray #prayerDivider { display: flex; align-items: center; justify-content: center; gap: 1rem; color: #C9A84C; font: 400 .875rem/1.8 var(--serif); letter-spacing: .15em; text-align: center; }
#pray #prayerDivider.hidden { display: none; }
#pray #prayerDivider::before, #pray #prayerDivider::after { content: ""; flex: 1; max-width: 6.25rem; height: 1px; background: linear-gradient(90deg, transparent, #C9A84C80); }
#pray #prayerDivider::after { transform: rotate(180deg); }
#pray .prayer-title { color: var(--generator-ink); font: 700 1.5rem/1.6 var(--serif); justify-content: center; gap: .875rem; margin: 0 0 1.5rem; }
#pray .prayer-title::before, #pray .prayer-title::after { content: "◆"; flex: 1; max-width: 5.625rem; height: .875rem; color: #A07C30; font-size: .625rem; line-height: .875rem; background: linear-gradient(90deg, transparent, #C9A84C, transparent) center / 100% 1px no-repeat; text-align: center; }
#pray .prayer-body { color: var(--generator-ink); font: 400 1.125rem/2 var(--serif); text-indent: 2em; margin: 0 0 1rem; overflow-wrap: anywhere; }
#pray .prayer-amen { color: #947039; font: 700 1.125rem/2 var(--serif); text-align: right; text-indent: 0; margin: .75rem 0 0; }
#pray #resultText { color: var(--generator-ink); font: 400 1.125rem/2 var(--serif); overflow-wrap: anywhere; }
#pray #resultControls { gap: .625rem; padding: 1.5rem 0 0; align-items: center; }
#pray #resultControls .btn-secondary { background: #F3EAD8; color: #74561C; border: 1px solid #A07C30; border-radius: 62.4375rem; white-space: nowrap; padding: .625rem .875rem; min-height: 2.625rem; font: 600 .875rem/1.4 var(--serif); }
#pray #resultControls .btn-secondary:hover { background: #E8D194; }
#pray #resultControls svg { stroke: currentColor; flex-shrink: 0; }
#pray #shareBtn { --gold-button-height: 3.25rem; padding-inline: 1.75rem; font-size: 1.0625rem; }
#pray #savePrompt { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: .75rem; background: #1E1810; border: 1px solid #C9A84C66; border-radius: .625rem; padding: .75rem 1rem; }
#pray #savePrompt.hidden { display: none; }
#pray #savePrompt p { flex: 1; flex-basis: auto; margin: 0; color: #e6d7b5; font-size: .875rem; line-height: 1.6; min-width: 0; }
#pray .save-actions { display: flex; flex-shrink: 0; gap: .5rem; }
#pray .save-actions .btn { min-width: 4.5em; white-space: nowrap; font-size: .875rem; }
#pray #skipSave { border: 1px solid #C9A84C; border-radius: 62.4375rem; background: transparent; color: #E8D194; padding: .5rem .75rem; }
#pray #confirmSave { --gold-button-height: 2.5rem; padding-inline: 1.125rem; }
@media (max-width: 760px) {
  #pray .tone-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #pray .card-heading-row { flex-wrap: wrap; gap: .5rem; }
  #pray .card-hint { text-align: left; }
}
@media (max-width: 600px) {
  #pray .generator-topic-verse { display: none; }
  #pray #generateBtn { --gold-button-height: 4rem; font-size: 1.4375rem; }
}
@media (max-width: 480px) {
  #pray .pray-wrap { gap: 1.625rem; }
  #pray :where(.generator-input, .generator-topics, #resultBox) { padding: 1.625rem 1.25rem; }
  #pray :where(.generator-input, .generator-topics, .verse-card, #resultBox)::before { inset: -.375rem; border-width: 1.875rem; border-image-width: 1.875rem; }
  #pray .card-title { font-size: 1.375rem; }
  #pray #needInput { height: 11.25rem; font-size: 1.0625rem; padding-inline: .75rem; }
  #pray .tone-group { gap: .625rem .375rem; }
  #pray .tone-option label { font-size: .875rem; padding-inline: .25rem; gap: .25rem; }
  #pray .verse-card { padding: 1.625rem 1.875rem; }
  #pray .prayer-title { font-size: 1.375rem; gap: .625rem; }
  #pray .prayer-body { font-size: 1.0625rem; }
  #pray #resultControls { gap: .5rem; }
  #pray #savePrompt { padding: .625rem; gap: .5rem; }
  #pray #savePrompt p { font-size: .75rem; }
  #pray .save-actions { gap: .375rem; }
}
@media (max-width: 380px) {
  #pray .tone-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Carved gold baroque frame (raster, 9-slice) — overrides the earlier SVG frame. */
#pray :where(.generator-input, .generator-topics, .verse-card, #resultBox) { --fb: 6rem; }
#pray :where(.verse-card) { --fb: 3.875rem; }
#pray :where(.generator-input, .generator-topics, .verse-card, #resultBox)::before {
  inset: calc(var(--fb) * -.544) calc(var(--fb) * -.24) calc(var(--fb) * -.419);
  border-style: solid; border-color: transparent;
  border-width: calc(var(--fb) * 1.111) var(--fb) calc(var(--fb) * 1.105);
  border-image: url(../images/ui/frame-9.webp?v=2) 180 162 179 162 / calc(var(--fb) * 1.111) var(--fb) calc(var(--fb) * 1.105) stretch;
  background:
    url(../images/ui/fleur-top.webp) center top / calc(var(--fb) * 1.578) auto no-repeat,
    url(../images/ui/fleur-bottom.webp) center bottom / calc(var(--fb) * 1.578) auto no-repeat,url(../images/ui/fleur-side.webp) left center / calc(var(--fb) * .519) auto no-repeat,url(../images/ui/fleur-side-right-v372.webp) right center / calc(var(--fb) * .519) auto no-repeat;
  background-origin: border-box; background-clip: border-box;
}
#pray :where(.generator-input, #resultBox)::before {
  background:
    url(../images/ui/fleur-top.webp) center top / calc(var(--fb) * 1.578) auto no-repeat,
    url(../images/ui/fleur-bottom.webp) center bottom / calc(var(--fb) * 1.578) auto no-repeat,url(../images/ui/fleur-side.webp) left center / calc(var(--fb) * .519) auto no-repeat,url(../images/ui/fleur-side-right-v372.webp) right center / calc(var(--fb) * .519) auto no-repeat;
  background-origin: border-box; background-clip: border-box;
}
#pray .verse-card { margin: .875rem 0; }
#pray #resultBox { margin-top: 2.75rem; }
#pray #savePrompt { margin-top: 2.75rem; }
#pray .verse-cards { gap: 2.5rem; margin-top: 1.875rem; }
#pray #prayerDivider { margin-top: 1.875rem; }
@media (max-width: 480px) {
  #pray :where(.generator-input, .generator-topics, .verse-card, #resultBox) { --fb: 4rem; }
  #pray :where(.verse-card) { --fb: 2.875rem; }
  #pray :where(.generator-input, .generator-topics, .verse-card, #resultBox)::before { inset: calc(var(--fb) * -.544) calc(var(--fb) * -.24) calc(var(--fb) * -.419); border-width: calc(var(--fb) * 1.111) var(--fb) calc(var(--fb) * 1.105); border-image-width: calc(var(--fb) * 1.111) var(--fb) calc(var(--fb) * 1.105); }
}
#pray .pray-wrap { gap: 3.5rem; }
#pray #prayerDivider { text-transform: none; }
/* loading state: keep the solid gold face; only the spinner shows (dark brown for contrast) */
#pray #generateBtn:disabled { opacity: 1; filter: none; cursor: wait; pointer-events: none; }
#pray #generateBtn .spinner { border-color: rgba(44, 26, 14, .28); border-top-color: #2C1A0E; }
/* prayer body fills the frame symmetrically (CJK lines justified so no ragged right gap on iOS) */
#pray #resultText { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
#pray #resultText .prayer-body { max-width: none; text-align: justify; text-justify: inter-character; }
/* 阿们: centred, large Songti, deep antique gold-brown — same as the share image */
#pray .prayer-amen { text-align: center; text-indent: 0; margin: 1.375rem 0 .25rem; padding-left: .45em; font: 700 2.125rem/1.4 "Noto Serif SC", var(--serif); letter-spacing: .45em; color: #6e4b18; background: linear-gradient(180deg, #8f6420, #5e3e14); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (max-width: 480px) { #pray .prayer-amen { font-size: 2rem; } }
/* result actions: gold 分享 on its own row, then four equal secondary pills */
#pray #resultControls { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem .625rem; justify-items: stretch; align-items: center; }
#pray #resultControls[style*="none"] { display: none !important; }
#pray #resultControls #shareBtn { order: -1; grid-column: 1 / -1; justify-self: center; width: min(100%, 27.5rem); }
#pray #resultControls #copyBtn { order: 1; } #pray #resultControls #copyImgBtn { order: 2; }
#pray #resultControls #downloadImgBtn { order: 3; } #pray #resultControls #speakBtn { order: 4; }
#pray #resultControls .btn-secondary { width: 100%; min-width: 0; height: 2.75rem; padding: 0 .375rem; display: inline-flex; align-items: center; justify-content: center; gap: .3125rem; white-space: nowrap; font-size: clamp(.75rem, 3.4vw, .875rem); }
#pray #resultControls .btn-secondary svg { flex: 0 0 auto; width: .9375rem; height: .9375rem; }
@media (max-width: 359px) { #pray #resultControls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  #pray #resultControls { gap: .625rem .4375rem; }
  #pray #resultControls .btn-secondary { font-size: clamp(.7188rem, 3.1vw, .8125rem); gap: .1875rem; padding: 0 .25rem; letter-spacing: 0; }
  #pray #resultControls .btn-secondary svg { width: .8125rem; height: .8125rem; }
}
#pray .generator-input { font-family: var(--serif); }
#pray #needInput::placeholder { font-family: inherit; }
.home-page #toast { z-index: 10001; bottom: max(6rem, calc(env(safe-area-inset-bottom) + 4.75rem)); }
#pray #publicShareNotice { grid-column: 1 / -1; order: 0; margin: 0 0 .5rem; text-align: center; color: #74561C; font: 400 .8125rem/1.7 var(--serif); }

.public-prayer-policy{text-align:center;text-indent:0;font:.875rem/1.7 var(--serif);color:var(--gold-hi);margin:1rem 0 .625rem}
/* Keep every generated Chinese character in one complete Google serif family. */
#pray{--serif:"Say Prayer Serif","Noto Serif SC",serif;-webkit-text-size-adjust:100%;text-size-adjust:100%}
#pray :is(.generator-input,.prayer-body,.verse-card .verse-text){font-family:var(--serif);font-weight:400}
@media(max-width:640px){#pray :is(.generator-input,.prayer-body,.verse-card .verse-text){font-size:1.125rem;line-height:2}}
@media(max-width:640px){#pray #needInput{font-size:1.125rem;line-height:2}}

/* Keep decorative paint inside the viewport and allow visitor text enlargement. */
.home-page #figures .mood-picker::before { inset-inline: calc(-1 * min(2.5rem, var(--pad))); }
.home-page #figures .mood { white-space: normal; min-width: 0; }
.home-page #figures .mood > span[data-i18n] { min-width: 0; overflow: visible; }
#pray #generateBtn { height: auto; min-height: var(--gold-button-height); padding-block: .75rem; white-space: normal; }
#pray #btnText { display: block; min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }

/* Full painting and overlaid type use the homepage hero's media, shadow and edge fades. */
.public-prayer-entry{display:block;width:100%;margin:2rem 0 0;padding:0;border:0}
.public-prayer-entry>.public-prayer-banner{position:relative;isolation:isolate;display:flex;align-items:flex-start;width:100%;min-width:0;min-height:28.75rem;padding:0;overflow:hidden;border:1px solid #C9A84C38;border-radius:.25rem;background:var(--ink);color:var(--gold-hi);font:700 clamp(2rem,3.1vw,2.75rem)/1.2 var(--serif);text-decoration:none;text-align:left}
.public-prayer-banner::before{content:none}
.public-prayer-banner::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,rgba(30,24,16,.55),rgba(30,24,16,.15) 28%,transparent 48%),linear-gradient(90deg,rgba(30,24,16,.18),transparent 65%),linear-gradient(0deg,rgba(30,24,16,.28),transparent 22%)}
.public-prayer-banner__art{position:absolute;inset:0;z-index:0;display:block;width:100%;height:100%;max-height:none;object-fit:cover;object-position:50% 0%;filter:none;opacity:1}
.public-prayer-banner__copy{position:relative;z-index:2;display:block;min-width:0;width:100%;padding:2.125rem 2.5rem;text-shadow:0 2px 1.875rem rgba(0,0,0,.6),0 1px .1875rem rgba(0,0,0,.7)}
.public-prayer-banner__mark{display:flex;align-items:center;gap:.875rem;margin-bottom:1rem;color:var(--gold)}
.public-prayer-banner__mark svg{display:block;width:1.375rem;height:1.375rem}.public-prayer-banner__mark::after{content:'';display:block;width:3.375rem;height:1px;background:#C9A84C66}
.public-prayer-entry__label{display:block;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.public-prayer-banner__last{display:inline-flex;align-items:center;gap:.75rem;max-width:100%;white-space:nowrap;vertical-align:baseline}
.public-prayer-entry .public-prayer-banner__arrow{display:block;flex:0 0 1.5rem;width:1.5rem;height:1.5rem;color:var(--gold-hi)}
.public-prayer-entry>.public-prayer-banner:hover{color:#E8D194;border-color:#C9A84C88}.public-prayer-entry>.public-prayer-banner:focus-visible{outline:2px solid #E8D194;outline-offset:.3125rem}
@media(min-width:641px) and (max-width:1000px){.public-prayer-banner__copy{padding:1.75rem 2rem}.public-prayer-banner__lead{display:block}}
@media(max-width:640px){.public-prayer-entry>.public-prayer-banner{align-items:flex-end;min-height:20rem;font-size:1.75rem;line-height:1.25}.public-prayer-banner__copy{padding:2rem 1.5rem 1.5rem}.public-prayer-banner__mark{display:none}.public-prayer-banner__mark svg{width:1.125rem;height:1.125rem}.public-prayer-banner__mark::after{width:2.625rem}.public-prayer-banner__lead{display:block}.public-prayer-banner__art{object-position:50% 0%}.public-prayer-banner::after{background:linear-gradient(0deg,rgba(30,24,16,.76),rgba(30,24,16,.38) 24%,transparent 55%),linear-gradient(180deg,rgba(30,24,16,.12),transparent 26%)}}

.home-page #figures .mood-picker { margin-bottom: 2rem; }
.home-page #figures .mood-picker__divider { margin-top: 1.5rem; }

/* The invitation photograph ends with its own section, before the independent banner. */
.home-page #figures .mood-picker { margin-bottom: 0; padding-bottom: 1.5rem; }
.public-prayer-entry { margin-top: 2rem; }
.public-prayer-entry > .public-prayer-banner {
 border: 1.5rem solid #A07C30;
 border-image: url('../images/prayer-antique-frame-v340.webp') 10.7% / 1.5rem / 0 round;
 border-radius: 0;
 box-shadow: 0 2px .25rem rgb(0 0 0 / 50%), 0 .75rem 1.75rem rgb(0 0 0 / 45%);
}
.public-prayer-banner::before {
 content: "";
 position: absolute;
 inset: 0;
 z-index: 3;
 pointer-events: none;
 border: 1px solid #74561C;
 box-shadow: inset 0 0 .75rem .1875rem rgb(0 0 0 / 50%);
}
.public-prayer-entry > .public-prayer-banner { align-items: flex-end; text-align: center; font-size: clamp(2.375rem, 4.5vw, 4rem); font-weight: 500; color: #E8D194; }
.public-prayer-banner__copy { padding: 2.125rem 1.5rem 2rem; text-shadow: 0 2px .5rem rgb(30 24 16 / 65%); }
.public-prayer-banner__mark { display: none; }
.public-prayer-banner__mark::after { content: none; }
.public-prayer-entry__label { color: #E8D194; letter-spacing: .035em; text-shadow: 0 2px .5rem rgb(30 24 16 / 65%); }
.public-prayer-banner__lead { display: inline; }
.public-prayer-banner__last { position: relative; gap: 0; }
.public-prayer-entry .public-prayer-banner__arrow { position: absolute; left: calc(100% + .875rem); top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: #E8D194; opacity: .65; }
@media(max-width:640px) {
 .public-prayer-entry > .public-prayer-banner { align-items: flex-end; border-width: .875rem; border-image-width: .875rem; font-size: clamp(1.625rem, 7.2vw, 2.5rem); }
 .public-prayer-banner__copy { padding: 2rem 1rem; }
 .public-prayer-banner__lead { display: inline; }
 .public-prayer-entry .public-prayer-banner__arrow { display: none; }
}

.home-page #figures .mood-picker::before { inset-inline: 0; }

/* The painting stays clear; its invitation is a separate link below the frame. */
.public-prayer-entry > .public-prayer-banner {
 min-height: 0;
 display: block;
 background: transparent;
 border: 0;
 border-image: none;
 border-radius: 0;
 box-shadow: none;
}
.public-prayer-banner::before { content: none; }
.public-prayer-banner::after { content: none; }
.public-prayer-entry .public-prayer-banner__art { position: static; width: 100%; height: auto; max-height: none; object-fit: contain; object-position: center; }
@media(max-width:640px) {
 .public-prayer-entry > .public-prayer-banner { min-height: 0; }
}
.public-prayer-link {
 display: block;
 width: fit-content;
 max-width: 100%;
 margin: 1.5rem auto 0;
 padding: .375rem 1.875rem;
 color: #E8D194;
 font: 500 clamp(1.75rem, 3vw, 2.625rem)/1.5 var(--serif);
 text-align: center;
 text-decoration: none;
}
.public-prayer-link:hover { color: #E8D194; }
.public-prayer-link:focus-visible { outline: 2px solid #E8D194; outline-offset: .3125rem; }
.public-prayer-link .public-prayer-entry__label { color: inherit; text-shadow: none; padding-bottom: .08em; border-bottom: 1px solid rgb(232 209 148 / 45%); }
@media(max-width:640px) {
 .public-prayer-link { margin-top: 1.125rem; padding: .375rem .625rem; font-size: clamp(1.5rem, 6.5vw, 1.875rem); }
}

/* Prayer topics grouped by category; .tone-cat keeps the parent grid */
#pray .tone-cat { display: contents; }
#pray .tone-cat__title { grid-column: 1 / -1; margin: .625rem 0 -2px; font-family: "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-weight: 700; font-size: .9375rem; letter-spacing: .12em; color: #E8D194; }
#pray .tone-cat:first-child .tone-cat__title { margin-top: 0; }

/* Narrow landscape phones also need the mobile frame to fit the page gutter. */
@media (min-width: 481px) and (max-width: 640px) {
  #pray :where(.generator-input, .generator-topics, .verse-card, #resultBox) { --fb: 4rem; }
  #pray :where(.verse-card) { --fb: 2.875rem; }
}

/* The page stays visible: only the physical cross and Bible are opaque. */
.prayer-veil { --pv-caption: 5.75rem; position: fixed; inset: 0; z-index: 2147483000; isolation: isolate; overflow: hidden; background: rgb(30 24 16 / 22%); color: #E8D194; outline: none; opacity: 0; transition: opacity .45s cubic-bezier(.4,0,.2,1); }
.prayer-veil.is-open { opacity: 1; }
.pv-atmosphere { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%,#E8D19414,transparent 65%); animation: pv-atmosphere-in 1.2s ease-out both; }
.pv-visual { position: absolute; inset: 0 0 var(--pv-caption); pointer-events: none; }
.pv-stage { position: absolute; left: 50%; top: 50%; width: min(100vw, calc((100dvh - var(--pv-caption)) * 1.776833)); aspect-ratio: 1672 / 941; transform: translate(-50%, -50%); }
.pv-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.pv-cross-wrap { position: absolute; left: 36.4833%; top: 10.9702%; width: 27.2129%; height: 66.95%; }
.pv-cross { filter: brightness(.92); object-fit: contain; display: block; width: 100%; height: 100%; opacity: 0; animation: pv-subject-in 1.4s .35s ease-in-out both; }
.pv-pulse { position: absolute; left: 50%; top: 35%; width: 130%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%,-50%); background: radial-gradient(circle,#F3EAD840,transparent 65%); mix-blend-mode: screen; opacity: 0; animation: pv-pulse 1.3s .8s ease-in-out both; }
.pv-book, .pv-book-light { position: absolute; left: 20.933%; top: 67.2%; width: 57.4163%; height: 34.006%; opacity: 0; animation: pv-subject-in 1.4s .35s ease-in-out both; }
.pv-book-light { mix-blend-mode: screen; }
.pv-book-glow { position: absolute; left: -10%; right: -10%; top: -135%; height: 300%; background: radial-gradient(ellipse at 50% 48%,#F3EAD83d 0%,#E8D1942b 12%,#C9A84C16 30%,transparent 63%); filter: blur(.875rem); mix-blend-mode: screen; animation: pv-breathe 6s 1.75s ease-in-out infinite; }
.pv-book-glow::before { content: ""; position: absolute; left: 37%; top: -5%; width: 26%; height: 67%; background: radial-gradient(ellipse at 50% 78%,#F3EAD838,#E8D1941c 38%,transparent 72%); filter: blur(.9375rem); }
.pv-book-still { position: absolute; inset: 0; display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 .5rem #E8D1944d) drop-shadow(0 0 1.75rem #C9A84C4d); }
.pv-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pv-volume, .pv-reflections { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pv-reflections { mix-blend-mode: normal; }
.prayer-veil.is-leaving { opacity: 0; }
.prayer-veil.is-leaving .pv-book-glow { animation: pv-gather .45s ease-in both; }
@keyframes pv-light-breathe { 0%,100% { opacity: .82; } 50% { opacity: 1; } }
@keyframes pv-atmosphere-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pv-light-in { from { opacity: 0; transform: scaleY(.5); transform-origin: 50% 0; } to { opacity: 1; transform: none; } }
@keyframes pv-subject-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pv-pulse { 0%,100% { opacity: 0; } 45% { opacity: .5; } }
@keyframes pv-breathe { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes pv-gather { to { opacity: 0; transform: scale(.2); } }
.pv-reveal { animation: pv-line .65s ease-out both; animation-delay: calc(min(var(--pv-i,0),8) * 100ms); }
@keyframes pv-line { from { opacity: 0; transform: translateY(.4375rem); } to { opacity: 1; transform: none; } }
#resultSection { scroll-margin-top: 5.625rem; outline: none; }
.prayer-retry { display: block; margin: .75rem auto 0; padding: .625rem 1.5rem; color: #E8D194; background: #2C1A0E; border: 1px solid #A07C30; font: inherit; cursor: pointer; }
.prayer-retry:focus-visible { outline: 2px solid #E8D194; outline-offset: .1875rem; }
@media (max-aspect-ratio: 1.08/1) {
  .pv-visual { inset: 0; }
  .pv-stage { inset: 0; width: 100%; height: 100%; aspect-ratio: auto; transform: none; }
  .pv-cross-wrap { left: 50%; top: 7%; height: 60%; width: min(88vw,44dvh); transform: translateX(-50%); }
  .pv-book, .pv-book-light { left: 50%; top: 58%; width: min(94vw,64dvh); height: auto; aspect-ratio: 3/1; transform: translateX(-50%); }
}
@media (max-height: 540px) {
  .prayer-veil { --pv-caption: 4.5rem; }
}
.prayer-veil.is-reduced *, .prayer-veil.is-reduced { animation: none !important; }
.prayer-veil.is-reduced :is(.pv-atmosphere,.pv-cross,.pv-book,.pv-book-light,.pv-book-still) { opacity: 1; }
.prayer-veil.is-reduced .pv-cross { transform: none; }
.prayer-veil.is-reduced :is(.pv-dust,.pv-volume,.pv-reflections,.pv-pulse) { display: none; }
.prayer-veil.is-reduced { transition-duration: .16s; }
@media (prefers-reduced-motion: reduce) {
  .pv-reveal, .prayer-veil, .prayer-veil * { animation: none !important; }
  .prayer-veil :is(.pv-atmosphere,.pv-cross,.pv-book,.pv-book-light,.pv-book-still) { opacity: 1; }
  .prayer-veil :is(.pv-dust,.pv-volume,.pv-reflections,.pv-pulse) { display: none; }
  .prayer-veil { transition-duration: .16s; }
}

/* say.church header logo — inline SVG cross + real web text.
   Pair with the snippet in snippet.html. No animation, so nothing to gate behind
   prefers-reduced-motion; the media query at the end just guarantees it. */

.brand {
  --brand-h: 2.75rem;                 /* overall logo height (cross SVG box) */
  --brand-fs: 2.9375rem;                /* wordmark size: 'h' ascender to 'y' descender ≈ visible cross height */
  display: inline-flex;
  align-items: center;
  /* the crossbar stops ~22% short of the viewBox edge (room for the glow),
     so a tiny gap still gives a clear visual gap */
  gap: calc(var(--brand-h) * 0.06);
  height: var(--brand-h);
  line-height: 1;
  text-decoration: none;
  /* deliberately no background / border / padding box */
}

.brand:focus-visible {
  outline: 2px solid #E8D194;
  outline-offset: .25rem;
  border-radius: .25rem;
}

.brand__cross {
  display: block;
  height: var(--brand-h);
  width: var(--brand-h);           /* viewBox is square (0 0 64 64); cross spans y 2..62 */
  flex: none;
  overflow: visible;               /* glow, rays and halo spill a little past the top edge */
}

.brand__text {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: var(--brand-fs);
  letter-spacing: -0.01em;
  white-space: nowrap;
  /* gold gradient clipped to the glyphs */
  background: linear-gradient(180deg, #F3EAD8 0%, #E8D194 38%, #E8D194 58%, #A07C30 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  /* text-shadow would paint *under* the transparent fill and show through it,
     so the glow is a filter on the already-clipped result instead */
  filter: drop-shadow(0 0 .375rem rgba(232, 209, 148, 0.28));
  /* optical nudge: centre the ink (ascender..descender) rather than the line box on the cross */
  transform: translateY(-0.07em);
}

/* the '.' becomes a round gold dot: the glyph stays in the DOM (copy/paste and screen
   readers still get "say.church") but is transparent and clipped inside the dot's box */
.brand__dot {
  display: inline-block;
  width: 0.13em;                   /* ≈ Playfair's stem width */
  height: 0.13em;
  margin: 0 0.07em 0 0.06em;       /* breathing room each side ('y' has a wide right serif already) */
  border-radius: 50%;
  overflow: hidden;                /* makes the inline-block's baseline its bottom edge -> dot sits on the baseline */
  vertical-align: baseline;
  background: radial-gradient(circle at 35% 30%, #F3EAD8 0%, #E8D194 50%, #A07C30 100%);
}

@media (max-width: 600px) {
  .brand {
    --brand-h: 2rem;
    --brand-fs: 2.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand, .brand * { animation: none !important; transition: none !important; }
}
