/* A steady prayer lamp: urgency is also conveyed in words, never by color alone. */
.church-emergency {
  --emergency-ink: #f6e4c2;
  --emergency-muted: #d3bd96;
  --emergency-line: #b48949;
  --emergency-glass: #312518;
  margin: 18px 0 26px;
  padding: clamp(17px, 4vw, 26px);
  border: 1px solid var(--emergency-line);
  border-radius: 16px;
  color: var(--emergency-ink);
  background: radial-gradient(ellipse at 0 0, #9b591b36, transparent 63%), linear-gradient(135deg, #302115, #19120c);
  box-shadow: inset 0 0 0 3px #dbb36e10, 0 5px 16px #0003;
  overflow-wrap: anywhere;
}
.church-emergency[data-active="true"] {
  border-color: #d7a254;
  box-shadow: inset 0 0 0 3px #dbb36e1c, 0 0 24px #d989271c, 0 5px 16px #0003;
}
.church-emergency-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  margin: 0 0 15px;
}
.church-emergency-heading > div { min-width: 0; }
.church-emergency .church-emergency-eyebrow {
  margin: 0 0 5px;
  color: #efc47d;
  font: 650 11px/1.5 system-ui, sans-serif;
  letter-spacing: .15em;
}
.church-emergency-heading h2 {
  margin: 0;
  color: var(--emergency-ink);
  font: 400 clamp(26px, 5.5vw, 36px)/1.15 Georgia, serif;
}
.church-emergency .church-emergency-summary {
  margin: 8px 0 0;
  color: var(--emergency-muted);
  font: 15px/1.5 Georgia, serif;
}
/* The supplied GIF already has transparent corners; preserve all artwork and frames. */
.church-emergency-art { display:block; width:80px; height:80px; }
.church-emergency-art img { display:block; width:100%; height:100%; object-fit:contain; }
.church-emergency-heading { grid-template-columns:80px minmax(0,1fr); }
.church-emergency-rest { display:grid;place-items:center;width:64px;height:64px;border:1px solid var(--emergency-line);border-radius:50%;color:var(--emergency-muted); }
.church-emergency-rest svg { width:35px;height:35px; }
.church-emergency .church-emergency-note {
  margin: 0 0 17px;
  color: var(--emergency-muted);
  font: 12px/1.55 system-ui, sans-serif;
}
.church-emergency-request {
  padding: 18px 0;
  border-top: 1px solid #ba8d4659;
  min-width: 0;
}
.church-emergency-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--emergency-muted);
  font: 12px/1.5 system-ui, sans-serif;
}
.church-emergency-meta p { margin: 0; }
.church-emergency-request h3 {
  margin: 12px 0 8px;
  color: var(--emergency-ink);
  font: 400 clamp(23px, 4.6vw, 29px)/1.25 Georgia, serif;
}
.church-emergency-request .church-copy {
  color: var(--emergency-ink);
  font: 18px/1.6 Georgia, serif;
  margin: 0 0 15px;
}
.church-emergency .church-card-actions { gap: 8px; }
.church-emergency .church-card-actions button,
.church-emergency-actions > button {
  max-width: 100%;
  min-height: 44px;
  white-space: normal;
}
.church-emergency .church-card-actions button:not([data-church-action="pray"]) {
  color: var(--emergency-ink);
  border-color: #a47b45;
  background: #ffffff05;
}
.church-emergency-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 14px;
  border-top: 1px solid #ba8d4659;
}
.church-emergency-actions > a,
.church-emergency-settings > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--emergency-ink, #64421a);
  font: 15px/1.4 Georgia, serif;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.church-emergency[data-active="false"] {
  border-color: #947348;
  box-shadow: none;
  background: #ffffff03;
}
.church-emergency[data-active="false"] .church-emergency-heading h2 { font-size: 25px; }
.church-emergency[data-active="false"] .church-emergency-eyebrow { color: var(--emergency-muted); }
.church-emergency-settings .church-card-actions { margin-bottom: 4px; }
.church-dialog .church-emergency-choice {
  min-width: 0;
  margin: 18px 0;
  padding: 13px 14px;
  border: 1px solid #bd934e;
  border-radius: 10px;
  background: #c9943912;
}
.church-dialog .church-emergency-choice .church-check {
  margin: 0;
  align-items: flex-start;
  line-height: 1.4;
}
.church-dialog .church-emergency-choice input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 2px;
  flex: 0 0 20px;
}
.church-dialog .church-emergency-help {
  margin: 10px 0 0;
  color: #d3bd96;
  font: 12px/1.55 system-ui, sans-serif;
}
.church-emergency :is(button, a):focus-visible,
.church-emergency-settings :is(button, a):focus-visible,
.church-emergency-choice input:focus-visible {
  outline: 3px solid #edbf6e;
  outline-offset: 4px;
}
:root[data-theme="heirloom_light"] .church-emergency {
  --emergency-ink: #402913;
  --emergency-muted: #735431;
  --emergency-line: #b68b4b;
  --emergency-glass: #e5d7bb;
  background: radial-gradient(ellipse at 0 0, #efbd5f3d, transparent 65%), linear-gradient(130deg, #fff8e8, #f3e3c4);
  box-shadow: inset 0 0 0 3px #fff9eacc, 0 4px 14px #6a45151a;
}
:root[data-theme="heirloom_light"] .church-emergency[data-active="true"] {
  border-color: #b17a2e;
  box-shadow: inset 0 0 0 3px #fff9eacc, 0 0 21px #bd7a1e16, 0 4px 14px #6a45151a;
}
:root[data-theme="heirloom_light"] .church-emergency .church-emergency-eyebrow { color: #85501b; }
:root[data-theme="heirloom_light"] .church-emergency[data-active="false"] {
  border-color: #ba9d71;
  background: #fbf3e5aa;
  box-shadow: none;
}
:root[data-theme="heirloom_light"] .church-emergency .church-card-actions button:not([data-church-action="pray"]) {
  border-color: #ae8952;
  background: #fffaf026;
  color: #5b3e20;
}
:root[data-theme="heirloom_light"] .church-dialog .church-emergency-choice { background: #d5a44e14; }
:root[data-theme="heirloom_light"] .church-dialog .church-emergency-help { color: #735431; }
:root[data-theme="heirloom_light"] :is(.church-emergency, .church-emergency-settings) :is(button, a):focus-visible,
:root[data-theme="heirloom_light"] .church-emergency-choice input:focus-visible { outline-color: #88561c; }
@media (max-width: 360px) {
  .church-emergency-heading { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .church-emergency-art { width:64px;height:64px; }
  .church-emergency-heading h2 { font-size: 25px; }
  .church-emergency .church-card-actions button { flex: 1 1 auto; }
}
/* Keep the separate prayer-list marker steady. */
.church-urgent-light { animation: none; }

/* Use the supplied red praying-hands GIF on each active urgent request. */
.church-prayer .church-prayer-beacon {
  display:block;flex:0 0 64px;width:64px;height:64px;
}
.church-prayer-beacon img {
  display:block;width:100%;height:100%;object-fit:contain;
}
