/* ═══════════════════════════════════════════
   SPLASH — tela de pré-carregamento
═══════════════════════════════════════════ */
#app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--blue-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.35s ease;
}
#app-splash.fade-out { opacity: 0; pointer-events: none; }
#app-splash img { width: 84px; height: 84px; border-radius: 22px; background: white; padding: 10px; }
#app-splash .splash-title { font-family: var(--font-display); font-style: italic; font-weight: 600; color: white; font-size: 1.1rem; }
#app-splash .splash-spinner {
  width: 22px; height: 22px; border: 3px solid rgba(255,255,255,0.25); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

/* ═══════════════════════════════════════════
   APP SHELL — visual de aplicativo, não de site
═══════════════════════════════════════════ */
body { background: #d4d8e6; }

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  padding-bottom: 96px;
}

@media (min-width: 560px) {
  .app-shell {
    min-height: calc(100vh - 40px);
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
  }
}

/* ═══════════════════════════════════════════
   BANNER "INSTALAR APP"
═══════════════════════════════════════════ */
.install-banner {
  position: relative;
  margin: 12px 16px;
  padding: 12px 40px 12px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
}
.install-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--rose), var(--blue-mid));
  color: white;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.install-banner-body { flex: 1; min-width: 0; }
.install-banner-body .t1 { font-family: var(--font-display); font-weight: 600; font-size: 0.86rem; color: var(--text); }
.install-banner-body .t2 { font-size: 0.72rem; color: var(--text-soft); margin-top: 2px; line-height: 1.4; }
.install-banner-btn {
  flex: none;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--blue-deep);
  border: none;
  font-weight: 700;
  font-size: 0.76rem;
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
}
.install-banner-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-soft);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.install-banner-close svg { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════
   CABEÇALHO GRADIENTE — Início / Perfil
═══════════════════════════════════════════ */
.app-header-gradient {
  padding: 18px 20px 22px;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  border-radius: 0 0 22px 22px;
  color: var(--white);
}
.header-brand { display: flex; align-items: center; gap: 12px; }
.header-logo {
  width: 44px; height: 44px; border-radius: 50%; background: white;
  padding: 5px; object-fit: contain; flex: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.app-header-gradient .title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.2;
}
.app-header-gradient .subtitle {
  font-size: 0.78rem;
  color: var(--gold-light);
  margin-top: 4px;
}

/* Cabeçalho simples (telas internas) */
.app-header {
  padding: 18px 20px 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-header .back-btn {
  background: rgba(0,0,0,0.06);
  border: none;
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
}
.app-header.on-dark .back-btn { background: rgba(255,255,255,0.12); color: white; }
.app-header .title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text);
}
.app-header.on-dark .title { color: var(--white); }
.app-header .subtitle { font-size: 0.72rem; color: var(--text-soft); margin-top: 2px; }
.app-header.on-dark .subtitle { color: rgba(255,255,255,0.6); }

