/* Prévia navegável num mockup de iPhone atual. A tela interna é desenhada em 390 x 844 e
   escalada por --k (definido em js/previa.js conforme a largura disponível). */
.iphone {
  --k: 0.82;
  --borda: 11px;
  position: relative;
  width: calc(390px * var(--k) + var(--borda) * 2);
  padding: var(--borda);
  border-radius: calc(56px * var(--k) + var(--borda));
  background: linear-gradient(145deg, #3B4C66 0%, #1F2A3A 45%, #2B3850 100%);
  box-shadow: 0 0 0 1.5px #56657E inset, 0 24px 60px rgba(31, 42, 58, 0.35), 0 4px 0 rgba(31, 42, 58, 0.1);
  flex-shrink: 0;
}
/* botões laterais da moldura */
.iphone::before, .iphone::after {
  content: ""; position: absolute; width: 4px; border-radius: 3px; background: #2B3850;
}
.iphone::before { left: -3px; top: 22%; height: 9%; box-shadow: 0 calc(844px * var(--k) * 0.12) 0 #2B3850; }
.iphone::after { right: -3px; top: 27%; height: 13%; }

.iphone-tela {
  position: relative; overflow: hidden;
  width: calc(390px * var(--k)); height: calc(844px * var(--k));
  border-radius: calc(46px * var(--k));
  background: #F8F3E6;
  isolation: isolate;
}
.app {
  position: absolute; left: 0; top: 0; width: 390px; height: 844px;
  transform: scale(var(--k)); transform-origin: 0 0;
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif; color: #1F2A3A;
  overflow: hidden; user-select: none; -webkit-user-select: none;
}
.app button { font-family: inherit; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
.app button:focus-visible { outline: 3px solid #3F6E96; outline-offset: 2px; }

/* barra de status, ilha dinâmica e indicador de início */
.ilha { position: absolute; z-index: 30; top: 11px; left: 50%; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: #0B0F16; }
.status { position: absolute; z-index: 29; top: 0; left: 0; right: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 40px; font-size: 16px; font-weight: 700; pointer-events: none; transition: color 0.4s; }
.status svg { width: 64px; height: 14px; }
.app.escuro .status { color: #FFFDF7; }
.indicador { position: absolute; z-index: 31; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #1F2A3A; opacity: 0.85; pointer-events: none; }
.app.escuro .indicador { background: #FFFDF7; }

/* telas */
.tela { position: absolute; inset: 0 0 84px 0; overflow: hidden; display: none; }
.tela.ativa { display: block; }

/* barra de abas */
.abas { position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; height: 84px; padding: 8px 8px 22px; display: flex; justify-content: space-around; background: #F8F3E6; border-top: 1px solid rgba(31, 42, 58, 0.1); }
.aba { width: 72px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: #4A5568; padding: 4px 0; }
.aba svg { width: 26px; height: 26px; }
.aba[aria-current="page"] { color: #1F2A3A; }
.aba[aria-current="page"] .preenche { fill: #D9A441; }

/* ---------- feed ---------- */
.feed-palco { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.feed-palco:active { cursor: grabbing; }
.cartao-feed { position: absolute; inset: 0; will-change: transform; }
.cartao-feed .deco { position: absolute; top: 0; left: 0; pointer-events: none; }
.feed-conteudo { position: absolute; top: 170px; left: 28px; right: 92px; display: flex; flex-direction: column; gap: 16px; }
.chip { align-self: flex-start; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); }
.feed-conteudo .texto { font-family: Georgia, 'Times New Roman', serif; font-size: 25px; line-height: 1.38; }
.feed-conteudo .ref { font-size: 15px; font-weight: 700; }
.feed-conteudo .adaptacao, .adaptacao { font-size: 12.5px; opacity: 0.75; }
.feed-topo { position: absolute; z-index: 5; top: 62px; left: 0; right: 0; text-align: center; font-size: 16px; font-weight: 700; pointer-events: none; }
.feed-topo span { border-bottom: 3px solid #D9A441; padding-bottom: 4px; }
.lateral { position: absolute; z-index: 6; right: 14px; bottom: 150px; display: flex; flex-direction: column; gap: 16px; }
.botao-lateral { width: 60px; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.botao-lateral .bola { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.6); transition: background 0.25s; }
.botao-lateral svg { width: 25px; height: 25px; }
.botao-lateral[aria-pressed="true"] .bola { background: #D9A441; color: #1F2A3A; }
.app.escuro .botao-lateral .bola, .app.escuro .chip { background: rgba(248, 243, 230, 0.16); }
.app.escuro .botao-lateral[aria-pressed="true"] .bola { background: #D9A441; }
.proxima { position: absolute; z-index: 6; left: 50%; bottom: 22px; margin-left: -80px; width: 160px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; opacity: 0.8; }
.proxima svg { width: 20px; height: 20px; }
.app.escuro .tela-feed { color: #FFFDF7; }

/* ---------- início ---------- */
.inicio-cabeca { height: 252px; padding: 64px 22px 0; background: linear-gradient(180deg, #CFE1F0 0%, #F3E3C3 78%, #F8F3E6 100%); position: relative; }
.inicio-cabeca .sol { position: absolute; right: 18px; top: 52px; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, #F2C14E 0 36%, rgba(242, 193, 78, 0.35) 37% 60%, transparent 61%); }
.inicio-cabeca .data { font-size: 14px; font-weight: 700; color: #4A5568; }
.inicio-cabeca h3 { font-family: Georgia, serif; font-size: 32px; margin: 2px 0 2px; }
.inicio-cabeca .seguidos { font-size: 15px; font-weight: 700; color: #4A5568; }
.dias { display: flex; gap: 6px; margin-top: 14px; }
.dias span { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, 0.7); }
.dias span.lido { background: #D9A441; }
.dias span svg { width: 18px; height: 18px; }
.dias span.hoje { box-shadow: inset 0 0 0 2px #A97A1E; }
.mensagem-hoje { margin: -14px 18px 0; position: relative; width: calc(100% - 36px); display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 0; border-radius: 22px; background: #1F2A3A; color: #F8F3E6 !important; text-align: left; box-shadow: 0 10px 24px rgba(31, 42, 58, 0.22); }
.maco-mini { position: relative; width: 58px; height: 74px; flex-shrink: 0; }
.maco-mini i { position: absolute; top: 4px; width: 46px; height: 66px; border-radius: 9px; }
.maco-mini i:nth-child(1) { left: 10px; background: #8A6F4E; transform: rotate(10deg); }
.maco-mini i:nth-child(2) { left: 6px; background: #6F8F5A; transform: rotate(3deg); }
.maco-mini i:nth-child(3) { left: 2px; background: #D9A441; border: 2px solid #F8F3E6; display: grid; place-items: center; }
.maco-mini svg { width: 22px; height: 22px; }
.mensagem-hoje .titulo { display: flex; flex-direction: column; gap: 3px; }
.mensagem-hoje small { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: #F2C14E; }
.mensagem-hoje strong { font-family: Georgia, serif; font-size: 18px; line-height: 1.25; }
.inicio-temas { padding: 20px 18px 0; }
.inicio-temas-cabeca { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.inicio-temas h4 { font-family: Georgia, serif; font-size: 20px; margin: 0; }
.ver-todos { border: 0; background: none; display: flex; align-items: center; gap: 2px; min-height: 40px; font-size: 14px; font-weight: 700; color: #3F6E96 !important; }
.ver-todos svg { width: 16px; height: 16px; }
.grade-temas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cartao-tema { position: relative; overflow: hidden; height: 108px; padding: 12px 14px; border: 2px solid transparent; border-radius: 20px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; }
.cartao-tema::after { content: ""; position: absolute; right: -14px; bottom: -14px; width: 60px; height: 60px; border-radius: 50%; background: var(--orbe); }
.cartao-tema b { font-family: Georgia, serif; font-size: 17px; line-height: 1.2; position: relative; z-index: 1; padding-right: 6px; }
.cartao-tema span { font-size: 12px; line-height: 1.3; color: #4A5568; position: relative; z-index: 1; padding-right: 26px; }
.cartao-tema .motivo { position: absolute; right: 9px; bottom: 9px; width: 24px; height: 24px; z-index: 1; opacity: 0.85; }
.pagina-tema { position: absolute; inset: 0; z-index: 8; padding: 62px 20px 0; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.pagina-tema.abrindo { animation: abrir-tema 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes abrir-tema { from { clip-path: circle(0 at var(--cx) var(--cy)); } to { clip-path: circle(150% at var(--cx) var(--cy)); } }
.pagina-tema .voltar { align-self: flex-start; height: 44px; padding: 0 16px 0 10px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.75); font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.pagina-tema .voltar svg { width: 20px; height: 20px; }
.pagina-tema h3 { font-family: Georgia, serif; font-size: 32px; margin: 0; }
.pagina-tema .frase-tema { font-size: 15px; font-weight: 700; color: #3D4A5C; margin: -6px 0 2px; }
.passagem-tema { background: rgba(255, 255, 255, 0.78); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; animation: subir 0.5s both; }
.passagem-tema p { margin: 0; font-family: Georgia, serif; font-size: 17px; line-height: 1.42; }
.passagem-tema b { font-size: 13px; color: #4A5568; }
@keyframes subir { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- cartas ---------- */
.tela-cartas { background: linear-gradient(180deg, #121B2B 0%, #1F2A3A 55%, #2E3D55 100%); color: #F8F3E6; }
.tela-cartas .estrelas { position: absolute; top: 0; left: 0; pointer-events: none; }
.cartas-topo { position: absolute; top: 66px; left: 0; right: 0; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: #F2C14E; }
.cartas-fechado, .cartas-aberto { position: absolute; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; }
.cartas-fechado { top: 112px; gap: 22px; }
.cartas-fechado h3 { font-family: Georgia, serif; font-size: 26px; line-height: 1.25; text-align: center; padding: 0 44px; margin: 0; }
.maco { position: relative; width: 224px; height: 316px; border: 0; background: none; padding: 0; }
.maco.tremendo { animation: tremer 0.35s ease-in-out 3; }
@keyframes tremer { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg) translateY(-4px); } 75% { transform: rotate(4deg) translateY(-2px); } }
.maco i { position: absolute; width: 184px; height: 268px; border-radius: 22px; }
.maco i:nth-child(1) { left: 30px; top: 18px; background: #8A6F4E; transform: rotate(9deg); }
.maco i:nth-child(2) { left: 22px; top: 14px; background: #6F8F5A; transform: rotate(4deg); }
.maco i:nth-child(3) { left: 14px; top: 12px; background: #5B8DB8; transform: rotate(-3deg); }
.maco .frente { position: absolute; left: 18px; top: 16px; width: 184px; height: 268px; border-radius: 22px; background: #D9A441; border: 3px solid #F8F3E6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #1F2A3A; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); font-family: Georgia, serif; font-size: 18px; font-weight: 700; }
.maco .frente svg { width: 72px; height: 72px; }
.cartas-aberto { top: 96px; gap: 14px; padding: 0 26px; }
.carta { width: 316px; min-height: 340px; border-radius: 26px; background: linear-gradient(180deg, #CFE1F0 0%, #F3E3C3 70%, #F8F3E6 100%); color: #1F2A3A; padding: 22px; display: flex; flex-direction: column; gap: 12px; border: 3px solid #D9A441; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); position: relative; overflow: hidden; animation: virar 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.carta::before { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: #F2C14E; opacity: 0.75; }
.carta .chip { position: relative; }
.carta p { margin: 0; font-family: Georgia, serif; font-size: 22px; line-height: 1.36; position: relative; }
.carta .ref { font-size: 15px; font-weight: 700; color: #4A5568; }
.carta .contexto { margin-top: auto; font-size: 13.5px; line-height: 1.45; color: #3D4A5C; border-top: 1px solid rgba(31, 42, 58, 0.15); padding-top: 10px; }
@keyframes virar { 0% { transform: perspective(900px) rotateY(90deg) scale(0.8); opacity: 0; } 60% { transform: perspective(900px) rotateY(-12deg) scale(1.03); opacity: 1; } 100% { transform: perspective(900px) rotateY(0) scale(1); } }
.cartas-acoes { display: flex; gap: 10px; animation: subir 0.5s 0.7s both; }
.cartas-acoes button { height: 46px; padding: 0 20px; border-radius: 999px; border: 0; background: rgba(248, 243, 230, 0.14); color: #F8F3E6; font-size: 15px; font-weight: 700; }
.cartas-acoes button[aria-pressed="true"] { background: #D9A441; color: #1F2A3A; }
.embaralhar { border: 0; background: none; color: #F2C14E !important; font-size: 15px; font-weight: 700; padding: 8px; animation: subir 0.5s 0.85s both; }

/* ---------- o Jesus guia ---------- */
.guia { position: absolute; z-index: 25; left: 0; top: 0; width: 92px; height: 97px; pointer-events: none; transition-property: left, top; transition-timing-function: ease-in-out; }
.guia-corpo { width: 100%; height: 100%; transition: transform 0.45s ease-out; }
.guia svg { width: 100%; height: 100%; overflow: visible; }
.balao { position: absolute; z-index: 26; max-width: 168px; padding: 8px 11px; border-radius: 14px; background: #FFFFFF; color: #1F2A3A; border: 2px solid #D9A441; box-shadow: 0 6px 16px rgba(31, 42, 58, 0.22); font-size: 13px; font-weight: 700; line-height: 1.3; pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }
.balao.visivel { opacity: 1; transform: none; }
.balao::after { content: ""; position: absolute; bottom: -8px; left: var(--rabo, 50%); width: 12px; height: 12px; margin-left: -6px; background: #FFFFFF; border-right: 2px solid #D9A441; border-bottom: 2px solid #D9A441; transform: rotate(45deg); }
.onda { position: absolute; z-index: 24; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 4px solid #D9A441; background: rgba(242, 193, 78, 0.25); pointer-events: none; animation: onda 0.6s ease-out forwards; }
@keyframes onda { from { transform: scale(0.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* Início rola, como no app; o Jesus fica no canto de baixo e há espaço no fim para ele. */
.tela-inicio { overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.tela-inicio::-webkit-scrollbar { display: none; }
.inicio-mais { padding: 22px 18px 130px; display: flex; flex-direction: column; gap: 16px; }
.cartao-inicio { border: 0; border-radius: 22px; padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 4px; background: #FFFDF7; box-shadow: 0 6px 18px rgba(31, 42, 58, 0.08); }
.cartao-inicio small { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: #3F6E96; }
.cartao-inicio small em { font-style: normal; font-size: 11px; color: #1F2A3A; background: #D9A441; border-radius: 999px; padding: 2px 8px; }
.cartao-inicio small svg { width: 16px; height: 16px; }
.cartao-inicio strong { font-family: Georgia, serif; font-size: 22px; line-height: 1.25; }
.cartao-inicio > span { font-size: 14px; font-weight: 700; color: #4A5568; }
.cartao-inicio p { margin: 6px 0 2px; font-family: Georgia, serif; font-size: 18px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cartao-inicio.semana { background: #DCEBF5; }
.cartao-inicio.do-dia small { color: #A97A1E; }
.cartao-inicio.ajuda { flex-direction: row; align-items: center; gap: 12px; background: #F8F3E6; box-shadow: none; border: 1.5px solid #E3D8C2; }
.cartao-inicio.ajuda > svg { width: 18px; height: 18px; color: #4A5568; }
.ajuda-icone { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: #DCEBF5; display: grid; place-items: center; color: #2E557A; }
.ajuda-icone svg { width: 20px; height: 20px; }
.ajuda-texto { flex: 1; display: flex; flex-direction: column; }
.ajuda-texto b { font-size: 15px; }
.ajuda-texto span { font-size: 13px; color: #4A5568; }
.pagina-tema { overflow-y: auto; scrollbar-width: none; padding-bottom: 130px; }
.pagina-tema::-webkit-scrollbar { display: none; }
.tela-inicio.travada { overflow: hidden; }
.status { transition: color 0.4s, background 0.25s; }
.app.inicio-rolada .status { background: #F8F3E6; box-shadow: 0 1px 0 rgba(31, 42, 58, 0.08); }

/* "hidden" vale mesmo em elementos com display próprio (o maço sumia só no código, não na tela). */
.app [hidden] { display: none !important; }
