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

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

.player-btn {
  background: var(--accent-fill);
  border: none;
  cursor: pointer;
  color: var(--mary-foreground);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
  flex-shrink: 0;
}

.player-btn:hover { opacity: 0.85; }
.player-btn:active { transform: scale(0.92); }

.player-divider {
  width: 1px;
  height: 1rem;
  background: var(--parchment-rule);
  flex-shrink: 0;
}

.autoplay-toggle {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.25rem 0.625rem;
  border-radius: 2px;
  border: 1.5px solid var(--parchment-faded);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Rosarivo', 'Rosarivo Fallback', Georgia, serif;
}

.autoplay-toggle.active {
  background: var(--accent-fill);
  border-color: var(--mary);
}

.autoplay-label {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--parchment-faded);
  transition: color 0.2s ease;
}

.autoplay-toggle.active .autoplay-label {
  color: var(--mary-foreground);
}

/* Autoplay icon */
.autoplay-icon {
  color: var(--parchment-faded);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.autoplay-toggle.active .autoplay-icon {
  color: var(--mary-foreground);
}

/* Font size toggle in prayer header */
.font-size-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 2px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
}

.font-size-toggle:hover { background: var(--hover-overlay); }

.font-size-toggle-label {
  font-family: 'Rosarivo', 'Rosarivo Fallback', Georgia, serif;
  font-size: 0.875rem;
  color: var(--parchment-accent);
  font-weight: 400;
}

/* Font size dropdown panel */
.font-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--parchment-bg);
  border-bottom: 1px solid var(--parchment-rule);
  animation: prayerFadeIn 0.2s ease-out;
}

.font-panel-btn {
  background: none;
  border: 1.5px solid var(--parchment-rule);
  cursor: pointer;
  color: var(--parchment-ink);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
}

.font-panel-btn:hover {
  background: var(--mary-glow);
  border-color: var(--mary);
}

.font-panel-label {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--parchment-faded);
}

.player-progress {
  flex: 1;
  height: 3px;
  background: var(--parchment-rule);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

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

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

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

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

/* Rosary overall progress bar */
.rosary-progress {
  height: 2px;
  background: var(--parchment-rule);
  position: relative;
  flex-shrink: 0;
}

.rosary-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ─── 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 gentlePulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

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

.hero {
  text-align: center;
  padding: 2.5rem 0 3rem;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  background: none;
  animation: fadeIn 0.6s ease-out;
}

.hero-monogram { display: none; }

.hero-verse {
  font-family: 'Rosarivo', 'Rosarivo Fallback', Georgia, serif;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-top: 0.75rem;
  line-height: 1.5;
}

.hero h1 {
  font-family: 'Rosarivo', 'Rosarivo Fallback', 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: 'Rosarivo', 'Rosarivo Fallback', 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: 2px;
  background: var(--mary-glow);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--mary);
}

.badge-streak {
  background: var(--gold-soft);
  color: var(--gold);
}

/* ─── Liturgical Banner ──────────────────────────────── */

.liturgical-banner {
  display: flex;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 1rem;
  animation: fadeIn 0.4s ease-out;
}

.litcal-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.375rem;
}

.litcal-content {
  flex: 1;
  min-width: 0;
}

.litcal-name {
  font-family: 'Rosarivo', 'Rosarivo Fallback', Georgia, serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--foreground);
  line-height: 1.3;
}

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

.litcal-readings {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  margin-top: 0.375rem;
  line-height: 1.4;
}

/* Real padding rather than an invisible overlay: this link sits mid-card, so
   an expanded hit box would swallow the memorial text directly above it. */
.litcal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  color: var(--mary-ink);
  text-decoration: none;
  margin-top: 0.125rem;
  padding: 0.4375rem 0;
}

.litcal-link:hover { text-decoration: underline; }

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

.featured-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 2.5rem;
}

.featured-card:hover {
  transform: translateY(-1px);
}

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

.featured-watermark { display: none; }

.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: 2px;
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.5625rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: var(--gold-warm);
}

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

.featured-card p {
  font-family: 'Rosarivo', 'Rosarivo Fallback', 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: 400;
  opacity: 0.9;
}

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