/* Placeholder de imagem — mesmo padrão do mockup */
.stripes {
  background-image: repeating-linear-gradient(135deg, var(--border) 0 10px, #eef0f6 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font: 10px ui-monospace, monospace;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 6px;
}

.hero-photo { margin: 16px 20px 0; height: 130px; border-radius: 14px; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* QUICK ACTIONS — grade de ícones (3 colunas, "quebra" bem com 4 ou 5 itens) */
.quick-grid-4 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 20px 4px;
}
.quick-icon-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--text); }
.quick-icon-tile .box {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.quick-icon-tile.whatsapp .box { background: var(--whatsapp); border-color: var(--whatsapp); color: #fff; }
.quick-icon-tile .label { font-size: 0.66rem; font-weight: 600; text-align: center; color: var(--text); }

/* SEÇÕES */
.section-block { padding: 18px 20px 0; }
.section-title { font-size: 0.82rem; font-weight: 700; color: var(--blue-deep); margin-bottom: 8px; }
.section-title.on-dark { color: rgba(255,255,255,0.85); }

/* AVISOS */
.avisos-list { display: flex; flex-direction: column; gap: 8px; }
.aviso-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start;
}
.aviso-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex: none; }
.aviso-item .title { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.aviso-item .meta  { font-size: 0.72rem; color: var(--text-soft); margin-top: 2px; }

/* Aviso em formato de publicação (com foto) */
.aviso-post {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden;
}
.aviso-post .foto { width: 100%; height: 150px; object-fit: cover; display: block; }
.aviso-post .corpo { padding: 12px 14px; }
.aviso-post .title { font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; color: var(--text); }
.aviso-post .texto { font-size: 0.8rem; color: var(--text); opacity: 0.85; margin-top: 4px; line-height: 1.5; }
.aviso-post .meta  { font-size: 0.72rem; color: var(--text-soft); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.aviso-post .meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

/* DESTAQUES — scroll horizontal */
.destaques-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.destaque-card { flex: none; width: 120px; height: 76px; border-radius: 10px; }

/* HORÁRIOS / LISTAS DE LINHA */
.line-list { display: flex; flex-direction: column; gap: 6px; }
.line-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: 0.82rem; color: var(--text);
}
.line-row .value { color: var(--blue-mid); font-weight: 700; }

/* CTA sólido */
.cta-solid {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: white; text-align: center; border-radius: 12px; padding: 13px;
  font-weight: 700; font-size: 0.88rem; text-decoration: none; display: block;
  box-shadow: var(--shadow);
}
.cta-whatsapp {
  display: flex; align-items: center; gap: 12px;
  background: var(--whatsapp); border-radius: 14px; padding: 14px 16px;
  color: white; text-decoration: none;
}
.cta-whatsapp .avatar { width: 34px; height: 34px; border-radius: 50%; background: white; color: var(--whatsapp); flex: none; display: flex; align-items: center; justify-content: center; }
.cta-whatsapp .text { flex: 1; }
.cta-whatsapp .text .t1 { font-weight: 700; font-size: 0.85rem; }
.cta-whatsapp .text .t2 { font-size: 0.72rem; opacity: 0.75; margin-top: 2px; }

/* VÍDEO / MISSAS */
.video-preview {
  margin: 12px 20px 0; border-radius: 12px; overflow: hidden; position: relative;
  background: var(--blue-deep); height: 150px; text-decoration: none; display: block;
}
.video-preview .play-btn {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.video-preview .play-btn span {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(214,69,69,0.95);
  display: flex; align-items: center; justify-content: center; color: white;
}
.video-preview .badge {
  position: absolute; left: 10px; bottom: 8px; font-size: 0.68rem; color: white;
  background: rgba(0,0,0,0.55); padding: 3px 9px; border-radius: 6px;
}

/* LITURGIA — layout com abas por leitura (inspirado no formato Canção Nova) */
.liturgia-cor-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase; color: var(--blue-deep);
  background: var(--card); border: 1px solid var(--border); padding: 5px 12px 5px 10px; border-radius: 100px;
}
.liturgia-cor-badge .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.liturgia-semana { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.05rem; color: var(--gold-dark); margin-top: 10px; }

.liturgia-tabs { display: flex; gap: 4px; background: var(--border); border-radius: 10px; padding: 3px; margin-bottom: 12px; overflow-x: auto; }
.liturgia-tab {
  flex: 1; white-space: nowrap; text-align: center; padding: 8px 10px; font-size: 0.74rem; font-weight: 700;
  border: none; border-radius: 8px; background: transparent; color: var(--text-soft); cursor: pointer;
  font-family: 'Inter', sans-serif; transition: background 0.15s, color 0.15s;
}
.liturgia-tab.active { background: var(--blue-deep); color: white; }

/* AGENDA — calendário mensal clicável */
.agenda-mes-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.agenda-mes-nav button { background: var(--card); border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--blue); cursor: pointer; }
.agenda-mes-titulo { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.05rem; color: var(--blue-deep); }

