:root { --fonte: 1; --topo: 60px; --nav: 64px; }
body { min-height: 100vh; padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom)); }
.suave { color: var(--suave); }

/* Barra superior */
.barra-topo {
  position: sticky; top: 0; z-index: 10; height: calc(var(--topo) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0;
  display: flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--linha);
}
.titulo-topo { flex: 1; min-width: 0; padding-left: 8px; line-height: 1.15; }
.titulo-topo strong { display: block; font-family: var(--serif); font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titulo-topo small { color: var(--suave); font-size: .8rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#btn-voltar:not(.oculto) + .titulo-topo { padding-left: 0; }

/* Navegação inferior */
.navegacao {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--linha);
}
.navegacao a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--suave); text-decoration: none; font-size: .74rem; font-weight: 600; }
.navegacao a svg { width: 24px; height: 24px; }
.navegacao a.ativo { color: var(--acento); }

.tela { max-width: 680px; margin: 0 auto; padding: 16px 16px 32px; outline: none; font-size: calc(1rem * var(--fonte)); }

/* Cartões */
.cartao { background: var(--card); border: 1px solid var(--linha); border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra); margin-bottom: 14px; }
.cartao h2 { margin: 0 0 8px; font-size: 1.05em; display: flex; align-items: center; gap: 8px; }
.cartao h2 svg { width: 20px; height: 20px; color: var(--acento); flex: none; }
.rotulo { text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; font-weight: 700; color: var(--acento); margin: 0 0 4px; }

.saudacao { margin: 4px 2px 16px; }
.saudacao h1 { font-family: var(--serif); font-size: 1.65em; margin: 0; font-weight: 600; line-height: 1.2; }
.saudacao p { margin: 2px 0 0; color: var(--suave); }

