:root {
  --page-bg: #F1EBDD;
  --void: #FBF8F2;
  --surface: #FFFFFF;
  --surface-2: #F5EFE2;
  --surface-3: #ECE2CC;
  --line: rgba(38, 28, 14, 0.10);
  --line-strong: rgba(38, 28, 14, 0.18);
  --text: #2B2013;
  --text-muted: #746650;
  --text-faint: #A99C84;
  --flame: #D68A22;
  --flame-bright: #B96D14;
  --flame-pale: #F6D89B;
  --flame-dim: rgba(214, 138, 34, 0.14);
  --ember: #B85C36;
  --violet: #6E5FC4;
  --violet-pale: #E7E2F7;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--page-bg);
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--void);
  padding: 24px 18px 40px;
  box-shadow: 0 0 40px rgba(38, 28, 14, 0.06);
}

.hidden { display: none !important; }

/* ---- Top bar ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.burger {
  width: 38px; height: 38px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line-strong); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; position: relative;
}
.burger span { width: 16px; height: 2px; background: var(--text-muted); border-radius: 2px; }
.burger.pulse::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--flame); box-shadow: 0 0 0 3px var(--flame-pale);
  animation: pulse-glow 1.8s ease-in-out infinite;
}
.top-right { display: flex; align-items: center; gap: 10px; }
.lang-pill {
  background: var(--surface); border: 1px solid var(--line-strong); padding: 7px 12px;
  border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text);
}

/* ---- Hero card ---- */
.hero {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  padding: 24px 22px 22px; position: relative; overflow: hidden; margin-bottom: 22px;
  box-shadow: 0 2px 14px rgba(38, 28, 14, 0.06);
}
.hero-eyebrow { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 6px; }
.hero-title {
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 30px; letter-spacing: 0.01em;
  text-transform: uppercase; margin: 0 0 16px; color: var(--text);
}
.timer-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.timer { font-family: 'JetBrains Mono', monospace; font-size: 44px; font-weight: 600; color: var(--flame-bright); }
.timer-label { font-size: 12.5px; color: var(--text-muted); }
.reps-line { font-size: 13.5px; color: var(--text-muted); margin-bottom: 16px; }
.progress-track { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--ember), var(--flame-bright)); border-radius: 999px; transition: width .4s ease; }
.progress-caption { font-size: 11.5px; color: var(--text-faint); margin-bottom: 20px; }
.hero-actions { display: flex; gap: 10px; }

.btn {
  flex: 1; text-align: center; padding: 13px 14px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700; border: 1px solid transparent; cursor: pointer;
}
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-flame { background: linear-gradient(180deg, var(--flame), var(--flame-bright)); color: #FFF7EA; box-shadow: 0 8px 18px -8px rgba(185, 109, 20, 0.55); }

/* ---- List ---- */
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin: 26px 0 12px 4px; }
.prayer-row {
  display: flex; align-items: center; justify-content: space-between; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(38, 28, 14, 0.04);
}
.prayer-row.finished { opacity: 0.55; box-shadow: none; }
.row-left { display: flex; align-items: center; gap: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.status-dot.live { background: var(--flame); box-shadow: 0 0 0 4px var(--flame-pale); animation: pulse-glow 3.2s ease-in-out infinite; }
.status-check { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--text-faint); color: var(--text-faint); font-size: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row-title { font-size: 14.5px; font-weight: 700; }
.row-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.row-right { font-size: 12.5px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

.footer-link { text-align: center; margin-top: 26px; font-size: 13px; color: var(--text-faint); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ---- Onboarding overlays ---- */
.overlay {
  position: fixed; inset: 0; background: rgba(20, 14, 5, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s ease; z-index: 50;
}
.overlay.visible { opacity: 1; }
.onboarding-card {
  background: var(--surface); border-radius: 22px 22px 0 0; padding: 26px 22px 30px;
  max-width: 480px; width: 100%; transform: translateY(16px); transition: transform .25s ease;
}
.overlay.visible .onboarding-card { transform: translateY(0); }
.onboarding-card.small { border-radius: 22px; margin: 0 18px 24px; }
.lang-row { display: flex; gap: 8px; margin-bottom: 18px; }
.lang-chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer;
}
.lang-chip.active { border-color: var(--flame); color: var(--flame-bright); background: var(--flame-dim); }
.onboarding-card h2 { font-family: 'Fraunces', serif; font-size: 22px; margin: 0 0 12px; }
.onboarding-card p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0 0 22px; }
.wording-options { display: flex; gap: 10px; margin-top: 14px; }

@keyframes pulse-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot.live, .burger.pulse::after { animation: none; }
}
