/* ============================================
   Guided Mass - Elegant Dark Theme
   (Same dark navy Catholic aesthetic as the companion Rosary app)
   ============================================ */

:root {
  /* Deep navy dark theme - elegant and respectful */
  --bg: #0a1f3d;
  --surface: #112a4a;
  --surface-alt: #1a3659;
  --surface-elevated: #234a72;

  /* Light, readable text on dark */
  --text: #f2f0e9;
  --text-light: #d4d0c4;
  --text-muted: #a39e8f;

  /* Subtle borders for dark surfaces */
  --border: #2a4a72;
  --border-light: #3a5a82;

  /* Prayer-type specific accent colors (from infographic guidance) */
  --prayer-sign: #1e3a6e;
  --prayer-creed: #1e3a6e;
  --prayer-ourfather: #1e88e5;
  --prayer-hailmary: #9c27b0;
  --prayer-glory: #4a90d9;
  --prayer-fatima: #2e7d32;
  --prayer-hailholyqueen: #d81b60;
  --prayer-closing: #1e3a6e;

  /* Special / mystery accents */
  --mystery-purple: #7b3fa0;
  --mystery-purple-light: #9c5cc9;

  /* Legacy / fallback accents (kept for compatibility) */
  --accent: #1e88e5;
  --accent-light: #5fa3e8;
  --accent-warm: #c2185b;
  --rose: #c2185b;
  --sage: #4a8f5a;

  /* Prayer text area */
  --prayer-text: #f2f0e9;

  /* Enhanced shadows for depth on dark */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.38);

  /* Spacing */
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 200ms ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: 1.75rem; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.65rem; margin: 0 0 0.4rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.6rem; }
h4 { font-size: 1.1rem; margin: 0 0 0.35rem; }

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #7eb9f0;
}

/* Keep in-page nav from hiding under the sticky header */
#guided,
#order,
#responses {
  scroll-margin-top: 5.5rem;
}

/* Layout */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 600px) {
  .container {
    padding: 0 1rem;
  }
}

/* Header */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-soft);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.rosary-icon {
  color: var(--accent-light);
  display: flex;
  align-items: center;
}

.header-text h1 {
  font-size: 1.45rem;
  letter-spacing: -0.015em;
}

.tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.65rem;
  font-size: 0.95rem;
}

.header-nav a {
  color: var(--text-light);
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.header-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--accent-light);
}

@media (max-width: 640px) {
  .header-nav {
    gap: 1rem;
    font-size: 0.9rem;
  }
  .header-text h1 {
    font-size: 1.25rem;
  }
}

/* ============================================
   Development Notice Banner (top of page)
   Respectful, warm, fits dark elegant theme
   ============================================ */
.dev-notice {
  background: #0f284d;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.85rem;
  line-height: 1.45;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 110; /* Above sticky header */
}

