/* ═══════════════════════════════════════════════════════════
   Visit Mary — Marian Blue Design System
   Modeled after stations.app, recolored for Our Lady
   ═══════════════════════════════════════════════════════════ */

/* Marian Blue and Gold: the mantle and crown of the Blessed Mother.
   The blue is drawn from the tradition of ultramarine (lapis lazuli),
   the pigment reserved for the Virgin in Renaissance painting.
   The gold recalls the Miraculous Medal and the Queen of Heaven. */
:root {
  --mary: oklch(0.35 0.12 250);
  --mary-foreground: oklch(0.98 0.005 250);
  --mary-light: oklch(0.93 0.03 250);
  --mary-glow: oklch(0.35 0.12 250 / 0.08);
  --mary-soft: oklch(0.35 0.12 250 / 0.03);

  --background: oklch(0.985 0.003 80);
  --foreground: oklch(0.14 0.015 260);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.14 0.015 260);
  --muted: oklch(0.95 0.008 80);
  --muted-foreground: oklch(0.48 0.02 260);
  --accent: oklch(0.95 0.008 80);
  --border: oklch(0.91 0.008 80);

  --gold: oklch(0.70 0.13 75);
  --gold-soft: oklch(0.70 0.13 75 / 0.12);
  --gold-warm: oklch(0.78 0.10 75);

  --radius-md: 0.875rem;
  --radius-lg: 1.125rem;
  --radius-xl: 1.375rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --mary: oklch(0.52 0.12 250);
    --mary-foreground: oklch(0.98 0.005 250);
    --mary-light: oklch(0.20 0.06 250);
    --mary-glow: oklch(0.52 0.12 250 / 0.12);
    --mary-soft: oklch(0.52 0.12 250 / 0.05);

    --background: oklch(0.11 0.02 260);
    --foreground: oklch(0.93 0.008 80);
    --card: oklch(0.15 0.02 260);
    --card-foreground: oklch(0.93 0.008 80);
    --muted: oklch(0.20 0.02 260);
    --muted-foreground: oklch(0.58 0.02 80);
    --accent: oklch(0.20 0.02 260);
    --border: oklch(0.24 0.02 260);

    --gold: oklch(0.73 0.11 75);
    --gold-soft: oklch(0.73 0.11 75 / 0.18);
    --gold-warm: oklch(0.80 0.09 75);
  }
}

/* ─── Reset & Base ────────────────────────────────────── */

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

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

.font-serif {
  font-family: 'IM Fell English', Georgia, 'Times New Roman', serif;
}

/* ─── Site Header ─────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: oklch(1 0 0 / 0.92);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  backdrop-filter: blur(12px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: oklch(0.13 0.02 260 / 0.92);
  }
}

.site-header-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--mary);
  font-size: 0.875rem;
  font-weight: 600;
}

.site-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── Audio Player Bar ────────────────────────────────── */

.audio-player-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mary);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  border-radius: 0.25rem;
  transition: background 0.15s;
}

.player-btn:hover { background: var(--accent); }

.player-progress {
  flex: 1;
  height: 0.25rem;
  background: var(--border);
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.player-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--mary);
  border-radius: 9999px;
  width: 0%;
  transition: width 0.1s linear;
}

.player-time {
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  min-width: 4rem;
  text-align: right;
}

.player-speed-btn {
  background: var(--mary-glow);
  border: none;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--mary);
  cursor: pointer;
  transition: all 0.15s;
  font-variant-numeric: tabular-nums;
}

.player-speed-btn:hover {
  background: var(--mary);
  color: var(--mary-foreground);
}

/* ─── Screens ─────────────────────────────────────────── */

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

.screen {
  display: none;
  padding: 0 1rem;
}

.screen.active {
  display: block;
}

/* ─── Animations ──────────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes inkReveal {
  from { opacity: 0; transform: translateY(3px); filter: blur(1px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

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

.animate-in {
  animation: fadeIn 0.4s ease-out;
}

/* ─── Hero ────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 2.5rem 0 3rem;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--mary-glow), transparent 70%),
    linear-gradient(to bottom, var(--mary-soft), transparent 80%);
  animation: fadeIn 0.6s ease-out;
}

.hero-icon {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: var(--mary-glow);
  border: 1.5px solid oklch(0.35 0.12 250 / 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--mary);
  box-shadow: 0 2px 16px oklch(0.35 0.12 250 / 0.08);
}

.hero h1 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 400;
  color: var(--foreground);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.hero-subtitle {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  margin-top: 0.625rem;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

/* ─── Badges ──────────────────────────────────────────── */

.badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: var(--mary-glow);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--mary);
}

/* ─── Featured Card ───────────────────────────────────── */

.featured-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, oklch(0.32 0.13 255), oklch(0.28 0.11 245));
  color: var(--mary-foreground);
  text-decoration: none;
  box-shadow:
    0 4px 24px oklch(0.30 0.12 250 / 0.25),
    0 1px 3px oklch(0.30 0.12 250 / 0.1);
  transition: all 0.3s ease;
  margin-bottom: 2.5rem;
}

.featured-card:hover {
  box-shadow:
    0 8px 40px oklch(0.30 0.12 250 / 0.35),
    0 2px 6px oklch(0.30 0.12 250 / 0.15);
  transform: translateY(-1px);
}

.featured-card:active {
  transform: scale(0.99);
}

.featured-watermark {
  position: absolute;
  top: -1rem;
  right: -1rem;
}

.featured-content {
  position: relative;
  padding: 1.75rem 1.5rem;
}

@media (min-width: 480px) {
  .featured-content { padding: 1.75rem 2rem; }
}

.featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, oklch(0.70 0.13 75 / 0.25), oklch(0.78 0.10 75 / 0.15));
  border: 1px solid oklch(0.70 0.13 75 / 0.2);
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  color: var(--gold-warm);
}

.featured-card h3 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: clamp(1.375rem, 4.5vw, 1.625rem);
  font-weight: 400;
  letter-spacing: 0;
}

.featured-card p {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 0.875rem;
  opacity: 0.7;
  margin-top: 0.375rem;
  line-height: 1.65;
  max-width: 24rem;
}

.featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
}

.duration {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.5;
}

.cta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0.9;
}

.featured-card:hover .cta { opacity: 1; }
.featured-card:hover .cta svg { transform: translateX(2px); }
.cta svg { transition: transform 0.2s ease; }

/* ─── Sections ────────────────────────────────────────── */

.section {
  margin-bottom: 2.5rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.25rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.divider {
  height: 1px;
  flex: 1;
  background: var(--border);
}

/* ─── Mystery List ────────────────────────────────────── */

.mystery-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mystery-item {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.03);
}

.mystery-item.expanded {
  border-color: oklch(0.35 0.12 250 / 0.2);
  box-shadow: 0 2px 12px oklch(0.35 0.12 250 / 0.06);
}

.mystery-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: background 0.15s ease;
}

.mystery-trigger:hover {
  background: var(--accent);
}

.mystery-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--mary-glow);
  color: var(--mary);
  transition: all 0.2s ease;
}

.mystery-item.expanded .mystery-icon {
  background: var(--mary);
  color: var(--mary-foreground);
}

.mystery-info {
  flex: 1;
  min-width: 0;
}

.mystery-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.mystery-sub {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.mystery-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.mystery-time {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

.mystery-chevron {
  color: var(--muted-foreground);
  transition: transform 0.2s ease;
}

.mystery-item.expanded .mystery-chevron {
  transform: rotate(90deg);
}

.mystery-detail {
  display: none;
  padding: 0 1rem 1rem;
  animation: fadeIn 0.2s ease;
}

.mystery-item.expanded .mystery-detail {
  display: block;
}

.mystery-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 1rem;
  padding-left: 3rem;
}

.mystery-begin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 3rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--mary);
  color: var(--mary-foreground);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.mystery-begin:hover { opacity: 0.9; }
.mystery-begin:active { transform: scale(0.98); }

/* ─── Journey / Stats ─────────────────────────────────── */

.stats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.stat-card {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 0.75rem;
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
}

/* ─── Mystery Breakdown ───────────────────────────────── */

.mystery-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  background: var(--card);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  font-size: 0.75rem;
}

.breakdown-icon {
  color: var(--mary);
  flex-shrink: 0;
}

.breakdown-name {
  flex: 1;
  color: var(--muted-foreground);
}

.breakdown-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  transition: background 0.15s ease;
}

.history-item:hover {
  background: var(--muted);
}

.history-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: var(--mary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--mary);
}

