:root {
  --bg: #f7f3ec;
  --card: #fffdf9;
  --ink: #2e2a24;
  --ink-soft: #6b6457;
  --accent: #b08146;
  --accent-dark: #8c6433;
  --line: #e7ddcd;
  --shadow: 0 10px 30px rgba(80, 60, 30, 0.08);
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Georgia", "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

body {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 120px;
  min-height: 100vh;
}

/* ---------- Cabeçalho ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 10px;
}
.brand {
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--accent-dark);
  font-weight: bold;
}
.streak {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ink-soft);
}
.streak b { color: var(--accent-dark); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.index-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 40px;
  height: 36px;
  font-size: 17px;
  padding: 0;
  cursor: pointer;
}

/* ---------- Índice / calendário ---------- */
.index-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(30, 22, 12, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.index-panel {
  background: var(--bg);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  border-radius: 22px 22px 0 0;
  padding: 18px 18px 30px;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  animation: index-up 0.28s ease both;
}
@keyframes index-up {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.index-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.index-head h2 { font-size: 21px; color: var(--ink); }
.index-close {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 15px;
  color: var(--ink-soft);
  cursor: pointer;
}
.index-hint {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.index-month {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--card);
}
.index-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  font-family: -apple-system, system-ui, sans-serif;
  font-weight: 600;
  color: var(--accent-dark);
}
.index-month-head .chev { color: var(--ink-soft); transition: transform 0.2s; }
.index-month.open .chev { transform: rotate(90deg); }
.index-days {
  display: none;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 4px 14px 16px;
}
.index-month.open .index-days { display: grid; }
.index-day {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.index-day.hoje {
  border-color: var(--accent);
  background: #faf4e9;
  font-weight: 700;
  color: var(--accent-dark);
}
.index-day.premium::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Data ---------- */
.date {
  text-align: center;
  font-family: -apple-system, system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 18px 0 6px;
}

.day-num {
  text-align: center;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 12px;
  color: var(--accent-dark);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* ---------- Cartão da devocional ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 30px 26px;
  margin-top: 10px;
}
.card h1 {
  font-size: 27px;
  line-height: 1.25;
  margin-bottom: 18px;
  color: var(--ink);
}
.reading {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.verse {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 6px;
}
.verse-ref {
  padding-left: 16px;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 22px;
}
.body p { margin-bottom: 16px; font-size: 18px; }

/* ---------- Barra de áudio ---------- */
.audiobar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 22px;
}
.audio-play {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #faf4e9;
  border: 1px solid var(--line);
  color: var(--accent-dark);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: -apple-system, system-ui, sans-serif;
}
.audio-play.playing {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.audio-play.premium:not(.playing) {
  background: linear-gradient(180deg, #2a2017 0%, #1a140d 100%);
  color: #e7c98a;
  border-color: #5a4326;
}
.audio-play #audio-icon { font-size: 13px; }
.audio-stop {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 13px;
  min-width: 50px;
}

/* ---------- Blocos: aplicação e pergunta ---------- */
.block { margin-top: 24px; }
.block .label {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 12px;
}
.apply ol {
  padding-left: 20px;
  margin: 0;
}
.apply ol li {
  font-size: 17px;
  margin-bottom: 12px;
  padding-left: 6px;
}
.question {
  background: #faf4e9;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.question p {
  font-style: italic;
  font-size: 18px;
  font-weight: bold;
  color: var(--ink);
}

.prayer {
  margin-top: 24px;
  background: #faf4e9;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.prayer .label {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 8px;
}
.prayer p { font-style: italic; font-size: 17px; }

/* ---------- Anotação ---------- */
.note {
  margin-top: 22px;
}
.note .label {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.note textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font-family: "Georgia", serif;
  font-size: 16px;
  background: #fff;
  color: var(--ink);
}

/* ---------- Botões ---------- */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
button {
  font-family: -apple-system, system-ui, sans-serif;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.05s ease, opacity 0.2s;
}
button:active { transform: scale(0.97); }
.btn-primary {
  flex: 1;
  background: var(--accent);
  color: #fff;
}
.btn-primary.done { background: #6f8c5a; }
.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  min-width: 56px;
}
.btn-ghost.active { color: #c0392b; border-color: #e6c3bd; }

/* ---------- Navegação entre dias ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 14px;
}
.nav a { color: var(--accent-dark); text-decoration: none; cursor: pointer; }
.nav a.disabled { color: #cfc6b6; pointer-events: none; }

/* ---------- Paywall ---------- */
.paywall {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 34px 28px;
  margin-top: 14px;
  text-align: center;
}
.paywall h2 { font-size: 24px; margin-bottom: 10px; }
.paywall p { color: var(--ink-soft); margin-bottom: 8px; font-size: 17px; }
.paywall .price {
  font-size: 34px;
  color: var(--accent-dark);
  margin: 18px 0 4px;
}
.paywall .price small { font-size: 15px; color: var(--ink-soft); }
.paywall ul {
  text-align: left;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  list-style: none;
  margin: 20px auto;
  max-width: 320px;
}
.paywall ul li { padding: 7px 0 7px 28px; position: relative; }
.paywall ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #6f8c5a;
  font-weight: bold;
}
.paywall .btn-buy {
  background: var(--accent);
  color: #fff;
  width: 100%;
  padding: 16px;
  font-size: 17px;
  margin-top: 6px;
}
.paywall .small {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 14px;
}

.hidden { display: none !important; }

/* ---------- Tela de abertura (splash) ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(circle at 50% 40%, #1a160f 0%, #0c0a07 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.splash.fade-out {
  opacity: 0;
  pointer-events: none;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  animation: splash-rise 0.9s ease both;
}
.splash-cover {
  width: 62vw;
  max-width: 280px;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(176, 129, 70, 0.25);
}
.splash-loader {
  width: 150px;
  height: 3px;
  background: rgba(176, 129, 70, 0.18);
  border-radius: 99px;
  overflow: hidden;
}
.splash-loader span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: var(--accent);
  animation: splash-load 1.6s ease-in-out infinite;
}
@keyframes splash-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes splash-load {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
@media (prefers-reduced-motion: reduce) {
  .splash-inner { animation: none; }
  .splash-loader span { animation: none; width: 100%; }
}