.dev-notice-content {
  flex: 1;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.dev-notice-content p {
  margin: 0 0 0.2rem;
}

.dev-notice-content p:last-child {
  margin-bottom: 0;
}

.dev-notice-follow {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dev-notice .x-link {
  color: #c5a3e8;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease;
}

.dev-notice .x-link:hover {
  color: #d9c1f0;
  text-decoration: underline;
}

.dev-notice .x-icon {
  width: 11px;
  height: 11px;
  vertical-align: -1px;
  margin-right: 3px;
  opacity: 0.9;
}

.dev-notice-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  opacity: 0.75;
  transition: all 150ms ease;
  border-radius: 4px;
  flex-shrink: 0;
}

.dev-notice-close:hover {
  color: #e8b4b4;
  opacity: 1;
  background: rgba(255,255,255,0.06);
}

@media (max-width: 600px) {
  .dev-notice {
    font-size: 0.8rem;
    padding: 0.5rem 0.85rem;
  }
  .dev-notice-content p {
    margin-bottom: 0.1rem;
  }
  .dev-notice-close {
    font-size: 1rem;
    padding: 0.2rem 0.35rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
}

.btn-primary:hover {
  background-color: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30, 136, 229, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--surface-alt);
  border-color: var(--accent-light);
}

.btn-nav {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
}

.btn-nav:hover {
  background-color: var(--surface-elevated);
  border-color: var(--accent-light);
}

.btn-next {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
}

.btn-next:hover {
  background-color: #1565c0;
  border-color: #1565c0;
}

.btn-recite {
  background-color: var(--prayer-hailmary);
  color: white;
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
  min-width: 240px;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.btn-recite:hover {
  background-color: #7b1fa2;
}

/* Disabled state for the recite button (rare now that "All Hail Marys Completed"
   is kept active/clickable for decades and the final introductory Hail Mary).
   Falls back to a muted look only if disabled for other reasons. */
.btn-recite:disabled {
  background-color: var(--surface-elevated);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: default;
  box-shadow: none;
  opacity: 0.85;
}

.btn-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 999px;
}

.btn-close:hover {
  color: var(--prayer-hailholyqueen);
  border-color: var(--prayer-hailholyqueen);
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero-content {
  max-width: 620px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2.1rem;
  margin-bottom: 0.9rem;
  letter-spacing: -0.02em;
  color: #f8f6f0;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 1.8rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .hero h2 { font-size: 1.7rem; }
}

/* Instructions */
.instructions {
  padding-bottom: 2rem;
}

.instructions-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.85rem 2rem;
  box-shadow: var(--shadow-soft);
}

.instructions-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1.35rem;
  text-align: center;
  color: var(--text-light);
}

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.instruction-step {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  background: var(--surface-elevated);
  color: var(--accent-light);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.4rem;
}

/* Prayer Cards (Reference) */
.prayers-section {
  padding: 2rem 0 3rem;
}

/* Calm, helpful note explaining V. and R. format (placed near top of Prayers list) */
.prayer-vr-note {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.05rem;
  margin-bottom: 1.1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-light);
  text-align: left;
}

.prayer-vr-note p {
  margin: 0 0 0.4rem;
  font-style: italic;
}

.prayer-vr-note p strong {
  font-style: normal;
  color: var(--text);
  font-weight: 600;
}

.prayer-vr-note ul {
  margin: 0;
  padding-left: 1.15rem;
}

.prayer-vr-note li {
  margin-bottom: 0.18rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.prayer-vr-note li::marker {
  color: var(--text-muted);
  font-size: 0.9em;
}

@media (max-width: 600px) {
  .prayer-vr-note {
    padding: 0.75rem 0.95rem;
    font-size: 0.85rem;
  }
  .prayer-vr-note li {
    font-size: 0.83rem;
  }
}

.prayer-list {
  display: grid;
  gap: 1rem;
}

.prayer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--transition), transform var(--transition);
  border-left: 5px solid var(--border-light);
}

.prayer-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

/* Prayer-type specific left accent borders (elegant & readable) */
.prayer-card[data-prayer-type="sign"],
.prayer-card[data-prayer-type="creed"],
.prayer-card[data-prayer-type="closing"] {
  border-left-color: var(--prayer-sign);
}

.prayer-card[data-prayer-type="ourfather"] {
  border-left-color: var(--prayer-ourfather);
}

.prayer-card[data-prayer-type="hailmary"] {
  border-left-color: var(--prayer-hailmary);
}

.prayer-card[data-prayer-type="glory"] {
  border-left-color: var(--prayer-glory);
}

.prayer-card[data-prayer-type="fatima"] {
  border-left-color: var(--prayer-fatima);
}

.prayer-card[data-prayer-type="hailholyqueen"] {
  border-left-color: var(--prayer-hailholyqueen);
}

.prayer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.prayer-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.15rem;
}

.prayer-note {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  background: var(--surface-elevated);
  color: var(--text-light);
  border-radius: 999px;
  white-space: nowrap;
}

.prayer-text {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--prayer-text);
  margin: 0;
}

.prayer-text-small {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-top: 0.6rem;
  font-style: italic;
}

/* V. and R. labels for consistent prayer formatting (infographic style) */
.versicle,
.response {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-light);
  font-size: 0.92em;
  margin-right: 0.35rem;
  white-space: nowrap;
}

/* Concluding prayers divider */
.prayer-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

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