.nav-dia { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.nav-dia .btn { min-height: 38px; padding: .3rem .8rem; font-size: .9rem; }

/* Progresso */
.progresso { display: flex; align-items: center; gap: 14px; }
.anel { width: 64px; height: 64px; flex: none; }
.anel circle { fill: none; stroke-width: 7; }
.anel .fundo { stroke: var(--linha); }
.anel .valor { stroke: var(--acento); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset .5s; }
.anel text { font: 700 15px var(--sans); fill: var(--texto); text-anchor: middle; dominant-baseline: central; }
.progresso b { font-size: 1.05em; }
.progresso p { margin: 2px 0 0; color: var(--suave); font-size: .92em; }
.barra-prog { height: 8px; background: var(--linha); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.barra-prog i { display: block; height: 100%; background: var(--acento); border-radius: 99px; }

/* Leitura */
.leitura-resumo { font-family: var(--serif); font-size: 1.4em; margin: 2px 0 12px; line-height: 1.25; }
.capitulos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cap {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: .35rem .85rem; border-radius: 999px;
  border: 1px solid var(--linha); background: var(--bg); cursor: pointer; font-weight: 600; font-size: .92em;
}
.cap svg { width: 16px; height: 16px; }
.cap.lido { background: var(--acento-fundo); border-color: transparent; color: var(--acento); }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.acoes .btn { flex: 1; min-width: 140px; }
.concluido { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 700; margin: 0 0 12px; }

/* Jejum */
.cartao.jejum { background: linear-gradient(135deg, var(--acento), var(--acento-2)); color: #fff; border: 0; }
.cartao.jejum h2, .cartao.jejum h2 svg, .cartao.jejum .rotulo { color: #fff; }
.cartao.jejum p { margin: 6px 0 0; opacity: .95; }
.linha-jejum { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px; border-radius: var(--raio); border: 1px dashed var(--linha); color: var(--suave); font-size: .92em; }
.linha-jejum svg { width: 20px; height: 20px; color: var(--acento); flex: none; }

/* Motivos */
.motivos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.motivos li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.motivos li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--acento-2); margin-top: .5em; flex: none; }

/* Devocional */
.devocional h3 { font-family: var(--serif); font-size: 1.35em; margin: 0 0 10px; line-height: 1.25; }
.versiculo { font-family: var(--serif); font-size: 1.12em; line-height: 1.6; border-left: 3px solid var(--acento-2); padding: 2px 0 2px 14px; margin: 0 0 14px; }
.versiculo cite { display: block; font-style: normal; font-family: var(--sans); font-size: .82em; color: var(--acento); font-weight: 700; margin-top: 6px; }
.texto-longo p { margin: 0 0 12px; line-height: 1.7; }
.oracao-txt { background: var(--acento-fundo); border-radius: 12px; padding: 12px 14px; font-style: italic; line-height: 1.6; }

/* Pergunta */
.pergunta-rapida { display: flex; gap: 8px; }
.pergunta-rapida input { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chip { border: 1px solid var(--linha); background: var(--card); border-radius: 999px; padding: .45rem .9rem; min-height: 40px; cursor: pointer; font-size: .92em; }
.chip:hover { border-color: var(--acento-2); }
.caixa-pergunta textarea { min-height: 96px; font-size: 1.02em; }
.caixa-pergunta h1 { font-family: var(--serif); font-size: 1.5em; margin: 0 0 4px; font-weight: 600; }
.resultado-tema { margin-top: 18px; }
.resultado-tema > h2 { font-family: var(--serif); font-size: 1.3em; margin: 0 0 4px; }
.palavra { color: var(--suave); margin: 0 0 12px; line-height: 1.55; }
.verso-cartao { background: var(--card); border: 1px solid var(--linha); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.verso-cartao p { margin: 0; font-family: var(--serif); font-size: 1.06em; line-height: 1.6; }
.verso-rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.verso-rodape a { font-weight: 700; font-size: .88em; text-decoration: none; }
.verso-rodape .icone-btn { width: 36px; height: 36px; }
.verso-rodape .icone-btn svg { width: 18px; height: 18px; }
mark { background: color-mix(in srgb, var(--acento-2) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Bíblia */
.testamento { margin: 4px 2px 10px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); }
.grade-livros { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 22px; }
.livro-btn { text-align: left; padding: 10px 12px; min-height: 48px; border-radius: 12px; border: 1px solid var(--linha); background: var(--card); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.livro-btn small { color: var(--suave); }
.livro-btn:hover, .cap-btn:hover { border-color: var(--acento-2); }
.grade-caps { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.cap-btn { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--linha); background: var(--card); cursor: pointer; font-weight: 700; font-size: 1rem; }
.cap-btn.lido { background: var(--acento-fundo); color: var(--acento); border-color: transparent; }
.busca-livro { margin-bottom: 14px; }

.leitor h1 { font-family: var(--serif); font-size: 1.7em; margin: 4px 0 16px; text-align: center; font-weight: 600; }
.leitor .plano-aviso { text-align: center; font-size: .85em; color: var(--acento); font-weight: 700; margin: 0 0 -8px; }
.versos { font-family: var(--serif); font-size: 1.14em; line-height: 1.85; }
.versos span.v { cursor: pointer; border-radius: 4px; transition: background .15s; }
.versos span.v sup { font-family: var(--sans); font-size: .62em; font-weight: 700; color: var(--acento); margin: 0 3px 0 6px; vertical-align: .55em; }
.versos span.v.sel { background: var(--acento-fundo); text-decoration: underline; text-decoration-color: var(--acento-2); text-underline-offset: 4px; }
.versos span.v.foco { background: color-mix(in srgb, var(--acento-2) 22%, transparent); }
.versos i, .verso-cartao i { color: var(--suave); }
.rodape-leitor { display: flex; gap: 8px; margin-top: 26px; }
.rodape-leitor .btn { flex: 1; }
.acao-selecao {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav) + 12px + env(safe-area-inset-bottom)); z-index: 12;
  display: flex; gap: 6px; background: var(--texto); color: var(--bg); padding: 6px; border-radius: 999px; box-shadow: var(--sombra);
}
.acao-selecao button { background: none; border: 0; color: inherit; padding: .5rem .9rem; min-height: 40px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.acao-selecao button:hover { background: rgba(255,255,255,.12); }

/* Plano */
.mes { margin-top: 20px; }
.mes h3 { margin: 0 0 8px; font-size: .95em; text-transform: capitalize; }
.grade-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dia-btn {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--linha); background: var(--card); cursor: pointer; position: relative;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; padding: 0; text-decoration: none; color: var(--texto);
}
.dia-btn.lido { background: var(--acento); color: #fff; border-color: var(--acento); }
.dia-btn.parcial { background: var(--acento-fundo); color: var(--acento); }
.dia-btn.atrasado { border-color: var(--acento-2); border-style: dashed; }
.dia-btn.hoje { outline: 2px solid var(--texto); outline-offset: 1px; }
.dia-btn.jejum::after { content: ''; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--acento-2); }
.dia-btn.lido.jejum::after { background: #fff; }
.dia-btn.vazio { visibility: hidden; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--suave); margin-top: 10px; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--linha); display: inline-block; }

.aviso-inicio { text-align: center; }
.aviso-inicio .contagem { font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--acento); margin: 6px 0; }

.carregando { text-align: center; padding: 48px 0; color: var(--suave); }
.vazio-msg { text-align: center; padding: 28px 8px; color: var(--suave); }

/* Folha de ajustes */
.folha { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 88vh; border-radius: 20px 20px 0 0; background: var(--card); color: var(--texto); }
.folha::backdrop { background: rgba(20, 14, 8, .5); }
@media (min-width: 700px) { .folha { margin: auto; border-radius: 20px; } }
.folha-topo { display: flex; align-items: center; padding: 10px 10px 0 20px; }
.folha-topo h2 { flex: 1; margin: 0; font-family: var(--serif); }
.folha-corpo { padding: 0 20px 24px; }
.folha-corpo h3 { font-size: .95rem; margin: 20px 0 8px; }
.folha-corpo p { margin: 0 0 8px; font-size: .9rem; }
.linha-ajuste { display: flex; align-items: center; gap: 12px; }
.linha-ajuste span { min-width: 52px; text-align: center; font-weight: 700; }
.segmentado { display: flex; flex-wrap: wrap; gap: 4px; background: var(--bg); border: 1px solid var(--linha); border-radius: 14px; padding: 4px; }
.segmentado button { flex: 1; border: 0; background: none; border-radius: 10px; padding: .55rem .6rem; min-height: 40px; cursor: pointer; font-weight: 600; color: var(--suave); }
.segmentado button.ativo { background: var(--card); color: var(--acento); box-shadow: var(--sombra); }
#btn-instalar { width: 100%; margin-top: 16px; }
.creditos { margin-top: 24px !important; font-size: .78rem !important; color: var(--suave); line-height: 1.5; }

/* Navegação com 5 abas */
.navegacao { grid-template-columns: repeat(5, 1fr); }
.navegacao a { font-size: .7rem; }
body.sem-nav { padding-bottom: 0; }
body.sem-nav .navegacao, body.sem-nav #btn-ajustes { display: none; }

/* Cadastro */
.boas-vindas { max-width: 440px; margin: 0 auto; text-align: center; padding-top: 12px; }
.boas-vindas h1 { font-family: var(--serif); font-size: 1.8em; margin: 10px 0 2px; font-weight: 600; }
.boas-vindas > p { margin: 0 0 18px; }
.boas-vindas form { text-align: left; }
.boas-vindas .erro { color: var(--perigo); min-height: 1.2em; margin: 8px 0; font-size: .92em; }
.aviso-privacidade { font-size: .8em; color: var(--suave); margin: 12px 0 0; line-height: 1.45; }

/* Mensagem do pastor */
.cartao.recado { border-color: var(--acento-2); background: linear-gradient(0deg, var(--card), var(--acento-fundo)); }
.cartao.recado .btn { margin-top: 4px; }

/* Mural */
.chips-pastores { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -16px 4px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chip-pastor { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 1px solid var(--linha); background: var(--card); border-radius: 999px; padding: 4px 12px 4px 4px; min-height: 40px; text-decoration: none; color: var(--texto); font-weight: 600; font-size: .9rem; }
.chip-pastor:first-child { padding-left: 14px; }
.chip-pastor.ativo { background: var(--acento); border-color: var(--acento); color: #fff; }
.chip-pastor.ativo .mini-avatar { background: rgba(255,255,255,.25); color: #fff; }
.mini-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--acento-fundo); color: var(--acento); display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; text-decoration: none; flex: none; }
.perfil-pastor { display: flex; align-items: center; gap: 14px; margin: 4px 2px 16px; }
.perfil-pastor h1 { font-family: var(--serif); margin: 0; font-size: 1.5em; font-weight: 600; }
.perfil-pastor p { margin: 0; }
.avatar-grande { width: 60px; height: 60px; border-radius: 50%; background: var(--acento); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex: none; }
.post-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-topo a { color: inherit; text-decoration: none; }
.post-topo small { display: block; color: var(--suave); font-size: .8rem; }
.post h3 { font-family: var(--serif); font-size: 1.25em; margin: 0 0 10px; line-height: 1.25; }
.post-video { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; margin-bottom: 10px; display: block; }
.yt { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; aspect-ratio: 16 / 9; background: #000; margin-bottom: 10px; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 44px; border-radius: 12px; background: #d22; color: #fff; display: grid; place-items: center; font-size: 1.2rem; }
.yt-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; margin-bottom: 10px; display: block; }

/* Salvar na tela inicial */
.atalho { text-align: center; padding-top: 24px; }
.atalho img { border-radius: 18px; box-shadow: var(--sombra); }
.atalho h2 { font-family: var(--serif); margin: 12px 0 6px; font-size: 1.4rem; }
.atalho > p { font-size: .95rem !important; }
.passos { list-style: none; counter-reset: passo; text-align: left; margin: 16px 0 4px; padding: 0; display: grid; gap: 10px; }
.passos li { counter-increment: passo; position: relative; background: var(--bg); border-radius: 12px; padding: 10px 12px 10px 50px; line-height: 1.6; min-height: 46px; }
.passos li::before { content: counter(passo); position: absolute; left: 12px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--acento); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.passos .ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--card); border: 1px solid var(--linha); vertical-align: middle; margin: 0 2px; color: #1a73e8; }
.passos .ic svg { width: 16px; height: 16px; }
.atalho-botoes { display: grid; gap: 8px; margin-top: 18px; }
.seta-ios { margin-top: 10px; color: var(--acento); font-weight: 700; font-size: .9rem; }
