:root {
  --navy-950: #050b1d;
  --navy-900: #0a1633;
  --navy-800: #11234d;
  --navy-700: #1a3268;
  --sky: #8fb6ff;
  --gold: #e3bd6a;
  --gold-soft: #f4dc9c;
  --gold-deep: #b98a35;
  --ink: #eef2fb;
  --muted: #a9b5d1;
  --line: rgba(227, 189, 106, .22);
  --card: rgba(20, 38, 82, .62);
  --radius: 18px;
  --tabbar-h: 68px;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--navy-950);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100%;
  position: relative;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(143, 182, 255, .28), transparent 60%),
    radial-gradient(80% 40% at 50% 0%, rgba(227, 189, 106, .18), transparent 70%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 70%);
  box-shadow: 0 0 80px rgba(0, 0, 0, .5);
}
#view {
  padding: calc(env(safe-area-inset-top) + 18px) 18px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px);
  outline: none;
  min-height: 100vh;
}
body.has-player #view { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 100px); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { line-height: 1.6; }

/* ---------- Marca ---------- */
.brand { text-align: center; padding: 10px 0 18px; }
.brand .shield { width: 96px; height: auto; margin: 0 auto 8px; display: block; filter: drop-shadow(0 0 18px rgba(227, 189, 106, .45)); }
.brand h1 { font-family: var(--display); font-size: 30px; letter-spacing: .38em; padding-left: .38em; color: var(--gold-soft); text-shadow: 0 0 24px rgba(227, 189, 106, .35); }
.brand p { margin: 4px 0 0; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 15px; }

/* ---------- Cabeçalho de página ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.page-head h1 { font-family: var(--display); font-size: 21px; letter-spacing: .06em; color: var(--gold-soft); }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); display: grid; place-items: center; flex: none; }
.back svg { width: 20px; height: 20px; stroke: var(--gold); fill: none; stroke-width: 2; }

.section-title { font-family: var(--display); font-size: 13px; letter-spacing: .18em; color: var(--gold); text-transform: uppercase; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.section-title a { font-family: var(--sans); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--sky); order: 2; }

/* ---------- Cartões ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(6px);
}
.card + .card { margin-top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.grid-battles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.battle {
  position: relative; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--line);
  min-height: 92px; padding: 14px 12px 12px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--navy-800) center/cover no-repeat;
  isolation: isolate;
}
.battle::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 11, 29, .15), rgba(5, 11, 29, .88)); z-index: -1; }
.battle .ico { font-size: 20px; line-height: 1; margin-bottom: 6px; }
.battle b { font-size: 14px; font-weight: 600; line-height: 1.25; }
.battle small { color: var(--gold-soft); font-size: 11px; margin-top: 2px; opacity: .9; }
.battle:active { transform: scale(.98); }

/* Versículo do dia */
.verse {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 22px; border: 1px solid rgba(227, 189, 106, .4);
  padding: 22px 20px 18px; min-height: 220px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--navy-800) center 30%/cover no-repeat;
}
.verse::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 11, 29, .25) 0%, rgba(5, 11, 29, .82) 35%, rgba(5, 11, 29, .95) 100%); }
.verse .label { font-family: var(--display); font-size: 12px; letter-spacing: .24em; color: var(--gold); text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.verse blockquote { margin: 10px 0 6px; font-family: var(--serif); font-size: 19px; line-height: 1.45; text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.verse cite { font-style: normal; color: var(--gold-soft); font-weight: 600; font-size: 14px; }
.verse .actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 11px 18px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06); font-size: 14px; font-weight: 500;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn.gold { background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep)); color: #1a1406; border-color: transparent; font-weight: 600; box-shadow: 0 8px 24px rgba(227, 189, 106, .25); }
.btn.block { width: 100%; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.icon { padding: 9px; width: 40px; height: 40px; }
.btn.on { color: var(--gold); border-color: var(--gold); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* Listas */
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.item .num { font-family: var(--display); color: var(--gold); font-size: 13px; width: 34px; flex: none; text-align: center; }
.item .t { flex: 1; min-width: 0; }
.item .t b { display: block; font-weight: 500; font-size: 15px; line-height: 1.35; }
.item .t span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.item .chev { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; flex: none; }
.item.locked { opacity: .72; }
.lock { width: 18px; height: 18px; flex: none; stroke: var(--gold); fill: none; stroke-width: 2; }
.item.done .num { color: #7fd6a2; }

/* Leitura */
.reading { font-family: var(--serif); font-size: 17.5px; line-height: 1.75; }
.reading p { margin: 0 0 14px; }
.reading h3 { font-family: var(--display); font-size: 13px; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; margin: 26px 0 10px; font-weight: 500; }
.reading .ref { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.palavra { border-left: 3px solid var(--gold); padding: 10px 14px; background: rgba(227, 189, 106, .08); border-radius: 0 12px 12px 0; }
.palavra strong { color: var(--gold-soft); display: block; font-family: var(--sans); font-size: 15px; margin-bottom: 4px; }
.oracao-box { background: rgba(143, 182, 255, .07); border: 1px solid rgba(143, 182, 255, .2); border-radius: 16px; padding: 16px 18px; }
.oracao-box p:last-child { margin-bottom: 0; }
.compromisso { background: linear-gradient(180deg, rgba(227, 189, 106, .16), rgba(227, 189, 106, .05)); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; font-style: italic; }
.hero-img { margin: -18px -18px 18px; height: 230px; background: center 25%/cover no-repeat; position: relative; }
.hero-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--navy-900)); }

/* Paywall */
.paywall { text-align: center; padding: 26px 20px; }
.paywall .crown { font-size: 34px; }
.paywall h2 { font-family: var(--display); color: var(--gold-soft); font-size: 20px; margin: 8px 0 6px; }
.badge { display: inline-block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep)); color: #1a1406; font-weight: 700; }
.badge.free { background: rgba(255, 255, 255, .1); color: var(--ink); }