.agenda-semana-labels { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 0.66rem; font-weight: 700; color: var(--text-soft); margin-bottom: 4px; }

.agenda-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.agenda-dia {
  aspect-ratio: 1; border: none; background: none; border-radius: 10px; font-size: 0.8rem; color: var(--text);
  cursor: pointer; position: relative; font-family: 'Inter', sans-serif;
}
.agenda-dia.hoje { font-weight: 800; color: var(--blue-deep); }
.agenda-dia.selecionado { background: var(--blue-deep); color: white; }
.agenda-dia.com-evento::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.agenda-dia.selecionado.com-evento::after { background: var(--gold-light); }

/* GALERIA DE FOTOS — álbuns + fotos nativos, sem iframe */
.albuns-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.albuns-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  text-align: left; cursor: pointer; font-family: 'Inter', sans-serif; transition: transform 0.15s ease;
}
.albuns-card:active { transform: scale(0.96); }
.albuns-card .capa { width: 100%; height: 96px; background-size: cover; background-position: center; }
.albuns-card .capa.stripes { font-size: 9px; }
.albuns-card .nome { font-size: 0.78rem; font-weight: 700; color: var(--text); padding: 8px 10px 2px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.albuns-card .data { font-size: 0.68rem; color: var(--text-soft); padding: 0 10px 10px; }

.fotos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.foto-thumb { padding: 0; border: none; background: var(--border); border-radius: 6px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.foto-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox {
  position: fixed; inset: 0; z-index: 5000; background: rgba(8,12,28,0.94);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn 0.2s ease;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; }
.lightbox-fechar {
  position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none; color: white; font-size: 1.1rem; cursor: pointer;
}

/* TRANSMISSÕES — cards de últimos vídeos */
.video-card {
  display: flex; gap: 12px; align-items: center; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 8px; text-align: left;
  width: 100%; cursor: pointer; font-family: 'Inter', sans-serif; transition: border-color 0.15s, transform 0.15s ease;
}
.video-card:active { transform: scale(0.97); }
.video-card.selected { border-color: var(--gold); background: #fdf8ee; }
.video-card .thumb { width: 88px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: var(--border); }
.video-card .info { flex: 1; min-width: 0; }
.video-card .info .t1 { font-weight: 700; font-size: 0.78rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.video-card .info .t2 { font-size: 0.7rem; color: var(--text-soft); margin-top: 4px; }

/* PODCAST */
.podcast-item {
  display: flex; gap: 12px; align-items: center; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 10px;
}
.podcast-item .cover { width: 52px; height: 52px; border-radius: 8px; flex: none; }
.podcast-item .info { flex: 1; min-width: 0; }
.podcast-item .info .t1 { font-weight: 700; font-size: 0.82rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podcast-item .info .t2 { font-size: 0.72rem; color: var(--text-soft); margin-top: 2px; }
.podcast-item .play {
  width: 30px; height: 30px; border-radius: 50%; background: var(--blue-mid); flex: none;
  display: flex; align-items: center; justify-content: center; color: white;
}

/* AUTENTICAÇÃO */
.auth-tabs { display: flex; background: var(--border); border-radius: 10px; padding: 3px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; text-align: center; padding: 8px; font-size: 0.78rem; font-weight: 700;
  border: none; border-radius: 8px; background: transparent; color: var(--text-soft); cursor: pointer;
}
.auth-tabs button.active { background: white; color: var(--blue-deep); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.7rem; color: var(--text-soft); margin-bottom: 4px; }
.field input {
  width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 12px; font-size: 0.85rem; color: var(--text); font-family: 'Inter', sans-serif;
}
.field input:focus { outline: none; border-color: var(--blue-mid); }

.auth-link { text-align: right; font-size: 0.72rem; color: var(--blue-mid); margin-top: 6px; text-decoration: none; display: block; }

/* PERFIL */
.profile-header {
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  padding: 24px 20px 42px; border-radius: 0 0 24px 24px; text-align: center; color: white;
}
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; border: 2px solid rgba(217,181,103,0.6); background: var(--blue-mid); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.4rem; }
.profile-header .name { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.15rem; }
.profile-header .since { font-size: 0.72rem; color: var(--gold-light); margin-top: 2px; }

.profile-menu { margin: -24px 20px 0; background: white; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.profile-menu a, .profile-menu button.menu-btn {
  padding: 13px 16px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #f0f1f6; font-size: 0.82rem; color: var(--text); text-decoration: none;
  width: 100%; background: none; border-left: none; border-right: none; border-top: none; text-align: left; cursor: pointer;
}
.profile-menu a:last-child, .profile-menu button.menu-btn:last-child { border-bottom: none; }
.profile-menu .chev { color: var(--text-soft); }

.signout-link { display: block; margin-top: auto; padding: 16px 20px 22px; text-align: center; font-size: 0.78rem; color: var(--red-soft); background: none; border: none; width: 100%; cursor: pointer; }

/* QUICK ACTIONS (home tile grid antigo, mantido p/ compat) */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 0 20px 20px;
}
.quick-tile {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.quick-tile .tile-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--blue); color: white; display: flex; align-items: center; justify-content: center; }
.quick-tile .tile-title { font-family: var(--font-display); font-weight: 700; font-style: italic; font-size: 0.95rem; }
.quick-tile .tile-sub   { font-size: 0.76rem; color: var(--text-soft); line-height: 1.4; }

/* EYEBROW / LABEL DE SEÇÃO (usado na Revista) */
.section-label-app {
  padding: 18px 20px 10px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  font-style: italic;
  color: var(--text-soft);
}
.section-label-app.on-dark { color: rgba(255,255,255,0.6); }

/* BOTTOM NAV — pílula flutuante, 5 abas */
.app-bottomnav {
  position: fixed;
  bottom: 14px;
  left: 0;
  right: 0;
  max-width: 380px;
  margin: 0 auto;
  background: var(--blue-deep);
  border-radius: 100px;
  display: flex;
  justify-content: space-between;
  padding: 8px 6px;
  box-shadow: 0 12px 32px rgba(28,39,71,0.4);
  z-index: 60;
}

.app-bottomnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: rgba(255,255,255,0.5);
  font-size: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 100px;
  transition: background 0.2s, color 0.2s;
  flex: 1;
}

.app-bottomnav a.active { color: var(--blue-deep); background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.app-bottomnav a svg { width: 18px; height: 18px; }

/* LIST — edições da revista */
.list-section { padding: 0 20px 20px; }

.rv-card {
  display: flex;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.rv-card .cover {
  width: 52px;
  height: 68px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  overflow: hidden;
}
.rv-card .cover img { width: 100%; height: 100%; object-fit: cover; }

.rv-card .info { flex: 1; min-width: 0; }
.rv-card .info .title { font-family: var(--font-display); font-weight: 600; font-style: italic; font-size: 0.95rem; line-height: 1.3; }
.rv-card .info .sub   { font-size: 0.76rem; color: var(--text-soft); margin-top: 3px; }
.rv-card .chev { color: var(--gold-dark); flex-shrink: 0; }

/* SKELETON */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton { background: linear-gradient(90deg, var(--border) 25%, #dbdfec 50%, var(--border) 75%); background-size: 400px 100%; animation: shimmer 1.4s infinite linear; border-radius: 8px; }
.skeleton-rv { display: flex; gap: 14px; background: var(--card); border-radius: var(--radius-md); padding: 12px; margin-bottom: 12px; }
.skeleton-rv .cover { width: 52px; height: 68px; border-radius: 6px; flex-shrink: 0; }
.skeleton-rv .lines { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.skeleton-rv .lines div { height: 12px; }
.skeleton-rv .lines div:first-child { width: 70%; }
.skeleton-rv .lines div:last-child { width: 45%; }