.prayer-divider span {
  white-space: nowrap;
}

/* Mysteries Section */
.mysteries-section {
  padding: 2rem 0 3.5rem;
  background: #0d2344;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mystery-tabs {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.tab-button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 0.55rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.tab-button:hover {
  border-color: var(--accent-light);
  color: var(--text);
}

.tab-button.active {
  background: linear-gradient(135deg, var(--accent), #1565c0);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(30, 136, 229, 0.35);
}

.mystery-panel {
  display: none;
}

.mystery-panel.active {
  display: block;
}

.mystery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.mystery-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  box-shadow: var(--shadow-soft);
  border-left: 4px solid var(--accent);
}

.mystery-item h4 {
  color: var(--accent-light);
  margin-bottom: 0.4rem;
}

.mystery-item p {
  font-size: 0.925rem;
  color: var(--text-light);
  line-height: 1.55;
  margin: 0;
}

.mystery-num {
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  line-height: 1.35rem;
  text-align: center;
  background: var(--surface-elevated);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50%;
  margin-bottom: 0.55rem;
}

/* Guided Section */
.guided-section {
  padding: 2.5rem 0 4rem;
}

.guided-container {
  max-width: 760px;
  margin: 0 auto;
}

.mystery-choice {
  text-align: center;
  margin-bottom: 0.75rem;
}

.mystery-choice h4 {
  margin: 0 0 0.35rem;
  color: var(--text-light);
  font-weight: 500;
  font-size: 1rem;
}

.mystery-choice-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

@media (max-width: 620px) {
  .mystery-choice-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mystery-choice-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 0.6rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-height: 78px; /* comfortable tap target */
}

/* Even larger tap targets for the 4 mystery set buttons on small screens */
@media (max-width: 480px) {
  .mystery-choice-btn {
    min-height: 84px;
    padding: 0.95rem 0.5rem;
  }
}

.mystery-choice-btn:hover {
  border-color: var(--mystery-purple-light);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.mystery-choice-btn:active {
  transform: scale(0.985);
  opacity: 0.95;
}

.mystery-choice-btn.active {
  border-color: var(--mystery-purple);
  background: var(--surface-elevated);
}

.mystery-choice-btn .mystery-label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
}

.mystery-choice-btn .mystery-day {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Enhanced Mystery Selection header and guidance */
.mystery-choice-header {
  margin-bottom: 0.5rem;
}

.mystery-choice-header h4 {
  margin-bottom: 0.2rem;
}

.mystery-recommendation {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.mystery-choice-btn .mystery-season {
  font-size: 0.7rem;
  color: var(--mystery-purple-light);
  margin-top: 0.15rem;
  font-weight: 500;
  line-height: 1.2;
}

/* ============================================
   Dual Mystery Selection (By Day / By Set)
   ============================================ */

.selection-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0 0.85rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

.selection-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  text-align: center;
}

.selection-tab:hover {
  color: var(--text);
}

.selection-tab.active {
  color: var(--text);
  border-bottom-color: var(--mystery-purple);
}

.selection-view {
  display: none;
}

.selection-view.active {
  display: block;
}

.view-description {
  font-size: 0.88rem;
  color: var(--text-light);
  text-align: center;
  margin: 0 0 0.65rem;
  line-height: 1.35;
}

.view-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.7rem;
}

/* Day of the Week cards - beginner friendly */
.day-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

@media (min-width: 420px) {
  .day-selection-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 640px) {
  .day-selection-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-height: 76px;
  justify-content: center;
}

/* Larger, friendlier tap targets on phones */
@media (max-width: 480px) {
  .day-card {
    min-height: 82px;
    padding: 0.7rem 0.45rem;
  }
}