.plans { display: grid; gap: 12px; }
.plan { border-radius: 20px; border: 1px solid var(--line); padding: 20px; background: var(--card); }
.plan.premium { border-color: var(--gold); background: linear-gradient(180deg, rgba(227, 189, 106, .14), rgba(20, 38, 82, .7)); position: relative; }
.plan h3 { font-family: var(--display); font-size: 17px; letter-spacing: .06em; }
.plan .price { font-size: 30px; font-weight: 600; margin: 6px 0 12px; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 0 0 16px; }
.plan li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; }
.plan li::before { content: '✦'; position: absolute; left: 4px; color: var(--gold); }

/* Jornada */
.progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft)); border-radius: 99px; }
.days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.day { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-size: 14px; background: rgba(255, 255, 255, .03); }
.day.done { background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep)); color: #1a1406; border: none; }
.day.next { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227, 189, 106, .25); }

/* Calendário */
.season { border-radius: 18px; padding: 18px; border: 1px solid var(--line); display: flex; gap: 14px; align-items: center; }
.season .dot { width: 46px; height: 46px; border-radius: 50%; flex: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.c-roxo { background: #6b3fa0; } .c-branco { background: #f2efe6; } .c-verde { background: #2f8a57; } .c-vermelho { background: #b8322f; } .c-rosa { background: #d88aa8; }
.feast { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.feast:last-child { border-bottom: none; }
.feast .date { width: 52px; text-align: center; flex: none; }
.feast .date b { display: block; font-family: var(--display); font-size: 20px; color: var(--gold-soft); }
.feast .date span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.feast .pill { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.feast.today { background: rgba(227, 189, 106, .08); border-radius: 12px; padding-left: 8px; }

/* Formulários */
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=time], input[type=search], textarea {
  width: 100%; border-radius: 14px; border: 1px solid var(--line); background: rgba(5, 11, 29, .55);
  color: var(--ink); padding: 12px 14px; font: inherit; font-size: 15px; outline: none;
}
textarea { min-height: 140px; resize: vertical; font-family: var(--serif); line-height: 1.6; }
input:focus, textarea:focus { border-color: var(--gold); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.switch:last-child { border-bottom: none; }
.switch input[type=checkbox] { appearance: none; width: 46px; height: 28px; border-radius: 99px; background: rgba(255, 255, 255, .15); position: relative; flex: none; cursor: pointer; transition: .2s; }
.switch input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input[type=checkbox]:checked { background: var(--gold-deep); }
.switch input[type=checkbox]:checked::after { left: 21px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; background: rgba(255, 255, 255, .04); white-space: nowrap; }
.chip.on { background: var(--gold); color: #1a1406; border-color: var(--gold); font-weight: 600; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 11.5px; text-align: center; }
.quick a i { font-style: normal; font-size: 22px; }

/* Barra inferior */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; z-index: 20;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(6, 13, 32, .92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.tabbar a.on { color: var(--gold); }
.tabbar a.on svg { filter: drop-shadow(0 0 8px rgba(227, 189, 106, .6)); }

/* Player */
.player {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 19;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
  width: calc(100% - 20px); max-width: 540px;
  background: rgba(17, 35, 77, .96); border: 1px solid var(--line); border-radius: 16px;
  padding: 10px 12px; display: flex; align-items: center; gap: 12px; backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.player[hidden] { display: none; }
.player .cover { width: 42px; height: 42px; border-radius: 10px; background: center/cover; flex: none; }
.player .meta { flex: 1; min-width: 0; }
.player .meta b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .meta span { font-size: 12px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 14px); transform: translate(-50%, -150%);
  background: var(--gold-soft); color: #1a1406; padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 500;
  transition: transform .3s; z-index: 50; max-width: 90%; text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

.demo-note { font-size: 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 14px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-family: var(--serif); font-style: italic; }

/* Páginas legais (privacidade e termos) */
.legal-page #view.legal { padding-bottom: 50px; }
.legal { font-size: 15px; line-height: 1.65; }
.legal-head { text-align: center; margin: 18px 0 24px; }
.legal-head img { display: block; margin: 0 auto 8px; }
.legal-head h1 { font-family: var(--display); color: var(--gold-soft); font-size: 24px; letter-spacing: .05em; }
.legal-head p { margin: 6px 0 0; font-size: 13px; }
.legal section { border-top: 1px solid rgba(255, 255, 255, .07); padding-top: 4px; }
.legal h2 { font-family: var(--serif); color: var(--gold-soft); font-size: 18px; margin: 20px 0 8px; }
.legal p, .legal li { color: #dbe2f2; }
.legal ul { padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal a:not(.btn) { color: var(--sky); text-decoration: underline; }
.legal .tabela { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.legal table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 13.5px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.legal th { color: var(--gold); font-weight: 600; background: rgba(227, 189, 106, .06); }
.legal .aviso { border: 1px solid rgba(143, 182, 255, .35); background: rgba(143, 182, 255, .08); border-radius: 12px; padding: 12px 14px; }
.legal .dados-resp { list-style: none; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.45; }
.consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--gold-deep); flex: none; }
.consent a { color: var(--sky); text-decoration: underline; }

@media (min-width: 420px) {
  .grid-battles { grid-template-columns: 1fr 1fr 1fr; }
  .battle { min-height: 104px; }
}