.history-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.history-date {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.history-dur {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

/* ─── Resume Card ─────────────────────────────────────── */

.resume-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: var(--mary-glow);
  border: 1px solid oklch(0.38 0.10 240 / 0.2);
  color: var(--mary);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
}

.resume-btn:hover { background: oklch(0.38 0.10 240 / 0.12); }

.resume-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.resume-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.resume-sub {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

/* ─── Empty State ─────────────────────────────────────── */

.empty-state {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--mary-soft), var(--gold-soft));
  border: 1px solid oklch(0.35 0.12 250 / 0.08);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.empty-title {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.75rem;
}

.empty-sub {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* ─── About ───────────────────────────────────────────── */

.about-card {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.about-card::before {
  content: "\201C";
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 2.5rem;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
}

.about-card p {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.75;
  padding-left: 0.25rem;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--card);
  border: 1px solid oklch(0.38 0.10 240 / 0.2);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: background 0.15s ease;
}

.link-card:hover { background: var(--accent); }

.link-card span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-card svg {
  color: var(--mary);
}

/* ─── Footer ──────────────────────────────────────────── */

.site-footer {
  padding: 2rem 0 3rem;
  text-align: center;
}

.site-footer p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.site-footer a {
  color: var(--mary);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   Prayer Screen
   ═══════════════════════════════════════════════════════════ */

#prayer-screen {
  padding: 0;
}

#prayer-screen.active {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.prayer-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: max(0.75rem, env(safe-area-inset-top));
}

.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mary);
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: background 0.15s;
  display: flex;
  align-items: center;
}

.back-btn:hover { background: var(--accent); }

.audio-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mary);
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: background 0.15s, opacity 0.15s;
  display: flex;
  align-items: center;
  opacity: 0.7;
}

.audio-toggle-btn:hover { background: var(--accent); opacity: 1; }

.prayer-header-center {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.prayer-header-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prayer-header-sub {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.prayer-header-right {
  width: 2rem;
  text-align: right;
}

.bead-counter {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--mary);
  font-variant-numeric: tabular-nums;
}

/* ─── Prayer Controls ─────────────────────────────────── */

.prayer-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.25rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.control-label {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  margin-right: 0.25rem;
}

.control-btn {
  background: var(--muted);
  border: none;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s;
  min-height: 1.5rem;
}

.control-btn:hover { background: var(--mary-glow); color: var(--mary); }
.control-btn:active { transform: scale(0.95); }

/* ─── Prayer Body ─────────────────────────────────────── */

.prayer-body {
  flex: 1;
  padding: 1.5rem 1.25rem 2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.prayer-section {
  animation: fadeIn 0.4s ease-out;
}

.prayer-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.prayer-title {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.625rem;
  font-weight: 400;
  color: var(--foreground);
  margin-bottom: 0.625rem;
  letter-spacing: 0;
  line-height: 1.2;
}

.prayer-subtitle {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.prayer-scripture {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-style: italic;
  padding: 1rem 1.125rem;
  border-left: 2.5px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.prayer-scripture cite {
  display: block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.6875rem;
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

.prayer-meditation {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--foreground);
  margin-bottom: 1.5rem;
}

.prayer-text {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--foreground);
  margin-bottom: 1rem;
  white-space: pre-line;
}

.prayer-instruction {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  text-align: center;
  padding: 1rem;
  background: var(--mary-soft);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.decade-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.decade-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
}

.decade-dot.active {
  background: var(--mary);
  box-shadow: 0 0 8px oklch(0.35 0.12 250 / 0.4);
  transform: scale(1.3);
}

.decade-dot.completed {
  background: var(--gold);
  opacity: 0.8;
}

/* ─── Mystery Artwork ──────────────────────────────────── */

.mystery-art {
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.mystery-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.mystery-art-caption {
  font-size: 0.625rem;
  color: var(--muted-foreground);
  text-align: center;
  padding: 0.5rem 0 0;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.art-actions {
  display: inline-flex;
  gap: 0.25rem;
  font-style: normal;
}

.art-action-btn {
  background: var(--mary-glow);
  border: none;
  border-radius: 0.25rem;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--mary);
  display: inline-flex;
  align-items: center;
  transition: all 0.15s;
}

.art-action-btn:hover {
  background: var(--mary);
  color: var(--mary-foreground);
}

/* ─── Small Art (during decade) ────────────────────────── */

.mystery-art-small {
  margin-bottom: 1rem;
  max-height: 12rem;
  overflow: hidden;
}

.mystery-art-small img {
  height: 12rem;
  width: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* ─── Bead Counter Row ────────────────────────────────── */

.bead-row {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin: 1rem 0 0.5rem;
  flex-wrap: wrap;
}

.bead {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-user-select: none;
  user-select: none;
}

.bead:hover {
  border-color: var(--mary);
  color: var(--mary);
}

.bead:active {
  transform: scale(0.9);
}

.bead.bead-done {
  background: var(--mary);
  border-color: var(--mary);
  color: var(--mary-foreground);
  box-shadow: 0 0 10px oklch(0.35 0.12 250 / 0.35);
  transform: scale(1.05);
}

.bead.bead-active {
  border-color: var(--mary);
  color: var(--mary);
  animation: gentlePulse 1.5s ease-in-out infinite;
}

.bead-progress-text {
  text-align: center;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}

/* ─── Auth Bar ────────────────────────────────────────── */

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
}

.auth-user {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.auth-user-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #22c55e;
}

.auth-btn {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mary);
  background: none;
  border: 1px solid var(--mary);
  border-radius: 0.375rem;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.auth-btn:hover {
  background: var(--mary);
  color: var(--mary-foreground);
}

/* ─── Intentions ──────────────────────────────────────── */

.intention-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  resize: none;
  outline: none;
  transition: border-color 0.15s;
}

.intention-input:focus {
  border-color: var(--mary);
}

.intention-input::placeholder {
  color: var(--muted-foreground);
}

.intention-list {
  margin-top: 0.75rem;
}

.intention-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--foreground);
  line-height: 1.5;
}

.intention-item:last-child { border-bottom: none; }

.intention-icon {
  color: var(--mary);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.intention-meta {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
}

/* Completion screen */
.completion {
  text-align: center;
  padding: 3rem 1rem;
  animation: fadeIn 0.6s ease-out;
}

.completion-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), oklch(0.70 0.13 75 / 0.08));
  border: 1.5px solid oklch(0.70 0.13 75 / 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--gold);
  box-shadow: 0 2px 16px oklch(0.70 0.13 75 / 0.12);
}

