:root {
  --bg: oklch(0.97 0.014 75);
  --surface-alt: oklch(0.93 0.012 70);
  --ink: oklch(0.26 0.02 50);
  --ink-muted: oklch(0.52 0.012 60);
  --accent: oklch(0.72 0.14 85);
  --accent-strong: oklch(0.58 0.15 82);
  --on-accent: oklch(0.99 0 0);
  --dark-on-accent: oklch(0.22 0.03 55);
  --hairline: oklch(0 0 0 / 0.08);
  --card-ink: oklch(0.97 0.01 85);
  --card-muted: oklch(0.85 0.02 75 / 0.78);
  --whatsapp: oklch(0.70 0.15 152);
  --badge-bg: oklch(0.13 0.02 45 / 0.55);
  --muted-btn-bg: oklch(0.32 0.02 50 / 0.55);
  --muted-btn-border: oklch(0.60 0.02 60 / 0.35);
  --muted-btn-ink: oklch(0.78 0.02 70);
  --locked-badge: oklch(0.42 0.01 60 / 0.7);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, sans-serif;
  min-height: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.header {
  flex: 0 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
}

.back-btn {
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--on-accent);
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content {
  flex: 1 1 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.eyebrow {
  font-style: italic;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

h1.title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
}

.subtext {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
}

.heading-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.section-heading .bar {
  width: 4px;
  height: 44px;
  border-radius: 3px;
  background: var(--accent-strong);
  margin-top: 2px;
  flex: 0 0 auto;
}

.kicker {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Cards (Home + Novena) */
.card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  flex: 0 0 auto;
  opacity: 0.5;
  transform: scale(0.96);
  transition: opacity 0.28s ease, transform 0.28s ease;
  transform-origin: center center;
  display: block;
  color: inherit;
  background-size: cover;
  background-position: center;
}

.card.static { opacity: 1; transform: scale(1); }

.card.locked {
  filter: grayscale(35%) brightness(0.9);
  pointer-events: none;
}

.icon-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--badge-bg);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.num-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--dark-on-accent);
}

.card.locked .num-badge {
  background: var(--locked-badge);
  color: var(--card-muted);
}

.pill-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--badge-bg);
  backdrop-filter: blur(6px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--card-ink);
  display: flex;
  align-items: center;
  gap: 5px;
}

.card.locked .pill-badge { color: var(--card-muted); }

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,.5);
}

.card.locked .play-btn {
  background: var(--locked-badge);
  box-shadow: none;
}

.card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 18px;
  background: linear-gradient(to top, oklch(0.06 0.01 40 / 0.97) 0%, oklch(0.06 0.01 40 / 0.86) 45%, oklch(0.06 0.01 40 / 0.15) 85%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-body.row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
}

.card-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--card-ink);
  text-shadow: 0 1px 3px rgba(0,0,0,.5), 0 2px 10px rgba(0,0,0,.35);
}

.card.locked .card-title { color: var(--card-muted); }

.card-sub {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: oklch(0.93 0.008 80);
  text-shadow: 0 1px 4px rgba(0,0,0,.7), 0 1px 2px rgba(0,0,0,.9);
}

.card.locked .card-sub { color: var(--card-muted); text-shadow: none; }

.cta-btn {
  margin-top: 6px;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
}

.cta-btn.muted {
  background: var(--muted-btn-bg);
  border: 1px solid var(--muted-btn-border);
  color: var(--muted-btn-ink);
  cursor: not-allowed;
}

.chevron { flex: 0 0 auto; color: var(--card-muted); }

.section-label {
  margin: 8px 0 -6px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

/* Day detail page */
.video-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16/9;
  flex: 0 0 auto;
  background-image: radial-gradient(120% 100% at 50% 30%, oklch(0.40 0.10 50) 0%, oklch(0.19 0.04 42) 55%, oklch(0.11 0.02 30) 100%);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.material-btn {
  align-self: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.prayer-card {
  border-radius: 18px;
  background: var(--surface-alt);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.prayer-card p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--ink);
}

.prayer-card p.opening {
  font-weight: 600;
  font-style: italic;
  line-height: 1.6;
}

.prayer-card p.closing {
  font-weight: 700;
  text-align: center;
}

.banner {
  border-radius: 16px;
  background: oklch(0.22 0.02 50);
  padding: 16px 20px;
  text-align: center;
  flex: 0 0 auto;
}

.banner span {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .03em;
  color: var(--card-ink);
  text-transform: uppercase;
  line-height: 1.5;
}

/* Confirmation modal */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: oklch(0.10 0.01 40 / 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal-scrim.open { display: flex; }

.modal-card {
  width: 100%;
  max-width: 340px;
  border-radius: 26px;
  background: var(--bg);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  box-shadow: 0 24px 48px -12px rgba(0,0,0,.45);
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-on-accent);
  flex: 0 0 auto;
}

.modal-heading {
  text-align: center;
}

.modal-heading h3 {
  margin: 0;
  font-weight: 800;
  font-size: 19px;
  color: var(--ink);
}

.modal-checklist {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-checklist .item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.modal-checklist svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--accent-strong);
}

.modal-checklist p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.modal-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-btn {
  height: 52px;
  border-radius: 14px;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  width: 100%;
}

.modal-btn.primary {
  background: var(--accent-strong);
  color: var(--on-accent);
  border: none;
  font-weight: 800;
  font-size: 15px;
}

.modal-btn.secondary {
  background: transparent;
  border: 1px solid var(--muted-btn-border);
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}

/* Botão flutuante "voltar ao topo" */
.back-to-top {
  position: fixed;
  right: max(20px, calc(50% - 240px + 20px));
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--on-accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.45);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