.day-card:hover {
  border-color: var(--mystery-purple-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.day-card:active {
  transform: scale(0.985);
  opacity: 0.95;
}

.day-card.today {
  border-color: var(--mystery-purple);
  background: var(--surface-elevated);
  box-shadow: 0 0 0 1px var(--mystery-purple);
}

.day-card .day-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.day-card .day-mystery {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mystery-purple-light);
  line-height: 1.15;
}

/* Sunday-specific variations (compact, educational, calm) */
.day-card .sunday-variations {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  margin-top: 0.15rem;
  padding-top: 0.2rem;
  border-top: 1px solid var(--border-light);
}

.day-card .sunday-variations .variation {
  font-size: 0.66rem;
  color: var(--text-muted);
  line-height: 1.15;
}

/* Prominent confirmation button for Mystery Selection */
.mystery-confirm-container {
  margin-top: 1.1rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* Top-placed confirm button (new mobile-first layout) */
.mystery-confirm-container.mystery-confirm-top {
  margin-top: 0;
  margin-bottom: 0.9rem;
  padding-top: 0;
  padding-bottom: 0.75rem;
  border-top: none;
  border-bottom: 1px solid var(--border);
}

.mystery-confirm-container.mystery-confirm-top .mystery-confirm-hint {
  font-size: 0.75rem;
  margin-top: 0.35rem;
}

.btn-mystery-confirm {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.02rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--mystery-purple), #9c27b0);
  color: white;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(123, 63, 160, 0.35);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  cursor: pointer;
}

.btn-mystery-confirm:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(123, 63, 160, 0.45);
}

.btn-mystery-confirm:active:not(:disabled) {
  transform: translateY(0);
}

.btn-mystery-confirm:disabled {
  background: var(--surface-elevated);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.75;
}

.mystery-confirm-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.45rem 0 0;
  line-height: 1.3;
}

/* Selected state for day cards (works alongside .today) */
.day-card.selected {
  border-color: var(--mystery-purple);
  box-shadow: 0 0 0 2px rgba(123, 63, 160, 0.25);
}

/* Prayer Viewer - Elegant dark elevated card */
.prayer-viewer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Dynamic accent border on the viewer based on current prayer type */
.prayer-viewer[data-prayer-type="sign"],
.prayer-viewer[data-prayer-type="creed"],
.prayer-viewer[data-prayer-type="closing"] {
  border-left: 6px solid var(--prayer-sign);
}
.prayer-viewer[data-prayer-type="ourfather"] {
  border-left: 6px solid var(--prayer-ourfather);
}
.prayer-viewer[data-prayer-type="hailmary"] {
  border-left: 6px solid var(--prayer-hailmary);
}
.prayer-viewer[data-prayer-type="glory"] {
  border-left: 6px solid var(--prayer-glory);
}
.prayer-viewer[data-prayer-type="fatima"] {
  border-left: 6px solid var(--prayer-fatima);
}
.prayer-viewer[data-prayer-type="hailholyqueen"] {
  border-left: 6px solid var(--prayer-hailholyqueen);
}
.prayer-viewer[data-prayer-type="mystery"] {
  border-left: 6px solid var(--mystery-purple);
}