.completion h2 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.5rem;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.completion p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  max-width: 18rem;
  margin: 0 auto;
  line-height: 1.6;
}

.completion-prayer {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--foreground);
  max-width: 20rem;
  margin: 1.5rem auto;
  line-height: 1.7;
  white-space: pre-line;
}

.completion-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--mary);
  color: var(--mary-foreground);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}

.completion-btn:hover { opacity: 0.9; }

/* ─── Prayer Nav ──────────────────────────────────────── */

.prayer-nav {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--card);
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 44px;
}

.nav-btn:hover { background: var(--accent); }

.nav-btn-primary {
  flex: 1;
  background: var(--mary);
  color: var(--mary-foreground);
  border-color: var(--mary);
}

.nav-btn-primary:hover {
  opacity: 0.9;
  background: var(--mary);
}

/* ═══════════════════════════════════════════════════════════
   Guide Screen
   ═══════════════════════════════════════════════════════════ */

#guide-screen.active {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.guide-body {
  flex: 1;
  padding: 1.5rem 1.25rem 3rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.guide-step {
  margin-bottom: 2rem;
  animation: fadeIn 0.3s ease-out;
}

.guide-step-num {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mary);
  margin-bottom: 0.375rem;
}

.guide-step h3 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 1.125rem;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}

.guide-step p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.guide-step .prayer-text {
  font-size: 0.9375rem;
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--mary-soft);
  border-radius: var(--radius-md);
}

/* ─── Mobile polish ───────────────────────────────────── */

@media (pointer: coarse) {
  .mystery-trigger,
  .nav-btn,
  .back-btn,
  .link-card,
  .mystery-begin,
  .completion-btn { min-height: 44px; }
}

@media (max-width: 480px) {
  .prayer-meditation,
  .prayer-text { line-height: 1.9; }
}

/* ─── Touch & scroll ──────────────────────────────────── */

* { -webkit-overflow-scrolling: touch; }

#prayer-screen { overscroll-behavior-y: contain; }
#prayer-screen { -webkit-user-select: none; user-select: none; }
#prayer-screen .prayer-text,
#prayer-screen .prayer-meditation,
#prayer-screen .prayer-scripture {
  -webkit-user-select: text;
  user-select: text;
}

.nav-btn, .mystery-begin, .mystery-trigger, .back-btn {
  touch-action: manipulation;
}
