/* Prayer Requests (prayer.html): one calm card, big touch targets, works one-handed on a phone. */
:root {
  --green-deep: #0F3D2E; --green: #14532D; --gold: #C6A24D; --gold-bright: #E7C873;
  --cream: #FAF3E4; --paper: #FFFDF8; --ink: #241C12; --ink-soft: #5A5040; --line: rgba(36, 28, 18, .14);
  --danger: #8C2F2F;
  --display: 'Fraunces', Georgia, serif; --body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.pr {
  margin: 0; min-height: 100vh; font-family: var(--body); color: var(--ink); line-height: 1.55;
  background: radial-gradient(1200px 600px at 50% -10%, #1B5A41 0%, var(--green-deep) 55%) top / 100% 520px no-repeat, var(--cream);
}

.pr-top { padding: 18px 16px 0; max-width: 1040px; margin: 0 auto; }
.pr-home { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 600; line-height: 1.1; }
.pr-home img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(231, 200, 115, .5); }
.pr-home small { display: block; font-family: var(--body); font-weight: 500; font-size: .72rem; color: #CFE0D6; letter-spacing: .02em; }

.pr-main { max-width: 1040px; margin: 0 auto; padding: 28px 16px 48px; display: grid; gap: 28px; }
@media (min-width: 900px) { .pr-main { grid-template-columns: 1fr 1.15fr; align-items: start; padding-top: 56px; } .pr-intro { position: sticky; top: 32px; } }

.pr-intro { color: #fff; }
.pr-kicker { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-bright); }
.pr-intro h1 { margin: 0 0 12px; font-family: var(--display); font-weight: 600; font-size: clamp(2.1rem, 6vw, 3.2rem); line-height: 1.08; }
.pr-intro h1 em { font-style: italic; font-weight: 500; color: var(--gold-bright); }
.pr-lede { margin: 0 0 18px; font-size: 1.05rem; color: #E3EEE7; max-width: 34em; }
.pr-verse { margin: 0; padding-left: 14px; border-left: 3px solid var(--gold); font-family: var(--display); font-style: italic; font-size: 1.02rem; color: #F3EBD6; }
.pr-verse span { display: block; margin-top: 4px; font-family: var(--body); font-style: normal; font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--gold-bright); }
@media (min-width: 900px) { .pr-intro { padding-top: 12px; } }
@media (max-width: 899px) { .pr-intro .pr-verse { display: none; } }

.pr-card { background: var(--paper); border-radius: 18px; padding: 24px 20px; box-shadow: 0 2px 4px rgba(36, 28, 18, .06), 0 18px 48px rgba(15, 61, 46, .22); }
@media (min-width: 560px) { .pr-card { padding: 32px 30px; } }

.pr-field { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.pr-field > label, .pr-field legend { display: block; margin-bottom: 8px; padding: 0; font-weight: 700; font-size: .98rem; }
.pr-opt { font-weight: 500; color: var(--ink-soft); font-size: .85rem; }
input[type=text], textarea {
  width: 100%; font: inherit; font-size: 1.05rem; /* 16px+ keeps iPhones from zooming in */
  color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 140px; }
input[type=text]:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(20, 83, 45, .14); }
.pr-invalid input, .pr-invalid textarea { border-color: var(--danger); }
.pr-error { display: none; margin: 6px 0 0; font-size: .88rem; font-weight: 600; color: var(--danger); }
.pr-invalid .pr-error { display: block; }
.pr-under { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pr-count { margin-top: 6px; margin-left: auto; font-size: .8rem; color: var(--ink-soft); white-space: nowrap; }

.pr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-chips button {
  font: inherit; font-size: .93rem; font-weight: 600; color: var(--ink); background: #fff; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px; min-height: 44px;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.pr-chips button:active { transform: scale(.97); }
.pr-chips button[aria-pressed=true] { background: var(--green); border-color: var(--green); color: #fff; }
.pr-chips button:focus-visible, .pr-submit:focus-visible, .pr-choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.pr-choices { display: grid; gap: 10px; }
.pr-choice { display: block; cursor: pointer; }
.pr-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pr-choice span { display: block; padding: 13px 16px 13px 46px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; position: relative; transition: border-color .15s, background .15s; }
.pr-choice span::before { content: ""; position: absolute; left: 16px; top: 16px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #B9AE98; background: #fff; }
.pr-choice b { display: block; font-size: .98rem; }
.pr-choice small { display: block; font-size: .86rem; color: var(--ink-soft); }
.pr-choice input:checked + span { border-color: var(--green); background: #F1F7F3; }
.pr-choice input:checked + span::before { border-color: var(--green); background: radial-gradient(circle, var(--green) 0 45%, #fff 50%); }

.pr-check { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; min-height: 44px; }
.pr-check input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.pr-contact { margin-top: 10px; }
.pr-contact label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }

.pr-privacy { margin: 0 0 16px; font-size: .82rem; color: var(--ink-soft); }
.pr-submit {
  width: 100%; min-height: 54px; font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--green-deep); cursor: pointer;
  border: 0; border-radius: 14px; background: linear-gradient(180deg, #F0D78E, var(--gold)); box-shadow: 0 6px 18px rgba(198, 162, 77, .35);
  transition: transform .1s, filter .15s;
}
.pr-submit:hover { filter: brightness(1.04); }
.pr-submit:active { transform: translateY(1px); }
.pr-submit[disabled] { cursor: progress; filter: saturate(.6); }
.pr-submit[disabled] span::after { content: ""; display: inline-block; width: 16px; height: 16px; margin-left: 10px; vertical-align: -2px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pr-spin .8s linear infinite; }
@keyframes pr-spin { to { transform: rotate(360deg); } }
.pr-send-error { text-align: center; }
.pr-send-error.on { display: block; }

.pr-done { text-align: center; animation: pr-in .5s ease both; }
.pr-done:focus { outline: none; }
.pr-done-icon { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.pr-done h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 600; font-size: 1.8rem; color: var(--green-deep); }
.pr-done > p { margin: 0 0 18px; color: var(--ink-soft); }
.pr-done .pr-verse { text-align: left; color: var(--ink); max-width: 30em; margin: 0 auto 22px; }
.pr-done .pr-verse span { color: #8A6D24; }
.pr-done-actions { display: grid; gap: 12px; justify-items: center; }
.pr-link { color: var(--green); font-weight: 600; }
@keyframes pr-in { from { opacity: 0; transform: translateY(10px); } }

.pr-foot { text-align: center; padding: 0 16px 32px; font-size: .8rem; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- name suggestions from the members list, and the visitor note ---- */
.pr-suggest-wrap { position: relative; }
.pr-suggest {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  max-height: 280px; overflow-y: auto; background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 34px rgba(15, 61, 46, .18);
}
.pr-suggest li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.pr-suggest li[aria-selected=true], .pr-suggest li:hover { background: #F1F7F3; }
.pr-suggest .nm { font-weight: 600; }
.pr-suggest mark { background: none; color: var(--green); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.pr-badge { flex: none; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #E4F0E8; color: var(--green); white-space: nowrap; }
.pr-badge.visitor { background: #F1E6CC; color: #7A5E17; }
.pr-found { margin: 8px 0 0; display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 600; color: var(--green); }
.pr-visitor { background: #FBF6EA; border: 1.5px dashed rgba(198, 162, 77, .6); border-radius: 14px; padding: 14px; }
.pr-visitor-note { margin: 0 0 12px; font-size: .93rem; }
.pr-visitor label { display: block; margin-bottom: 6px; font-weight: 700; font-size: .93rem; }
select {
  width: 100%; font: inherit; font-size: 1.02rem; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px; min-height: 48px;
}
select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(20, 83, 45, .14); }
[hidden] { display: none !important; }

/* ---- the prayer list: one card per prayer item ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pr-items-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pr-label { margin: 0; font-family: var(--body); font-size: .98rem; font-weight: 700; }
.pr-welcome { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: #EEF6F1; border: 1.5px solid rgba(20, 83, 45, .25); font-size: .93rem; }
.pr-welcome b { color: var(--green); }
.pr-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pr-item { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 12px 12px; transition: border-color .15s, background .15s; }
.pr-item:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(20, 83, 45, .10); }
.pr-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pr-item-num { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--green-deep); color: var(--gold-bright); font-size: .8rem; font-weight: 700; }
select.pr-topic {
  flex: 1; min-width: 0; width: auto; min-height: 40px; padding: 7px 34px 7px 12px; border-radius: 999px; font-size: .93rem; font-weight: 600;
  color: var(--ink-soft); background: #FBF6EA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A5040' stroke-width='1.8'/%3E%3C/svg%3E") right 13px center / 11px no-repeat;
  -webkit-appearance: none; appearance: none; border: 1.5px dashed rgba(198, 162, 77, .7);
}
select.pr-topic.set { color: var(--green); background-color: #EEF6F1; border: 1.5px solid rgba(20, 83, 45, .35); }
.pr-remove { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #8A7F6C; font-size: 1rem; cursor: pointer; }
.pr-remove:hover, .pr-remove:focus-visible { background: #F6E4E1; color: var(--danger); }
textarea.pr-item-text { min-height: 64px; resize: none; overflow-y: auto; padding: 10px 12px; font-size: 1.02rem; border-radius: 12px; }
.pr-item:focus-within textarea.pr-item-text:focus { box-shadow: none; }
.pr-item-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 8px; }
.pr-answered { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: .93rem; }
.pr-answered input { width: 22px; height: 22px; accent-color: var(--green); }
.pr-since { font-size: .78rem; color: var(--ink-soft); }
.pr-item.answered { background: #F1F8F3; border-color: rgba(20, 83, 45, .45); }
.pr-item.answered .pr-answered { background: var(--green); border-color: var(--green); color: #fff; }
.pr-item.answered textarea.pr-item-text { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(20, 83, 45, .5); background: transparent; }
.pr-add {
  width: 100%; margin-top: 12px; min-height: 50px; font: inherit; font-weight: 700; font-size: 1rem; color: var(--green); cursor: pointer;
  background: transparent; border: 2px dashed rgba(20, 83, 45, .35); border-radius: 14px; transition: background .15s, border-color .15s;
}
.pr-add:hover, .pr-add:focus-visible { background: #EEF6F1; border-color: var(--green); outline: none; }
.pr-add span { font-size: 1.15rem; margin-right: 4px; }
.pr-invalid .pr-item:first-child { border-color: var(--danger); }
.pr-done-keep { margin: -6px auto 18px !important; max-width: 30em; font-size: .9rem; color: var(--ink-soft); background: #FBF6EA; border-radius: 12px; padding: 10px 14px; }

/* the link to the picture guide (prayer-guide.html) */
.pr-howto { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; min-height: 44px; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .95rem; color: #fff; text-decoration: none; background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(231, 200, 115, .6); }
.pr-howto:hover, .pr-howto:focus-visible { background: rgba(255, 255, 255, .18); outline: none; }
