/* 기도의 시간 — 전체 페이지 + 홈 dialog 공용 */
:root {
  --pr-ink: #1a1814;
  --pr-muted: #5a534a;
  --pr-bg: #faf6f2;
  --pr-card: #fff;
  --pr-accent2: #a84878;
  --pr-font: "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.prayer-page {
  font-family: var(--pr-font);
  font-size: 18px;
  line-height: 1.55;
  color: var(--pr-ink);
  background: var(--pr-bg);
}

.prayer-page .wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 0.85rem 1rem 3rem;
}
.prayer-page .back {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 16px;
  font-weight: 700;
  color: var(--pr-accent2);
  text-decoration: none;
}
.prayer-page .back:hover {
  text-decoration: underline;
}

.pr-page-title {
  margin: 0 0 0.25rem;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #8a4a6a;
}
.pr-page-h1 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #3a2434;
}

.pr-loading {
  text-align: center;
  color: var(--pr-muted);
  padding: 2rem;
}

.pr-meta {
  font-size: 14px;
  color: var(--pr-muted);
  margin: 0 0 1rem;
  line-height: 1.45;
}
.pr-meta--warn {
  color: #6a5344;
  background: #fff8ee;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid #edd;
}

.pr-h2 {
  margin: 1.35rem 0 0.65rem;
  font-size: 17px;
  font-weight: 800;
  color: var(--pr-accent2);
  letter-spacing: -0.02em;
}
.pr-verse {
  margin: 0;
  padding: 1rem 1.05rem;
  background: var(--pr-card);
  border-radius: 16px;
  border: 1px solid #eadce4;
  box-shadow: 0 8px 24px rgba(80, 40, 60, 0.06);
}
.pr-verse__ko {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
  color: #2a1f28;
}
.pr-verse__en {
  margin: 0.5rem 0 0;
  font-size: 16px;
  color: var(--pr-muted);
  font-weight: 600;
}
.pr-verse__ref {
  margin: 0.6rem 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #5a4d69;
}

.pr-steps {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.pr-step {
  padding: 0.95rem 1rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ebe0e6;
}
.pr-step__title {
  margin: 0 0 0.45rem;
  font-size: 16px;
  font-weight: 800;
  color: #4a3044;
}
.pr-step__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(168, 72, 120, 0.15);
  color: var(--pr-accent2);
  font-size: 13px;
  margin-right: 0.2rem;
}
.pr-step__body {
  margin: 0;
  font-size: 16px;
  color: #4a453c;
  font-weight: 600;
  line-height: 1.5;
}

.pr-tip {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  font-size: 15px;
  color: #5c4a3a;
  background: linear-gradient(180deg, #fffbf5, #fff);
  border: 1px solid #e8d4c4;
  border-radius: 14px;
  line-height: 1.45;
}

.pr-lead {
  margin: 0 0 0.65rem;
  font-size: 15px;
  color: var(--pr-muted);
  font-weight: 600;
}

.pr-cat-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.pr-cat {
  padding: 0.85rem 0 0;
}
.pr-cat__title {
  margin: 0 0 0.35rem;
  font-size: 17px;
  font-weight: 800;
  color: #4a3044;
  letter-spacing: -0.02em;
}
.pr-cat__hint {
  margin: 0 0 0.65rem;
  font-size: 14px;
  font-weight: 600;
  color: #7a7268;
  line-height: 1.4;
}
.pr-cat__empty {
  margin: 0;
  font-size: 15px;
  color: #9a9288;
  font-style: italic;
}

.pr-witness {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0faf4, #f8fdf9);
  border: 1px solid #c5e6d4;
}
.pr-witness__title {
  margin: 0 0 0.35rem;
  font-size: 15px;
  font-weight: 800;
  color: #1f6b4d;
}
.pr-witness__sub {
  margin: 0;
  font-size: 14px;
  color: #4a5c52;
  line-height: 1.45;
}

.pr-topics__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pr-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 12px 10px;
  margin-bottom: 8px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8dfe4;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pr-item--answered {
  background: linear-gradient(135deg, #f0faf6, #e8f5ef);
  border-color: #8fd4b8;
  box-shadow: 0 4px 16px rgba(31, 107, 77, 0.12);
}
.pr-item__row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.pr-item__cb {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  margin-top: 2px;
  accent-color: #1f6b4d;
  cursor: pointer;
}
.pr-item__text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  color: #2a1f28;
  flex: 1;
}
.pr-item--answered .pr-item__text {
  color: #145a3f;
}
.pr-item__done {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  padding: 0.25rem 0.45rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f9d72, #4bc08e);
  color: #fff;
  align-self: center;
}
.pr-item__done[hidden] {
  display: none !important;
}
.pr-topics__rm {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: #f5e8ee;
  color: #8a3d5c;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.pr-topics__rm:hover {
  background: #edd5df;
}

.pr-form-panel {
  margin: 1rem 0;
  padding: 1rem 1.05rem 1.15rem;
  border-radius: 18px;
  border: 2px solid #e8c4d4;
  background: #fff;
  box-shadow: 0 8px 28px rgba(120, 50, 90, 0.08);
}
.pr-form-panel__title {
  margin: 0 0 0.65rem;
  font-size: 17px;
  font-weight: 800;
  color: #4a3044;
}
.pr-pill-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}
.pr-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 15px;
  font-weight: 600;
  color: #4a453c;
  padding: 0.35rem 0;
  cursor: pointer;
}
.pr-pill input {
  width: 20px;
  height: 20px;
  accent-color: #a84878;
}
.pr-add__label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #6a5a62;
  margin-bottom: 0.35rem;
}
.pr-add__textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px 14px;
  font: inherit;
  font-size: 17px;
  border: 1px solid #d4c8ce;
  border-radius: 14px;
  resize: vertical;
  margin-bottom: 0.75rem;
}
.pr-form-panel__save {
  width: 100%;
  min-height: 52px;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  border: none;
  border-radius: 14px;
  background: linear-gradient(155deg, #a84878, #c97aa5);
  color: #fff;
  cursor: pointer;
}
.pr-form-panel__save:active {
  transform: scale(0.99);
}

.pr-big-add {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  min-height: 58px;
  padding: 16px 18px;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(155deg, #1a6b4d, #2f9d72);
  box-shadow: 0 12px 32px rgba(31, 107, 77, 0.35);
}
.pr-big-add:active {
  transform: scale(0.99);
}

/* 홈 등 — 플로팅 기도 버튼 */
.prayer-fab {
  position: fixed;
  z-index: 50;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, #a84878, #d97aa5);
  color: #fff;
  box-shadow: 0 10px 28px rgba(120, 50, 90, 0.4);
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.12s ease;
}
.prayer-fab:active {
  transform: scale(0.96);
}

/* 홈 — 기도 팝업 */
.prayer-dlg {
  max-width: 520px;
  width: calc(100vw - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  font-family: var(--pr-font);
  font-size: 16px;
  color: var(--pr-ink);
}
.prayer-dlg::backdrop {
  background: rgba(18, 14, 22, 0.48);
}
.prayer-dlg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(155deg, #a84878, #d97aa5);
  color: #fff;
}
.prayer-dlg__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.prayer-dlg__close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.prayer-dlg__close:hover {
  background: rgba(255, 255, 255, 0.32);
}
.prayer-dlg__link {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
}
.prayer-dlg__body {
  padding: 0.65rem 0.85rem 1rem;
  max-height: min(75dvh, 640px);
  overflow-y: auto;
  background: var(--pr-bg);
}