.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.35rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.progress-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  transition: width 280ms ease;
  border-radius: 999px;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.prayer-display {
  padding: 2rem 1.85rem 2.1rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.prayer-meta {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.prayer-phase {
  font-size: 0.75rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-light);
  font-weight: 600;
  background: var(--surface-elevated);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.prayer-decade {
  font-size: 0.8rem;
  color: var(--text-light);
  padding-top: 0.15rem;
  font-weight: 500;
}

.prayer-title {
  font-size: 1.45rem;
  margin: 0 0 1.15rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
}

/* Large readable prayer text container - gets type-specific left accent */
.prayer-text-container {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 1.6rem 1.8rem;
  flex: 1;
  border-left: 4px solid var(--border-light);
  transition: border-color 200ms ease;
}

/* Dynamic accent on the prayer text block */
.prayer-viewer[data-prayer-type="ourfather"] .prayer-text-container { border-left-color: var(--prayer-ourfather); }
.prayer-viewer[data-prayer-type="hailmary"] .prayer-text-container { border-left-color: var(--prayer-hailmary); }
.prayer-viewer[data-prayer-type="glory"] .prayer-text-container { border-left-color: var(--prayer-glory); }
.prayer-viewer[data-prayer-type="fatima"] .prayer-text-container { border-left-color: var(--prayer-fatima); }
.prayer-viewer[data-prayer-type="hailholyqueen"] .prayer-text-container { border-left-color: var(--prayer-hailholyqueen); }
.prayer-viewer[data-prayer-type="sign"],
.prayer-viewer[data-prayer-type="creed"],
.prayer-viewer[data-prayer-type="closing"] .prayer-text-container { border-left-color: var(--prayer-sign); }

.prayer-text-large {
  font-size: 1.18rem;
  line-height: 1.75;
  color: var(--prayer-text);
  margin: 0;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
}

.prayer-text-large .prayer-line {
  display: block;
}

.prayer-text-large .prayer-rubric {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

.prayer-text-large .prayer-gap {
  margin-top: 0.85rem;
}

.prayer-text-large .posture-instruction {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Mystery Announcement Card - Purple themed */
.mystery-display {
  margin-bottom: 1.3rem;
}

.mystery-card {
  background: linear-gradient(145deg, #1f2f55, #162a4a);
  border: 1px solid var(--border);
  border-left: 6px solid var(--mystery-purple);
  border-radius: var(--radius-sm);
  padding: 1.35rem 1.55rem;
}

.mystery-card h4 {
  font-size: 1.35rem;
  color: #c5a3e8;
  margin: 0.2rem 0 0.55rem;
}

.mystery-card p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

.mystery-number {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--mystery-purple-light);
  text-transform: uppercase;
}

/* Decade Counter */
.decade-counter {
  margin-top: 0.8rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.counter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
  color: var(--text-light);
}

.counter-value {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  font-weight: 600;
  color: var(--prayer-hailmary);
  font-size: 1rem;
  line-height: 1.15;
  text-align: right;
}

/* "Hold bead" — subtle reminder placed directly with the progress counter.
   Smaller and lighter so it doesn't compete with the number. */
.hold-bead-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  opacity: 0.85;
}

.bead-row {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.6rem 0 0.75rem;
}

.bead {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bead.filled {
  background: var(--prayer-hailmary);
  border-color: var(--prayer-hailmary);
  box-shadow: 0 1px 4px rgba(156, 39, 176, 0.5);
}

.bead:hover {
  transform: scale(1.1);
  border-color: var(--prayer-hailmary);
}

/* Smaller, distinct beads for the three introductory Hail Marys */
.bead.bead-intro {
  width: 18px;
  height: 18px;
  border-width: 1.5px;
}

.bead-row.intro-beads {
  gap: 0.55rem;
}

/* Subtle virtues labels shown under the 3 beads for the introductory section.
   Highlights the current Hail Mary being prayed (Faith, Hope, or Charity). */
.intro-virtues {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  margin-bottom: 0.15rem;
  letter-spacing: 0.01em;
}

.intro-virtues span {
  padding: 0 0.1rem;
  transition: all 120ms ease;
}

.intro-virtues span.current {
  color: var(--prayer-hailmary);
  font-weight: 600;
  background: rgba(156, 39, 176, 0.08);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
}

.intro-virtues .sep {
  opacity: 0.4;
  font-size: 0.7rem;
  margin: 0 0.15rem;
}

.counter-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.4rem;
}

/* Wrapper to nicely center the prominent Hail Mary action button (intro + decades) */
.recite-button-wrap {
  display: flex;
  justify-content: center;
  margin: 0.65rem 0 0.1rem;
}

/* Calm, respectful instruction for the start of each Hail Mary decade */
.hail-decade-instruction {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.5rem;
  opacity: 0.92;
}

/* Viewer Controls */
.viewer-controls {
  display: flex;
  gap: 0.75rem;
  padding: 1.05rem 1.35rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.viewer-controls .btn-nav {
  flex: 1;
}

/* Guided prompt */
.guided-prompt {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   New Landing / Intro Screen for Guided Rosary
   Elegant, respectful, dark Catholic aesthetic
   ============================================ */
.guided-landing {
  text-align: center;
  padding: 2.75rem 1.25rem 2.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 1rem;
}

.landing-content {
  max-width: 460px;
  margin: 0 auto;
}

.landing-icon {
  margin-bottom: 1.1rem;
  color: #c9a66b; /* Warm, elegant gold tone that complements the navy theme */
  opacity: 0.95;
  display: inline-block;
}

.landing-icon svg {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.landing-title {
  font-size: 2.05rem;
  margin: 0 0 0.45rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.landing-subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  margin: 0 0 1.65rem;
  line-height: 1.45;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.btn-landing {
  font-size: 1.08rem;
  padding: 0.95rem 2.4rem;
  min-width: 210px;
  box-shadow: 0 4px 14px rgba(30, 136, 229, 0.35);
}

.btn-landing:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30, 136, 229, 0.45);
}

.landing-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1.1rem;
  opacity: 0.85;
  font-style: italic;
}

@media (max-width: 520px) {
  .landing-title {
    font-size: 1.75rem;
  }
  .landing-subtitle {
    font-size: 0.98rem;
  }
  .btn-landing {
    width: 100%;
    padding: 0.95rem 1.5rem;
  }
}

/* ============================================
   New: Rosary Length Choice (1 Decade vs 5 Decades)
   Clean, respectful, large tappable cards
   ============================================ */
.rosary-length-choice {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.25rem 1.75rem;
  margin-bottom: 1rem;
}

.rosary-length-choice h4 {
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.length-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 1.1rem;
}

.length-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.length-card {
  background: var(--surface-elevated);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: all 180ms ease;
  text-align: left;
  display: block;
}

.length-card:hover {
  border-color: var(--mystery-purple-light);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.length-card.selected {
  border-color: var(--mystery-purple);
  background: color-mix(in srgb, var(--surface-elevated) 92%, var(--prayer-hailmary) 8%);
  box-shadow: 0 4px 12px rgba(156, 39, 176, 0.12);
}

.length-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.length-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.length-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.4;
}

.btn-length-continue {
  font-size: 1.05rem;
  padding: 0.85rem 2.8rem;
  min-width: 200px;
}

.length-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.9rem;
  opacity: 0.8;
  font-style: italic;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 520px) {
  .length-card {
    padding: 0.9rem 1rem;
  }
  .length-title {
    font-size: 1.05rem;
  }
  .btn-length-continue {
    width: 100%;
  }
}

/* ============================================
   Single Mystery Selector (for 1-Decade mode)
   Large, respectful, easy to tap cards
   ============================================ */
.single-mystery-selector {
  text-align: center;
  padding: 0.5rem 0.25rem 1rem;
}

.single-mystery-header h4 {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.single-mystery-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.single-mystery-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.single-mystery-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 160ms ease;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.single-mystery-card:hover {
  border-color: var(--prayer-hailmary);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.single-mystery-card .mystery-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--prayer-hailmary);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.single-mystery-card .mystery-content {
  flex: 1;
  min-width: 0;
}

.single-mystery-card .mystery-name {
  font-weight: 600;
  color: var(--text);
  font-size: 1.01rem;
  line-height: 1.25;
  margin-bottom: 0.15rem;
}

.single-mystery-card .mystery-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.3;
}

.single-mystery-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Responsive for the single mystery cards inside the viewer */
@media (min-width: 480px) {
  .single-mystery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-small {
  font-size: 0.8rem;
  margin-top: 0.45rem;
  opacity: 0.75;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
  .prayer-text-large {
    font-size: 1.08rem;
    line-height: 1.7;
  }
  
  .prayer-display {
    padding: 1.5rem 1.25rem 1.75rem;
  }
  
  .prayer-title {
    font-size: 1.25rem;
  }
  
  .viewer-controls {
    flex-direction: column;
  }

  /* Make the Hail Mary action button even easier to tap on small screens */
  .btn-recite {
    padding: 1.1rem 1.9rem;
    font-size: 1.02rem;
    min-width: 210px;
    max-width: 100%;
  }
}

/* Subtle focus styles for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* Print styles (for those who want to print) */
@media print {
  .site-header,
  .hero-actions,
  .viewer-controls,
  .mystery-choice,
  .btn,
  .guided-prompt {
    display: none !important;
  }
  .prayer-text-large {
    font-size: 13pt;
  }
}

/* Shake animation (for gentle reminder on decade counter) */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-3px); }
  40%, 80% { transform: translateX(3px); }
}

.shake {
  animation: shake 380ms ease;
}

/* Decade complete state */
.bead-row.complete {
  opacity: 0.95;
}

.decade-complete-note {
  text-align: center;
  color: #7bb57b;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ============================================
   Thank You screen (shown briefly after clicking Finish Rosary)
   ============================================ */
.thank-you-screen {
  padding: 3.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, #112a4a 0%, #0a1f3d 100%);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.thank-you-content {
  max-width: 360px;
}

.thank-you-icon {
  font-size: 2.75rem;
  color: var(--accent-light);
  margin-bottom: 0.9rem;
  display: block;
}

.thank-you-message {
  font-size: 1.22rem;
  line-height: 1.7;
  color: #f2f0e9;
  font-style: italic;
  margin: 0;
}

/* Make the Finish button on the final step stand out */
.btn-finish {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  font-weight: 600;
}

.btn-finish:hover {
  background-color: #1565c0 !important;
  border-color: #1565c0 !important;
  transform: translateY(-1px);
}

/* ============================================
   Guided Mass — Choice screens for decision points
   Styled to match the existing elegant cards, length-cards,
   and single-mystery-cards for perfect visual consistency.
   No changes to the core dark blue Catholic aesthetic.
   ============================================ */

.mass-choice-container {
  padding: 0.25rem 0 0.75rem;
}

.choice-intro {
  font-size: 0.95rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.choice-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem;
  }
}

.mass-choice-card {
  background: var(--surface-elevated);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  transition: all 180ms ease;
  text-align: left;
  display: block;
}

.mass-choice-card:hover {
  border-color: var(--accent-light);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.mass-choice-card:active {
  transform: scale(0.985);
}

.mass-choice-card .choice-label {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 0.2rem;
}

.mass-choice-card .choice-desc {
  font-size: 0.86rem;
  color: var(--text-light);
  line-height: 1.35;
}

.mass-choice-card.selected {
  border-color: var(--accent-light);
  background: color-mix(in srgb, var(--surface-elevated) 90%, var(--accent) 8%);
}

.choice-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

/* Dark muted green instruction boxes for all directions and guidance.
   Used for Stand / Sit / Kneel posture instructions and the inclusive
   Communion note. Deep forest/sage tone (much darker and calmer) for
   elegant, subtle emphasis alongside the dark blue theme. Solid background,
   no border, excellent contrast with light text. */
.posture-instruction,
.instruction-box {
  background: #1e463b; /* deep muted forest/sage green - solid, much darker and calmer */
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  margin: 0.5rem 0 0.85rem;
  color: var(--text);
  line-height: 1.5;
  font-size: 1rem;
}

.posture-instruction {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.4px;
}

.instruction-box {
  text-align: left;
  font-size: 0.98rem;
}

.instruction-box p {
  margin: 0 0 0.45rem;
}

.instruction-box ul {
  margin: 0.2rem 0 0;
  padding-left: 1.2rem;
  list-style: none;
}

.instruction-box li {
  margin-bottom: 0.15rem;
}

.instruction-box li::before {
  content: "• ";
  color: #3a6f5a; /* muted complementary green for bullets, matching darker box */
  margin-right: 0.25rem;
}

/* Calm, encouraging "recommended" badge for the Day Type pre-selection.
   Uses the existing purple accent to stay consistent with the design. */
.mass-choice-card .choice-recommended {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--accent-light);
  background: rgba(30, 136, 229, 0.12);
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
  margin-bottom: 0.2rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Subtle bell ringing cue boxes.
   Used at traditional moments (Sanctus, Consecration elevations).
   Dark muted grey background (e.g. #1f2529), no borders,
   calm and elegant, clearly distinguishable from green instruction boxes
   while harmonious with the overall dark blue theme. */
.bell-cue {
  background: #1f2529; /* dark muted grey - calm, subtle, no brown cast */
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  margin: 0.6rem 0 0.3rem;
  color: var(--text-light);
  font-size: 0.92rem;
  text-align: center;
  line-height: 1.35;
  font-style: italic;
}