:root {
  --page-pad: 20px;
  --top-inset: env(safe-area-inset-top, 0px);
  --bottom-inset: env(safe-area-inset-bottom, 0px);
  --top-gap: 8px;
  --top-ui: calc(var(--page-pad) + var(--top-inset) + var(--top-gap));
  /* ✅ Layout: largura máxima profissional para conteúdo (iPad standard = 768px) */
  --max-content-width: 768px;
  /* ✅ Calcula o padding lateral necessário para centralizar conteúdo em telas grandes */
  --content-padding: max(var(--page-pad), calc((100vw - var(--max-content-width)) / 2));
  /* ✅ Layout: cor do fundo externo (profissional) */
  --bg-external: #f5f7f6;
  /* ✅ Layout: cor da borda (elegante) */
  --border-color: rgba(21, 107, 76, 0.08);

  /* ===============================
     ✅ SISTEMA DE CORES PROFISSIONAL (Light Mode)
  =============================== */

  /* --- CORES PRIMÁRIAS (Verde IPB) --- */
  --color-primary: #156b4c;           /* Verde IPB principal */
  --color-primary-dark: #0f5a3f;      /* Verde escuro (hover, gradientes) */
  --color-primary-light: #1a7a5a;      /* Verde claro (hover states) */
  --color-primary-lighter: #43d3a2;   /* Verde muito claro (accent) */
  --color-primary-lightest: #d6f1e7;   /* Verde muito suave (backgrounds sutis) */

  /* --- CORES DE FUNDO --- */
  --bg-primary: #ffffff;              /* Fundo principal */
  --bg-secondary: #fafcfb;            /* Fundo secundário */
  --bg-tertiary: #f5f7f6;             /* Fundo terciário */
  --bg-card: rgba(255, 255, 255, 0.95); /* Fundo de cards */
  --bg-card-hover: rgba(255, 255, 255, 1); /* Fundo de cards hover */
  --bg-overlay: rgba(255, 255, 255, 0.9);  /* Overlays, modais */
  --bg-subtle: rgba(21, 107, 76, 0.06);    /* Fundos sutis com verde */
  --bg-subtle-hover: rgba(21, 107, 76, 0.1); /* Fundos sutis hover */

  /* --- CORES DE TEXTO --- */
  --text-primary: #000000;            /* Texto principal */
  --text-secondary: rgba(0, 0, 0, 0.7); /* Texto secundário */
  --text-tertiary: rgba(0, 0, 0, 0.5);  /* Texto terciário (metadata) */
  --text-inverse: #ffffff;            /* Texto invertido (sobre verde) */
  --text-primary-color: #156b4c;      /* Texto com cor primária */
  --text-muted: rgba(21, 107, 76, 0.7); /* Texto muted */

  /* --- CORES DE BORDA --- */
  --border-primary: rgba(21, 107, 76, 0.2);   /* Borda principal */
  --border-secondary: rgba(21, 107, 76, 0.15); /* Borda secundária */
  --border-subtle: rgba(21, 107, 76, 0.08);     /* Borda sutil */
  --border-focus: #156b4c;                      /* Borda de foco */

  /* --- CORES DE ESTADO --- */
  --state-hover-bg: rgba(21, 107, 76, 0.08);   /* Background hover */
  --state-active-bg: rgba(21, 107, 76, 0.12);   /* Background active */
  --state-disabled: rgba(0, 0, 0, 0.3);        /* Estado desabilitado */
  --state-success: #156b4c;                     /* Sucesso */
  --state-error: #dc3545;                      /* Erro */
  --state-warning: #ffc107;                    /* Aviso */

  /* --- CORES DE COMPONENTES --- */
  --btn-primary-bg: #156b4c;                  /* Botão primário background */
  --btn-primary-text: #ffffff;                /* Botão primário texto */
  --btn-primary-hover: #0f5a3f;               /* Botão primário hover */
  --btn-secondary-bg: rgba(21, 107, 76, 0.1); /* Botão secundário background */
  --btn-secondary-text: #156b4c;              /* Botão secundário texto */
  --btn-secondary-hover: rgba(21, 107, 76, 0.15); /* Botão secundário hover */

  /* --- SOMBRAS --- */
  --shadow-sm: 0 1px 3px rgba(21, 107, 76, 0.05);
  --shadow-md: 0 2px 8px rgba(21, 107, 76, 0.08);
  --shadow-lg: 0 4px 12px rgba(21, 107, 76, 0.12);
  --shadow-xl: 0 8px 24px rgba(21, 107, 76, 0.15);

  /* ===============================
     ✅ TIPOGRAFIA SISTEMÁTICA (Escala Modular)
  =============================== */
  /* Escala de tamanhos (base 4px) */
  --font-size-xs: 12px;      /* Textos muito pequenos, labels discretos */
  --font-size-sm: 14px;      /* Textos pequenos, subtítulos, metadata */
  --font-size-base: 16px;    /* Corpo de texto padrão */
  --font-size-md: 18px;      /* Textos médios, destaques */
  --font-size-lg: 20px;      /* Textos grandes, versículos */
  --font-size-xl: 24px;      /* Títulos médios */
  --font-size-2xl: 28px;     /* Títulos grandes (mobile) */
  --font-size-3xl: 32px;     /* Títulos principais (desktop) */
  --font-size-4xl: 36px;     /* Títulos hero/display */

  /* Line-height sistemático */
  --line-height-tight: 1.2;   /* Títulos, elementos compactos */
  --line-height-normal: 1.5;  /* Corpo padrão */
  --line-height-relaxed: 1.6; /* Textos longos, leitura */
  --line-height-loose: 1.75;  /* Versículos, citações */

  /* Font-weight sistemático */
  --font-weight-normal: 400;   /* Corpo padrão */
  --font-weight-medium: 500;   /* Destaques, ênfase */
  --font-weight-semibold: 600; /* Subtítulos, labels importantes */
  --font-weight-bold: 700;     /* Títulos principais */
  --font-weight-extrabold: 800; /* Títulos hero, display */

  /* Letter-spacing sistemático */
  --letter-spacing-tight: -0.5px;  /* Títulos grandes */
  --letter-spacing-normal: 0;      /* Corpo padrão */
  --letter-spacing-wide: 0.3px;    /* Labels, botões */
  --letter-spacing-wider: 0.5px;   /* Textos em maiúsculas */
  --letter-spacing-widest: 1px;    /* Textos muito pequenos em maiúsculas */
}

/* ===============================
   A11Y: Skip Link
=============================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #156b4c;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ===============================
   A11Y: Foco Visível
=============================== */
*:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

/* Modais: foco mais visível */
.modal button:focus-visible,
.modal a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
/* ===============================
   BOOT (ANTI-FLICKER)
   Evita piscar a tela inicial no reload (mobile)
=============================== */
body.booting .inicio,
body.booting #plano,
body.booting #biblia,
body.booting #reader,
body.booting #bloco-progresso,
body.booting #nav-modos,
body.booting .cabecalho,
body.booting #btn-config,
body.booting #btn-favoritos-global {
  visibility: hidden;
}

/* ✅ FIX: Elementos que piscam - começam invisíveis até renderização completa */
#hinario:not(.renderizado),
.btn-config-avatar-mode:not(.renderizado),
#biblia-livros-at:not(.renderizado),
#biblia-livros-nt:not(.renderizado) {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#hinario.renderizado,
.btn-config-avatar-mode.renderizado,
#biblia-livros-at.renderizado,
#biblia-livros-nt.renderizado {
  opacity: 1 !important;
  visibility: visible !important;
}

/* ===============================
   RESET BÁSICO
=============================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ✅ Layout: Fundo externo profissional (aparece além da largura máxima) */
html {
  background: var(--bg-external);
  min-height: 100vh;
}

/* ✅ Layout: Dark mode - aplica fundo externo no html */
html[data-theme='dark'] {
  --bg-external: #0a1411;
  background: var(--bg-external);

  /* ===============================
     ✅ SISTEMA DE CORES PROFISSIONAL (Dark Mode)
     Verde único (logo-like) + tokens derivados
  =============================== */

  /* --- CORES PRIMÁRIAS (Verde IPB - Dark | UNIFICADO) --- */
  --color-primary: #005d38;
  --color-primary-rgb: 0, 130, 78;
  --color-config-button: #06301f;

  /* derivados (premium = pouca variação) */
  --color-primary-dark: #006a40;
  --color-primary-light: #15804e;
  --color-primary-lighter: #43d3a2;
  --color-primary-lightest: rgba(var(--color-primary-rgb), 0.14);

  /* --- CORES DE FUNDO (Dark) --- */
  --bg-primary: #0b1411;
  --bg-secondary: #0c1613;
  --bg-tertiary: #11201b;
  --bg-card: #0f1e19;
  --bg-card-hover: #13241f;
  --bg-overlay: rgba(11, 20, 17, 0.96);

  /* verde sutil (sem neon) */
  --bg-subtle: rgba(var(--color-primary-rgb), 0.10);
  --bg-subtle-hover: rgba(var(--color-primary-rgb), 0.16);

  /* --- CORES DE TEXTO (Dark) --- */
  --text-primary: #e6f3ee;
  --text-secondary: rgba(230, 243, 238, 0.8);
  --text-tertiary: rgba(230, 243, 238, 0.65);
  --text-inverse: #08140f;
  --text-primary-color: var(--color-primary);
  --text-muted: rgba(230, 243, 238, 0.65);

  /* --- CORES DE BORDA (Dark) --- */
  --border-primary: rgba(var(--color-primary-rgb), 0.22);
  --border-secondary: rgba(var(--color-primary-rgb), 0.14);
  --border-subtle: rgba(var(--color-primary-rgb), 0.10);
  --border-focus: var(--color-primary-light);

  /* --- CORES DE ESTADO (Dark) --- */
  --state-hover-bg: rgba(var(--color-primary-rgb), 0.14);
  --state-active-bg: rgba(var(--color-primary-rgb), 0.20);
  --state-disabled: rgba(230, 243, 238, 0.3);
  --state-success: var(--color-primary);
  --state-error: #ff6b6b;
  --state-warning: #ffd93d;

  /* --- CORES DE COMPONENTES (Dark) --- */
  --btn-primary-bg: var(--color-primary-dark);
  --btn-primary-text: #f2fffa;
  --btn-primary-hover: var(--color-primary);

  --btn-secondary-bg: rgba(var(--color-primary-rgb), 0.14);
  --btn-secondary-text: #bdecd9;
  --btn-secondary-hover: rgba(var(--color-primary-rgb), 0.20);

  /* --- CORES ESPECÍFICAS DE COMPONENTES (Dark) --- */
  --editor-bg: #0b1411;
  --editor-border: rgba(var(--color-primary-rgb), 0.22);
  --editor-focus: rgba(var(--color-primary-rgb), 0.42);

  --modal-overlay: rgba(0, 0, 0, 0.75);
  --modal-bg: #0c1613;
  --modal-border: rgba(var(--color-primary-rgb), 0.18);

  --pdf-bg: #0b1411;
  --pdf-header-bg: #0f1e19;
  --pdf-header-border: rgba(var(--color-primary-rgb), 0.18);

  --switch-track: rgba(255, 255, 255, 0.1);
  --switch-thumb: rgba(255, 255, 255, 0.9);
  --switch-thumb-on: var(--color-primary);

  --badge-bg: #0f1e19;
  --badge-border: rgba(var(--color-primary-rgb), 0.18);
  --badge-dot: rgba(var(--color-primary-rgb), 0.70);

  --tablature-text: rgba(230, 243, 238, 0.9);
  --chord-color: #3bce6f;
  --lyric-color: #e6f3ee;

  --comment-bg: rgba(var(--color-primary-rgb), 0.10);
  --comment-text: #aaaaaa;

  --restore-bg: rgba(185, 56, 56, 0.12);
  --restore-border: rgba(255, 154, 143, 0.35);
  --restore-text: #ff9a8f;
  --restore-hover: rgba(185, 56, 56, 0.18);

  --btn-cancel-bg: rgba(255, 255, 255, 0.06);
  --btn-cancel-text: rgba(230, 243, 238, 0.85);
  --btn-cancel-border: rgba(255, 255, 255, 0.1);

  --btn-confirm-bg: #b93838;
  --btn-confirm-text: #ffffff;
  --btn-confirm-hover: #9f2f2f;

  --modal-icon-bg: rgba(255, 200, 80, 0.12);
  --modal-icon-border: rgba(255, 200, 80, 0.22);
  --modal-icon-text: rgba(230, 243, 238, 0.9);
  --modal-text-color: rgba(230, 243, 238, 0.78);

  --modal-check-bg: rgba(255, 255, 255, 0.06);
  --modal-check-border: rgba(255, 255, 255, 0.12);
  --modal-check-text: #dddddd;

  --thumbnail-bg: #1a1a1a;
  --thumbnail-border: rgba(var(--color-primary-rgb), 0.22);
  --thumbnail-loading: rgba(230, 243, 238, 0.7);
  --thumbnail-error: #ff6b6b;

  --pdf-page-bg: #11201b;
  --pdf-page-border: rgba(255, 255, 255, 0.08);

  /* glow discreto (token; sem obrigar uso) */
  --glow-soft: 0 0 0 3px rgba(var(--color-primary-rgb), 0.10);
  --glow-sm: 0 4px 16px rgba(var(--color-primary-rgb), 0.14);

  /* --- SOMBRAS (Dark) --- */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.6);
}

body {
  font-family: 'Inter', sans-serif;
  /* ✅ Tipografia base sistemática */
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);

  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;

  /* ✅ SAFE-AREA */
  padding: var(--top-ui) var(--page-pad) calc(var(--page-pad) + var(--bottom-inset));

  /* ✅ Layout: limita largura máxima do conteúdo (profissional) */
  max-width: var(--max-content-width);
  margin: 0 auto;
  position: relative;

  /* ✅ Layout: Borda elegante e profissional (light mode - telas pequenas) */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 10px 15px rgba(0, 0, 0, 0.08);
}

/* ✅ Layout: Dark mode - ajusta fundo externo, cor e remove borda (deixa natural e flutuante) */
body[data-theme='dark'] {
  --bg-external: var(--bg-secondary);
  --border-color: var(--border-subtle);
  background: var(--bg-primary);
  /* ✅ Removida borda em telas pequenas para deixar mais natural e flutuante */

}

h2,
h3,
.dia-titulo,
.ipb-nome {
  font-family: 'Playfair Display', serif;
}
/* ===============================
   CABEÇALHO
=============================== */
.cabecalho {
  margin: 0 auto;
  position: relative;
  text-align: center;
  max-width: 768px;
  /* z-index padrão (0) - botões de config têm z-index maior, então não sobrepõe */
}

/* ===============================
   CABEÇALHO IPB - DESIGN PROFISSIONAL
=============================== */

/* bloco IPB (logo + nome) */
.ipb-bloco {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1; /* Garante que não fique embaixo de botões */
}

/* Logo IPB - Design elegante */
.logo {
  width: 98px;
  height: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(21, 107, 76, 0.15));
}

/* Hover sutil no logo (desktop) */
@media (hover: hover) {
  .logo:hover {
    transform: scale(1.05);
  }
}

/* nome IPB - Badge elegante */
.ipb-nome {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid #156b4c;
  border-radius: 28px;
  color: #156b4c;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-tight);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(21, 107, 76, 0.12),
              0 1px 3px rgba(21, 107, 76, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Efeito sutil de brilho no badge */
.ipb-nome::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

@media (hover: hover) {
  .ipb-nome:hover::before {
    left: 100%;
  }

  .ipb-nome:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(21, 107, 76, 0.18),
                0 2px 6px rgba(21, 107, 76, 0.12);
  }
}

.ipb-nome span {
  font-weight: normal;
}


/* ✅ Adiciona espaçamento superior nas seções principais (espaço da nav bar) */
body:not(.modo-home):not(.modo-leitura) #biblia,
body:not(.modo-home):not(.modo-leitura) #plano,
body:not(.modo-home):not(.modo-leitura) #hinario,
body:not(.modo-home):not(.modo-leitura) #mychords {
  margin-top: 24px;
}

/* verso bíblico */
.verso {
  font-style: italic;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
}

/* ===============================
   BOTÃO CONFIGURAÇÃO
=============================== */
.btn-config {
  position: absolute;
  top: 0;
  /* ✅ Layout: posição fixa relativa ao body (não se move com resize) */
  right: var(--page-pad);

  width: 42px;
  height: 42px;

  background: #ffffff;
  color: #156b4c;

  border: 2px solid #156b4c;
  border-radius: 50%;
  overflow: hidden; /* ✅ garante corte perfeito da foto */

  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* ✅ Avatar no botão config (quando logado) */
.btn-config.btn-config-avatar-mode {
  padding: 0;
}

.btn-config .btn-config-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.btn-config:hover {
  background: #e9f6f1;
}

.btn-config:active {
  transform: scale(0.95);
}

/* ===============================
   TELA INICIAL
=============================== */
.inicio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

/* ✅ Cards organizados abaixo do versículo com espaçamento adequado */
body.modo-home:not(.modo-leitura) .inicio {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px 48px;
  /* ✅ Garante que todos os itens do grid tenham o mesmo tamanho */
  align-items: stretch;
  order: 2;
}

@media (min-width: 768px) {
  body.modo-home:not(.modo-leitura) .inicio {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 800px;
    padding: 0 20px 56px;
  }

  /* ✅ Versículo maior no desktop */
  body.modo-home:not(.modo-leitura) .cabecalho .verso {
    font-size: var(--font-size-xl);
    max-width: 720px;
    padding: 28px 32px 32px;
  }
}

.botao-principal {
  background: #156b4c;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 18px 32px;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-wide);
  cursor: pointer;
}

/* ===============================
   VISIBILIDADE
=============================== */
.oculto {
  display: none !important;
}

/* ===============================
   ÁREA DO PLANO
=============================== */
#plano {
  max-width: 768px;
  margin: 0 auto;
}

/* ===============================
   CARD DO DIA
=============================== */
.dia-card {
  border: 2px solid #156b4c;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 20px;
  background: #ffffff;
  display: none;
}

.dia-card.ativo {
  display: block;
}

/* destaque do dia atual (somente borda) */
.dia-card.hoje {
  border-width: 3px;
}

/* ===============================
   TÍTULO DO DIA
=============================== */
.dia-titulo {
  text-align: center;
  color: #156b4c;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: 14px;
}

/* ===============================
   LEITURAS
=============================== */
.leituras {
  list-style: none;
}

.leituras li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
}

/* remove highlight azul do Android/Chrome */
.leituras li {
  -webkit-tap-highlight-color: transparent;
}

.leituras li:active {
  background: rgba(21, 107, 76, 0.12); /* verde IPB translúcido */
  border-radius: 10px;
}

.leituras li.lido {
  background: rgba(21, 107, 76, 0.08);
  border-radius: 10px;
}
.leituras li:last-child {
  border-bottom: none;
}

.check-leitura {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #156b4c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

li.lido .check-leitura {
  background: #156b4c;
  color: #fff;
}

li.lido .check-leitura::after {
  content: '✓';
  font-size: 14px;
  font-weight: bold;
}
/* ===============================
   STATUS (BADGE)
=============================== */
.status-badge {
  margin-top: 10px;
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 16px;
}

.status-em-dia .status-badge {
  background: #e0f3ec;
  color: #0f5132;
}

.status-pendente .status-badge {
  background: #fff1b8;
  color: #7a5d00;
}

.status-atrasado .status-badge {
  background: #f8d7da;
  color: #842029;
}

/* ===============================
   NAVEGAÇÃO
=============================== */
.navegacao {
  display: flex;
  gap: 12px;
  margin: 30px auto 0;
  max-width: 768px;
}

.navegacao button {
  flex: 1;
  background: #156b4c;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 0;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;

  /* ✅ ícone + texto alinhados */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ===============================
   PAINEL CONFIG
=============================== */
.painel-config {
  position: fixed;
  /* ✅ ITEM 10: Respeita safe-area (notch/status bar) */
  top: env(safe-area-inset-top, 0px);
  right: env(safe-area-inset-right, 0px);
  bottom: env(safe-area-inset-bottom, 0px);
  left: env(safe-area-inset-left, 0px);
  /* ✅ Layout: Respeita largura máxima do conteúdo (centralizado) */
  max-width: var(--max-content-width);
  margin: 0 auto;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background: #ffffff;
  /* ✅ FIX: z-index maior que todos os outros elementos (reader, botões, etc) */
  z-index: 10000;
  overflow-y: auto;

  /* ✅ centralizar conteúdo (quando couber) */
  display: flex;
  flex-direction: column;
  /* justify-content: center; */

  /* ✅ espaço para o botão voltar fixo no topo */
  /* ✅ FIX: padding-bottom aumentado para garantir que link de privacidade seja clicável */
  padding: calc(var(--top-ui) + 64px) var(--page-pad) calc(32px + env(safe-area-inset-bottom, 0px) + 48px);
}

/* ===============================
   CONFIG — BOTÃO VOLTAR (TOPO)
   Mesmo lugar do voltar do reader
=============================== */
.btn-voltar-config {
  position: absolute;
  top: var(--top-ui);
  /* ✅ Layout: Alinha com a largura máxima do conteúdo (mesma posição dos outros botões) */
  left: var(--page-pad);
  /* ✅ FIX: z-index maior que o painel para ficar visível */
  z-index: 10001;

  width: 42px !important;
  height: 42px;
  border-radius: 50%;

  border: 2px solid #156b4c;
  background: #ffffff;
  color: #156b4c;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* no dark */
body[data-theme='dark'] .btn-voltar-config {
  background: var(--bg-tertiary);
  border-color: var(--border-primary);
  color: var(--color-primary);
}

/* ✅ mesmo com essa regra do seu CSS:
   body.config-aberto .btn-config { display:none !important; }
   aqui garantimos que o voltar do config fica visível */
body.config-aberto #btn-voltar-config {
  display: flex !important;
}

/* .painel-config h3 {
  display: block;
  text-align: center;
  color: #156b4c;
  margin: 0 auto 28px;
  font-size: 22px;
  padding: 8px 22px;
  border: 2px solid #156b4c;
  border-radius: 24px;
} */

.painel-config {
  animation: painel-entrada 0.35s ease;
}

@keyframes painel-entrada {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.config-bloco {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 16px;
  background: #f6f8f7;
}

.config-bloco label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
}

.config-bloco input {
  width: 100%;
  padding: 8px;
  font-size: 16px;
  margin-top: 8px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 2px solid #ccc;
}

.config-bloco button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background: #156b4c;
  color: #fff;
  border: none;
  border-radius: 8px;
}

.config-bloco input:focus {
  outline: none;
  border-color: #156b4c;
}

/* bloco perigoso mantém destaque */
.config-bloco.perigo {
  background: transparent;
  padding: 0;
}

.config-bloco.perigo button {
  background: #a33;
  font-weight: 600;
}

.fechar {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background: #ccc;
  border: none;
  border-radius: 8px;
}

body[data-theme='dark'] .fechar {
  background-color: rgba(255, 255, 255, 0.06);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.10);
    /* ✅ bordinha suave + premium */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
}

body[data-theme='dark'] .fechar:hover {
  color: var(--text-primary);

  background-color: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow-md);
}

body[data-theme='dark'] .fechar:active {
  transform: translateY(1px);
}

body[data-theme='dark'] .fechar:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow-md), var(--glow-soft);
}


/* ===============================
   TRANSIÇÕES GERAIS (CONTROLADAS)
   Apenas onde faz sentido
=============================== */
button,
.btn-config,
.dia-card,
.status-badge,
.leituras li::before {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}

/* ===============================
   ANIMAÇÃO AO MARCAR LEITURA
=============================== */
.leituras li.lido {
  animation: leitura-ok 0.25s ease-out;
}

@keyframes leitura-ok {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===============================
   TROCA DE DIA (CARROSSEL)
   Apenas quando fica ativo
=============================== */
.dia-card.ativo {
  animation: fade-slide 0.5s ease;
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===============================
   BOTÕES
=============================== */
button {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:active {
  transform: scale(0.97);
}

.status-badge {
  margin-top: 12px;
  align-self: flex-end;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   CORREÇÃO GLOBAL DO AZUL WEBKIT (ANDROID / MOBILE)
   Remove o highlight azul feio de botões e toques
===================================================== */
button,
.btn-config {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* =====================================================
   FEEDBACK DE TOQUE – BOTÕES DE NAVEGAÇÃO
   (Próximo / Anterior)
   Apenas enquanto o dedo está pressionando
===================================================== */
.navegacao button:active {
  background: #0f5132; /* Verde IPB mais escuro */
  transform: scale(0.97); /* Leve compressão */
}

/* =====================================================
   FEEDBACK DE TOQUE – BOTÃO CONFIGURAÇÕES (ENGRENAGEM)
   Verde IPB translúcido e efeito profissional
===================================================== */
.btn-config:active {
  background: rgba(21, 107, 76, 0.15); /* Verde IPB transparente */
  transform: scale(0.92);
}

/* =====================================================
   HOVER APENAS PARA DESKTOP
   Evita estados presos no mobile
===================================================== */
@media (hover: hover) {
  .navegacao button:hover {
    background: #0f5132;
  }

  .btn-config:hover {
    background: #e9f6f1;
  }
}

@media (hover: hover) {
  body[data-theme='dark'] .navegacao button:hover {
    background: var(--bg-card-hover);
  }

  body[data-theme='dark'] .btn-config:hover {
    background: var(--bg-card-hover);
  }
}

/* ===============================
   DARK MODE — IPB (AJUSTADO)
=============================== */
@media (prefers-color-scheme: dark) {
  body:not([data-theme='light']) {
    background: var(--bg-primary);
    color: var(--text-primary);
  }
}

/* Tema dark forçado */
body[data-theme='dark'] {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* ===============================
   ELEMENTOS NO DARK MODE
=============================== */
body[data-theme='dark'] .dia-card {
  background: var(--bg-card);
  border-color: var(--border-primary);
}

body[data-theme='dark'] .dia-titulo,
body[data-theme='dark'] h2 {
  color: var(--text-primary);
}

body[data-theme='dark'] .verso {
  color: var(--text-secondary);
}

body[data-theme='dark'] .leituras li {
  color: var(--text-primary);
  border-bottom-color: var(--border-subtle);
}

body[data-theme='dark'] .leituras li::before {
  border-color: var(--border-primary);
}

body[data-theme='dark'] .leituras li.lido::before {
  background: var(--color-primary);
  color: var(--text-inverse);
}

body[data-theme='dark'] .check-leitura {
  border-color: var(--border-primary);
}

body[data-theme='dark'] li.lido .check-leitura {
  background: var(--color-primary);
  color: var(--text-inverse);
}

/* ===============================
   STATUS
=============================== */
body[data-theme='dark'] .status-em-dia .status-badge {
  background: var(--bg-subtle);
  color: var(--color-primary-light);
}

body[data-theme='dark'] .status-pendente .status-badge {
  background: rgba(255, 193, 7, 0.18);
  color: #ffe082;
}

body[data-theme='dark'] .status-atrasado .status-badge {
  background: rgba(231, 76, 60, 0.22);
  color: #ff9a8f;
}

/* ===============================
   BOTÕES
=============================== */
body[data-theme='dark'] button {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

body[data-theme='dark'] .navegacao button {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

body[data-theme='dark'] .navegacao button:active {
  background: var(--btn-primary-hover);
}

/* ===============================
   BOTÃO CONFIG
=============================== */
body[data-theme='dark'] .btn-config {
  background: var(--bg-tertiary);
  border-color: var(--border-primary);
  color: var(--color-primary-dark);
}

/* ===============================
   PAINEL CONFIG
=============================== */
body[data-theme='dark'] .painel-config {
  background: var(--bg-primary);
}

/* ===============================
   IPB (LOGO + NOME) — DARK MODE
=============================== */

/* ===============================
   DARK MODE - CABEÇALHO IPB
=============================== */

/* Nome IPB - Dark mode elegante */
body[data-theme='dark'] .ipb-nome {
  border-color: var(--border-primary);
  color: var(--text-primary);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md), var(--shadow-sm);
}

@media (hover: hover) {
  body[data-theme='dark'] .ipb-nome:hover {
    border-color: var(--border-primary);
    background: var(--bg-card-hover);
    box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), 0.16),
                0 2px 6px rgba(var(--color-primary-rgb), 0.10),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

/* Logo IPB - Dark mode com brilho sutil */
body[data-theme='dark'] .logo {
  filter: brightness(1.4) drop-shadow(0 2px 12px rgba(var(--color-primary-rgb), 0.18));
  transition: filter 0.3s ease, transform 0.3s ease;
}

@media (hover: hover) {
  body[data-theme='dark'] .logo:hover {
    filter: brightness(1.6) drop-shadow(0 4px 16px rgba(var(--color-primary-rgb), 0.22));
  }
}

/* ===============================
   BOTÃO TEMA (SOL / LUA)
=============================== */
.botao-tema {
  position: relative;
  width: 100%;
  padding: 16px;
  font-size: 18px;
  border-radius: 14px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  font-weight: 600;
  letter-spacing: 0.3px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  overflow: hidden;
}

body[data-theme='dark'] .painel-config .botao-tema {
  background-color: var(--bg-tertiary);
  background-image: linear-gradient(
    180deg,
    rgba(var(--color-primary-rgb), 0.22) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  color: var(--text-primary);
  border: 1px solid rgba(var(--color-primary-rgb), 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-lg);
}


  body[data-theme='dark'] .painel-config .botao-tema:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-focus);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow-xl), var(--glow-sm);
  }

  body[data-theme='dark'] .painel-config .botao-tema:active {
    transform: translateY(1px);
  }

  body[data-theme='dark'] .painel-config .botao-tema:focus-visible {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow-lg), var(--glow-soft);
  }



/* ÍCONES OCUPAM O MESMO LUGAR */
.botao-tema .icone-sol,
.botao-tema .icone-lua {
  position: absolute;
  left: 20px; /* posição fixa à esquerda */
  font-size: 22px;

  transition: opacity 0.35s ease, transform 0.45s ease;
}

/* ESTADO PADRÃO (LIGHT) */
.icone-sol {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.icone-lua {
  opacity: 0;
  transform: scale(0.6) rotate(-90deg);
}

/* ===============================
   DARK MODE — TROCA DE ÍCONE
=============================== */
body[data-theme='dark'] .icone-sol {
  opacity: 0;
  transform: scale(0.6) rotate(90deg);
}

body[data-theme='dark'] .icone-lua {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

body[data-theme='dark'] .config-bloco {
  background: var(--bg-card);
  /* border: 1px solid var(--border-subtle); */
  box-shadow: var(--shadow-sm);
}

body[data-theme='dark'] .config-bloco label {
  color: var(--text-secondary);
}

body[data-theme='dark'] .config-bloco input,
body[data-theme='dark'] .config-bloco select {
  background: var(--bg-tertiary);
  color: var(--text-primary);

  /* ✅ bordinha suave + premium */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
}

body[data-theme='dark'] .config-bloco input:focus,
body[data-theme='dark'] .config-bloco select:focus {
  border-color: var(--border-focus);
}

body[data-theme='dark'] .config-bloco button {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

body[data-theme='dark'] .config-bloco select option {
  background: #0f1e19;
  color: #e6f3ee;
}

body[data-theme='dark'] .config-bloco select option:checked {
  background: var(--color-config-button);
  color: #eafaf4;
}

body[data-theme='dark'] .config-bloco select option:hover,
body[data-theme='dark'] .config-bloco select option:focus {
  background: rgba(47, 155, 120, 0.35);
  color: #eafaf4;
}

body[data-theme='light'] .config-bloco select option {
  background: #ffffff;
  color: #0f3f2f;
}

body[data-theme='light'] .config-bloco select option:checked {
  background: #dceee7;
  color: #0f3f2f;
}

body[data-theme='light'] .config-bloco select option:hover,
body[data-theme='light'] .config-bloco select option:focus {
  background: rgba(21, 107, 76, 0.18);
  color: #0f3f2f;
}

body[data-theme='dark'] .painel-config h3 {
  color: var(--text-primary);
  border-color: var(--border-primary);
}

/* BARRA DE PROGRESSO */

.progresso-plano {
  max-width: 768px;
  margin: 0 auto 24px;
  text-align: center;
}

.progresso-barra {
  width: 100%;
  height: 12px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

#progresso-preenchido {
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  transition: width 0.4s ease;

  /* ✅ necessário pro brilho animado */
  position: relative;
  overflow: hidden;
}

body[data-theme='dark'] #progresso-preenchido {
  background: var(--btn-primary-bg);
}

/* ✅ brilho “fluxo” (premium) */
#progresso-preenchido::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 85%
  );
  transform: translateX(0);
  animation: progressoShine 1.6s linear infinite;
  opacity: 0.9;
}

/* Dark: brilho mais discreto */
body[data-theme='dark'] #progresso-preenchido::after {
  background: linear-gradient(110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 45%,
    transparent 85%
  );
  opacity: 0.75;
}

@keyframes progressoShine {
  0%   { transform: translateX(0); }
  100% { transform: translateX(260%); }
}

#progresso-texto {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
}

body[data-theme='dark'] .progresso-barra {
  background: var(--bg-subtle);
}

/* ===============================
   NAVEGAÇÃO POR DIAS
=============================== */
.nav-dias {
  margin: 24px auto 0;
  max-width: 768px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

#nav-dia-texto {
  font-weight: bold;
  color: var(--color-primary);
}

/* Slider */
#nav-dia-slider {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 4px;
  background: #cfeee3;
  outline: none;
}

/* trilho preenchido (Chrome/Android) */
#nav-dia-slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #156b4c;
  cursor: pointer;
  border: none;
}

#nav-dia-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #156b4c;
  cursor: pointer;
  border: none;
}

/* Dark mode */
body[data-theme='dark'] #nav-dia-texto {
  color: #d6f1e7;
}

body[data-theme='dark'] #nav-dia-slider {
  background: var(--bg-subtle);
}

body[data-theme='dark'] #nav-dia-slider::-webkit-slider-thumb {
  background: var(--color-primary);
}

/* ===============================
   MODAL PADRÃO
=============================== */
.modal {
  position: fixed;
  /* ✅ ITEM 10: Respeita safe-area (notch/status bar) */
  top: env(safe-area-inset-top, 0px);
  right: env(safe-area-inset-right, 0px);
  bottom: env(safe-area-inset-bottom, 0px);
  left: env(safe-area-inset-left, 0px);
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  /* ✅ FIX: z-index maior que painel-config (10000) para aparecer sobre ele */
  z-index: 10002;
  pointer-events: auto;
}

html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: contain;
}

.modal.oculto {
  display: none;
  pointer-events: none;
}

.modal-caixa {
  background: var(--fundo-card, #fff);
  color: var(--texto, #000);
  width: 90%;
  max-width: 360px;
  padding: 24px;
  border-radius: 18px;
  text-align: center;
  animation: modalFade 0.25s ease;
}

.modal-caixa h4 {
  margin-bottom: 10px;
  font-size: 20px;
}

.modal-caixa p {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 20px;
}

.modal-botoes {
  display: flex;
  gap: 12px;
}

.modal-botoes button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
}

/* Botões */
.btn-secundario {
  background: #ccc;
  color: #000;
}

.btn-perigo {
  background: #b93838;
  color: #fff;
}

#btn-confirmar-reset-plano {
  background: #cead54;
  color: #222;
}

#btn-reset-plano {
  background: #cead54;
  color: #222;
  font-weight: 600;
}

body[data-theme='dark'] #btn-confirmar-reset,
body[data-theme='dark'] #btn-reset {
  background: #4a1515; /* ✅ vermelho mais “premium” (menos roxo) */
  color: #fff;



}

body[data-theme='dark'] #btn-confirmar-reset-plano,
body[data-theme='dark'] #btn-reset-plano {
  background: #6a531e; /* ✅ âmbar mais “premium” */
  color: #fff;


}

/* Dark mode */
body[data-theme='dark'] .modal-caixa {
  background: var(--modal-bg);
  color: var(--text-primary);
}

body[data-theme='dark'] .btn-secundario {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
}

/* Animação */
@keyframes modalFade {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===============================
   LEITURA COM BOTÃO LER
=============================== */

.linha-leitura {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.linha-leitura span {
  flex: 1;
}

/* botão LER */
.btn-ler {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 10px;
  border: none;
  cursor: pointer;

  background: #156b4c;
  color: #fff;
}

/* toque */
.btn-ler:active {
  transform: scale(0.95);
}

/* dark mode */
body[data-theme='dark'] .btn-ler {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

/* Plano: botao iniciar especial */
#plano-start-wrap {
  padding: 14px;
}

#plano-start-iniciar {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background:rgba(21, 107, 76, 0.22);
  color: #156b4c;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(21, 107, 76, 0.18);
}

body[data-theme='dark'] #plano-start-iniciar {
  border-color: var(--border-primary);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, rgba(8, 20, 15, 0.95), rgba(16, 38, 32, 0.95));
  color: var(--text-primary);
}

body[data-theme='dark'] #plano-start-iniciar:hover {
  background: rgba(21, 107, 76, 0.18);
}

@media (hover: hover) {
  #plano-start-iniciar:hover {
    background: rgba(21, 107, 76, 0.18);

  }
}

/* ===============================
   READER — AJUSTES VISUAIS
=============================== */

.reader-topo {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

  min-height: 42px;
  margin-bottom: 18px;
}

/* BOTÃO VOLTAR — FIXO NO TOPO DO READER */
.btn-voltar {
  top: 16px;
  left: 16px;

  width: 42px;
  height: 42px;

  border-radius: 50%;
  border: 2px solid #156b4c;
  background: #ffffff;
  color: #156b4c;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 5000;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.reader-topo h3 {
  font-size: 20px;
  color: #156b4c;
}

/* TEXTO */
.verses {
  padding: 0 4px;
}

.verses p {
  margin-bottom: 14px;
  line-height: 1.65;
  font-size: 16px;
}

/* ===============================
   BOTÕES CIRCULARES DE NAVEGAÇÃO
=============================== */

.reader-navegacao-fixa {
  position: fixed;
  bottom: 48px; /* ⬅ afastado do fundo */
  left: 0;
  right: 0;

  display: flex;
  justify-content: space-between;
  padding: 0 40px;

  pointer-events: none;
}

/* ===============================
   DARK MODE
=============================== */
body[data-theme='dark'] .btn-circular {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-primary);
}

body[data-theme='dark'] .reader-topo h3 {
  color: var(--text-primary);
}

/* ===============================
 ESCONDER ELEMENTOS NO READER
=============================== */
/* ===============================
   MODO LEITURA — LIMPEZA VISUAL
=============================== */

/* Remove título principal */
.modo-leitura h2,
.modo-leitura .titulo-principal {
  display: none;
}

/* Remove versículo */
.modo-leitura .verso {
  display: none;
}

/* Remove barra de progresso */
.modo-leitura #bloco-progresso {
  display: none;
}

/* Remove texto IPB Pedro Nunes (mantém logo) */
.modo-leitura .ipb-nome {
  display: none;
}

/* ===============================
   READER — ÁREA DE LEITURA
=============================== */
#reader-conteudo {
  max-width: 768px;
  margin: 0 auto;
  padding: 24px 18px 40px;
}

/* Texto bíblico */
.texto-biblico p {
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 14px;
}

.texto-biblico strong {
  color: var(--color-primary);
  margin-right: 6px;
}

/* ===============================
   NAVEGAÇÃO DE CAPÍTULOS (FINAL)
=============================== */
.nav-capitulos {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin: 20px auto 20px;
}

/* Botões circulares */
.btn-circular {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-circular:active {
  transform: scale(0.95);
}

/* Dark mode */
body[data-theme='dark'] .btn-circular {
  border-color: var(--border-primary);
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn-concluir-dia {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 2px solid #156b4c;
  background: transparent;
  color: #156b4c;
  font-weight: 600;
  cursor: pointer;
}

.btn-concluir-dia:active {
  transform: scale(0.97);
}

/* Dark mode */
body[data-theme='dark'] .btn-concluir-dia {
  border-color: var(--border-primary);
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* AJUSTE DO CONFIG */

body.config-aberto .btn-voltar {
  display: none;
}

body.config-aberto {
  overflow: hidden;
}

/* ✅ FIX: Garante que o painel config cubra tudo, mesmo sobre #reader, #biblia, #hinario */
body.config-aberto #reader,
body.config-aberto #biblia,
body.config-aberto #hinario,
body.config-aberto #plano,
body.config-aberto .inicio {
  /* Desabilita interações e garante que não interfira visualmente */
  pointer-events: none;
  /* ✅ FIX: Garante que elementos fixos não fiquem sobre o painel */
  z-index: 1;
}

body.config-aberto .painel-config {
  pointer-events: auto;
  /* ✅ FIX: z-index máximo para garantir que cubra tudo */
  z-index: 10000 !important;
}

#titulo-leitura {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin: 64px 0 18px;
  color: inherit;
}

.config-bloco select {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border-radius: 10px;
  border: 2px solid #ccc;
  background: #fff;
}

.config-bloco select:focus {
  outline: none;
  border-color: #156b4c;
}

/* dark mode */
body[data-theme='dark'] .config-bloco select {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}
/* ===============================
   FOOTER DE LICENÇA – READER
=============================== */
.footer-licenca {
  margin-top: 32px;
  padding: 16px 12px;
  text-align: center;
  font-size: 0.75rem; /* pequeno e elegante */
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(21, 107, 76, 0.35);
}

/* modo claro */
body[data-theme='light'] .footer-licenca {
  color: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(21, 107, 76, 0.25);
}

/* texto interno */
.licenca-biblia {
  max-width: 520px;
  margin: 0 auto;
}

/* ===============================
   BOTÃO TAMANHO DE FONTE (READER)
=============================== */

/* Botão de fonte */

.btn-fonte {
  position: absolute; /* ✅ Explícito para garantir referência consistente com painel-fonte */
  top: 86px; /* 👈 DISTÂNCIA SEGURA abaixo do config */
  right: var(--page-pad);

  width: 40px;
  height: 40px;
  border-radius: 20%;

  border: 2px solid #156b4c;
  background: transparent;
  color: #156b4c;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 4000;
}

/* Esconde fora do reader */
body:not(.modo-leitura) .btn-fonte {
  display: none;
}

body.config-aberto .btn-fonte {
  display: none;
}

/* Mini painel de fonte */
.painel-fonte {
  position: absolute;
  top: calc(var(--top-ui) + 54px);
  right: calc(var(--page-pad) + 40px + 8px);
  display: flex;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(21, 107, 76, 0.12); /* verde translúcido */
  backdrop-filter: blur(6px);
  z-index: 5000;
}

body.config-aberto .painel-fonte {
  display: none;
}

/* Botões do painel */
.painel-fonte button {
  width: 38px;
  height: 38px;
  border-radius: 10px;

  border: 2px solid #156b4c;
  background: transparent;
  color: #156b4c;

  font-weight: 600;
  cursor: pointer;
}

/* Dark mode */
body[data-theme='dark'] .painel-fonte {
  background: rgba(207, 238, 226, 0.18); /* verde quase branco */
}

body[data-theme='dark'] .painel-fonte button {
  border-color: #cfeee2;
  color: #eaf7f1;
}

.texto-biblico {
  font-size: var(--fonte-biblia, var(--font-size-base));
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-normal);
}

.texto-biblico p {
  font-size: inherit;
}

/* Painel começa invisível */
.painel-fonte {
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Painel visível */
.painel-fonte:not(.oculto) {
  opacity: 1;
  /* transform: translateY(0) scale(1); */
  pointer-events: auto;
}

/* =====================================================
   TELA INICIAL — LAYOUT CORRETO (HEADER + BOTÃO)
===================================================== */

/* quando o plano ainda NÃO foi iniciado */
body:not(.modo-leitura):not(.plano-iniciado) {
  min-height: 100vh;
  /* background: linear-gradient(180deg, #0b1f18 0%, #08140f 60%, #06100c 100%); */
}

/* ✅ Light mode - Fundo quando plano não iniciado */
body[data-theme='light']:not(.modo-leitura):not(.plano-iniciado) {
  background: linear-gradient(180deg, #f5faf8 0%, #ffffff 60%, #fafcfb 100%);
}

/* ✅ Hierarquia visual melhorada - Layout em coluna */
body.modo-home:not(.modo-leitura) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Mantém a paleta original da tela inicial (dark) */
body[data-theme='dark'].modo-home:not(.modo-leitura) {
  --color-primary: #43d3a2;
  --color-primary-dark: #2fb88a;
  --color-primary-light: #4fe0b3;
  --color-primary-lighter: #67e8c4;
  --color-primary-lightest: rgba(67, 211, 162, 0.15);
  --text-primary: #eafaf4;
  --text-secondary: rgba(234, 250, 244, 0.8);
  --text-tertiary: rgba(234, 250, 244, 0.65);
  --text-muted: rgba(234, 250, 244, 0.65);
  --bg-subtle: rgba(67, 211, 162, 0.12);
  --bg-subtle-hover: rgba(67, 211, 162, 0.18);
  --text-primary-color: #43d3a2;
  --border-primary: rgba(67, 211, 162, 0.2);
  --border-secondary: rgba(67, 211, 162, 0.15);
  --border-subtle: rgba(67, 211, 162, 0.12);
  --border-focus: #43d3a2;
  --state-hover-bg: rgba(67, 211, 162, 0.15);
  --state-active-bg: rgba(67, 211, 162, 0.2);
  --state-success: #43d3a2;
  --btn-primary-bg: #43d3a2;
  --btn-primary-text: #08140f;
  --btn-primary-hover: #4fe0b3;
  --btn-secondary-bg: rgba(67, 211, 162, 0.15);
  --btn-secondary-text: #43d3a2;
  --btn-secondary-hover: rgba(67, 211, 162, 0.2);
}

/* empilha header + versículo + cards no centro */
body.modo-home:not(.modo-leitura) .cabecalho,
body.modo-home:not(.modo-leitura) .inicio {
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0px;
}

/* ✅ Cabeçalho no topo com espaçamento adequado */
body.modo-home:not(.modo-leitura) .cabecalho {
  text-align: center;
  padding-top: 32px;
  margin-bottom: 0;
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* ✅ Ordem: IPB → Versículo */
body.modo-home:not(.modo-leitura) .cabecalho .ipb-bloco {
  order: 1;
}

body.modo-home:not(.modo-leitura) .cabecalho .verso {
  order: 2;
}

/* ===============================
   TELA INICIAL - CABEÇALHO IPB PREMIUM
=============================== */

/* ✅ Home: padronizar com o estilo principal (logo + ipb-nome)
   -> remove overrides “modo-home” para usar exatamente o mesmo visual do cabeçalho padrão */


/* ===============================
   CARDS PREMIUM NA TELA INICIAL
=============================== */
body.modo-home:not(.modo-leitura) .botao-principal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 24px 20px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-wide);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(21, 107, 76, 0.95), rgba(31, 111, 84, 0.95));
  border: 2px solid rgba(67, 211, 162, 0.2);
  color: #ffffff;
  /* ✅ Altura fixa para todos os botões terem o mesmo tamanho */
  height: 140px;
  min-height: 140px;
  max-height: 140px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.3px;
  will-change: transform, box-shadow, border-color;
  /* ✅ Garante que o texto não quebre o layout */
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Texto do botão fica acima do overlay */
body.modo-home:not(.modo-leitura) .botao-principal > * {
  position: relative;
  z-index: 1;
}

/* ✅ Garante que o texto do botão seja tratado adequadamente */
body.modo-home:not(.modo-leitura) .botao-principal {
  /* Texto pode quebrar em múltiplas linhas se necessário */
  white-space: normal;
  /* Permite quebra natural de palavras */
  word-break: break-word;
  /* Garante que o conteúdo interno não ultrapasse */
  box-sizing: border-box;
  /* ✅ Força todos os botões a terem exatamente o mesmo tamanho */
  width: 100%;
  flex: 1 1 auto;
}

/* Efeito overlay no hover (usando ::after para não conflitar com ícone) */
body.modo-home:not(.modo-leitura) .botao-principal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(67, 211, 162, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

/* Hover effect - transição suave */
body.modo-home:not(.modo-leitura) .botao-principal:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(67, 211, 162, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Active state - feedback tátil */
body.modo-home:not(.modo-leitura) .botao-principal:active {
  transform: translateY(-2px) scale(0.98);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

body.modo-home:not(.modo-leitura) .botao-principal:hover::after {
  opacity: 1;
}


/* Ícones via pseudo-elementos (CSS puro, sem modificar HTML) */
body.modo-home:not(.modo-leitura) .botao-principal {
  padding-top: 20px;
  position: relative;
  z-index: 1;
}

body.modo-home:not(.modo-leitura) .botao-principal::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.9;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
  z-index: 1;
}

/* Ícone Bíblia (book - mesmo das tabs) */
body.modo-home:not(.modo-leitura) .botao-biblia::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 0 6.5 22h11a2.5 2.5 0 0 0 2.5-2.5V7H4z'/%3E%3Cpath d='M4 7V5.5A2.5 2.5 0 0 1 6.5 3h11A2.5 2.5 0 0 1 20 5.5V7'/%3E%3C/svg%3E");
}

/* Ícone Plano (calendar-check - mesmo das tabs) */
body.modo-home:not(.modo-leitura) #iniciar-plano::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='m9 16 2 2 4-4'/%3E%3C/svg%3E");
}

/* Ícone Hinário (music - mesmo das tabs) */
body.modo-home:not(.modo-leitura) .botao-hinario::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
}

/* Ícone Minhas Cifras (file-text - mesmo das tabs) */
body.modo-home:not(.modo-leitura) .botao-mychords::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3Cpath d='M10 9H8'/%3E%3C/svg%3E");
}

/* Hover nos ícones - transição suave */
body.modo-home:not(.modo-leitura) .botao-principal:hover::before {
  transform: scale(1.1) rotate(2deg);
  opacity: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Dark mode - Cards */
body[data-theme='dark'].modo-home:not(.modo-leitura) .botao-principal {
  background: linear-gradient(135deg, rgba(8, 20, 15, 0.95), rgba(16, 38, 32, 0.95));
  border-color: rgba(67, 211, 139, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
}

body[data-theme='dark'].modo-home:not(.modo-leitura) .botao-principal:hover {
  border-color: rgba(69, 211, 145, 0.45);
  box-shadow: 0 8px 24px rgba(67, 211, 162, 0.15), 0 4px 8px rgba(0, 0, 0, 0.3);
}

body[data-theme='dark'].modo-home:not(.modo-leitura) .botao-principal::after {
  background: linear-gradient(135deg, rgba(67, 211, 162, 0.15), transparent);
}

/* ✅ Light mode - Cards */
body[data-theme='light'].modo-home:not(.modo-leitura) .botao-principal {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 251, 0.98));
  border-color: rgba(21, 107, 76, 0.25);
  box-shadow: 0 4px 12px rgba(21, 107, 76, 0.08), 0 2px 4px rgba(21, 107, 76, 0.05);
  color: #156b4c;
}

body[data-theme='light'].modo-home:not(.modo-leitura) .botao-principal:hover {
  border-color: rgba(21, 107, 76, 0.4);
  box-shadow: 0 8px 24px rgba(21, 107, 76, 0.12), 0 4px 8px rgba(21, 107, 76, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(250, 252, 251, 1));
}

body[data-theme='light'].modo-home:not(.modo-leitura) .botao-principal::after {
  background: linear-gradient(135deg, rgba(21, 107, 76, 0.08), transparent);
}

/* ✅ Light mode - Ícones (precisam ser mais escuros) */
body[data-theme='light'].modo-home:not(.modo-leitura) .botao-biblia::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23156b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 0 6.5 22h11a2.5 2.5 0 0 0 2.5-2.5V7H4z'/%3E%3Cpath d='M4 7V5.5A2.5 2.5 0 0 1 6.5 3h11A2.5 2.5 0 0 1 20 5.5V7'/%3E%3C/svg%3E");
}

body[data-theme='light'].modo-home:not(.modo-leitura) #iniciar-plano::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23156b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='m9 16 2 2 4-4'/%3E%3C/svg%3E");
}

body[data-theme='light'].modo-home:not(.modo-leitura) .botao-hinario::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23156b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
}

body[data-theme='light'].modo-home:not(.modo-leitura) .botao-mychords::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23156b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3Cpath d='M10 9H8'/%3E%3C/svg%3E");
}

/* ✅ Versículo em destaque no topo (dentro do cabeçalho, mas visualmente destacado) */
body.modo-home:not(.modo-leitura) .cabecalho .verso {
  max-width: 680px;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-loose);
  letter-spacing: var(--letter-spacing-normal);
  text-align: center;
  color: rgba(234, 250, 244, 0.95);
  margin: 32px auto 40px;
  padding: 24px 24px 28px;
  font-style: italic;
  animation: fadeIn 0.5s ease-out 0.15s both;
  /* ✅ Destaque visual com fundo sutil */
  position: relative;
  background: rgba(47, 155, 120, 0.08);
  border-radius: 16px;
  border: 0px solid rgba(47, 155, 120, 0.15);
  backdrop-filter: blur(10px);
}

/* ✅ Mobile: Fundo elegante e espaçamentos otimizados */
@media (max-width: 767px) {
  body.modo-home:not(.modo-leitura) .cabecalho .verso {
    /* ✅ Fundo elegante e sutil */
    background: linear-gradient(135deg, rgba(47, 155, 120, 0.06) 0%, rgba(38, 122, 96, 0.04) 100%);
    border: 0 solid rgba(47, 155, 120, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    padding: 18px 20px 20px;
    margin: 20px auto 24px;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-loose);
    letter-spacing: var(--letter-spacing-normal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  }

  /* ✅ Aspas decorativas sutis no mobile */
  body.modo-home:not(.modo-leitura) .cabecalho .verso::before {
    content: '"';
    font-size: 40px;
    line-height: 1;
    opacity: 0.15;
    position: absolute;
    top: 4px;
    left: 12px;
    font-family: 'Playfair Display', serif;
    color: rgba(47, 155, 120, 0.3);
  }

  body.modo-home:not(.modo-leitura) .cabecalho .verso::after {
    content: '"';
    font-size: 40px;
    line-height: 1;
    opacity: 0.15;
    position: absolute;
    bottom: 0;
    right: 12px;
    font-family: 'Playfair Display', serif;
    color: rgba(47, 155, 120, 0.3);
  }

  /* ✅ Reduz espaçamentos do cabeçalho no mobile */
  body.modo-home:not(.modo-leitura) .cabecalho {
    padding-top: 20px;
    margin-bottom: 0;
  }

  /* ✅ Home (mobile): padronizar com o estilo principal (logo + ipb-nome)
     -> remove overrides “modo-home” para usar exatamente o mesmo visual do cabeçalho padrão */


  /* ✅ Reduz padding dos cards no mobile */
  body.modo-home:not(.modo-leitura) .inicio {
    padding: 0 16px 32px;
    gap: 12px;
    margin-top: 32px;
  }

  /* ✅ Reduz altura dos cards no mobile */
  body.modo-home:not(.modo-leitura) .botao-principal {
    height: 120px;
    min-height: 120px;
    max-height: 120px;
    padding: 20px 16px;
    font-size: var(--font-size-sm);
  }
}

/* ✅ Decoração sutil no versículo (aspas decorativas) */
body.modo-home:not(.modo-leitura) .cabecalho .verso::before {
  content: '"';
  font-size: 56px;
  line-height: 1;
  opacity: 0.25;
  position: absolute;
  top: 8px;
  left: 16px;
  font-family: 'Playfair Display', serif;
  color: rgba(67, 211, 162, 0.4);
}

body.modo-home:not(.modo-leitura) .cabecalho .verso::after {
  content: '"';
  font-size: 56px;
  line-height: 1;
  opacity: 0.25;
  position: absolute;
  bottom: 4px;
  right: 16px;
  font-family: 'Playfair Display', serif;
  color: rgba(67, 211, 162, 0.4);
}

/* ✅ Light mode - Versículo destacado */
body[data-theme='light'].modo-home:not(.modo-leitura) .cabecalho .verso {
  color: rgba(21, 107, 76, 0.9);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(21, 107, 76, 0.2);
  box-shadow: 0 4px 12px rgba(21, 107, 76, 0.08);
}

/* ✅ Light mode no mobile: Fundo elegante e sutil */
@media (max-width: 767px) {
  body[data-theme='light'].modo-home:not(.modo-leitura) .cabecalho .verso {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(250, 252, 251, 0.6) 100%);
    border: 1px solid rgba(21, 107, 76, 0.15);
    box-shadow: 0 2px 8px rgba(21, 107, 76, 0.06), 0 1px 3px rgba(21, 107, 76, 0.04);
  }

  /* ✅ Aspas decorativas no light mode mobile */
  body[data-theme='light'].modo-home:not(.modo-leitura) .cabecalho .verso::before,
  body[data-theme='light'].modo-home:not(.modo-leitura) .cabecalho .verso::after {
    opacity: 0.12;
    color: rgba(21, 107, 76, 0.2);
  }
}

/* ✅ Light mode - Decoração do versículo */
body[data-theme='light'].modo-home:not(.modo-leitura) .cabecalho .verso::before,
body[data-theme='light'].modo-home:not(.modo-leitura) .cabecalho .verso::after {
  opacity: 0.2;
  color: rgba(21, 107, 76, 0.25);
}

/* ✅ Light mode - Fundo da tela inicial */
body[data-theme='light'].modo-home:not(.modo-leitura) {
  background: linear-gradient(180deg, #f5faf8 0%, #ffffff 60%, #fafcfb 100%);
}

/* ✅ Light mode - Cabeçalho na tela inicial (se necessário) */
body[data-theme='light'].modo-home:not(.modo-leitura) .cabecalho {
  color: #156b4c;
}

/* ===============================
   ANIMAÇÕES FADE-IN (TELA INICIAL)
=============================== */
/* Cards individuais - stagger effect (aparecem um por vez com delay) */
body.modo-home:not(.modo-leitura) .botao-principal {
  opacity: 0;
  animation: fadeInUp 0.35s ease-out both;
  /* ✅ Fallback: se animação não disparar, elemento aparece após 1s */
  animation-fill-mode: both;
}

/* ✅ Garantia: elementos sempre aparecem (fallback se animação falhar) */
body.modo-home:not(.modo-leitura):not(.booting) .botao-principal {
  animation: fadeInUp 0.35s ease-out both;
}

/* Stagger delay para cada card (usando CSS custom properties) */
body.modo-home:not(.modo-leitura) .botao-principal:nth-child(1) {
  --card-delay: 0.1s;
  animation-delay: 0.1s;
}

body.modo-home:not(.modo-leitura) .botao-principal:nth-child(2) {
  --card-delay: 0.15s;
  animation-delay: 0.15s;
}

body.modo-home:not(.modo-leitura) .botao-principal:nth-child(3) {
  --card-delay: 0.2s;
  animation-delay: 0.2s;
}

body.modo-home:not(.modo-leitura) .botao-principal:nth-child(4) {
  --card-delay: 0.25s;
  animation-delay: 0.25s;
}

/* Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===============================
   DESATIVAR ANIMAÇÕES NO BOOT
=============================== */
body.no-anim *,
body.no-anim *::before,
body.no-anim *::after {
  animation: none !important;
  transition: none !important;
}

/* Desativa animações na tela inicial durante boot */
body.booting.modo-home .inicio,
body.booting.modo-home .botao-principal,
body.booting.modo-home .verso {
  animation: none !important;
  opacity: 0;
}

/* ✅ Garantia: após boot, elementos sempre aparecem */
body.modo-home:not(.booting):not(.modo-leitura) .botao-principal {
  /* Força animação mesmo se já estava visível antes */
  animation: fadeInUp 0.35s ease-out both;
}

body.modo-home:not(.booting):not(.modo-leitura) .verso {
  animation: fadeIn 0.5s ease-out 0.15s both;
}

/* ===============================
   CONTROLES FLUTUANTES — READER
   =============================== */

/* ===============================
   CONTROLES FLUTUANTES — READER (SAFE-AREA + FIXO)
=============================== */
body.modo-leitura .btn-config,
body.modo-leitura .btn-fonte,
body.modo-leitura .btn-voltar {
  /* ⚠️ NÃO usar position: fixed nos botões do reader
   Bug conhecido no Android WebView os botoes descem com o pai */
  /* position: fixed; */
  z-index: 7000;
}

/* direita */
body.modo-leitura .btn-config,
body.modo-leitura .btn-fonte {
  /* ✅ Layout: posição fixa relativa ao body (não se move com resize) */
  right: var(--page-pad);
}

/* esquerda */
body.modo-leitura .btn-voltar {
  /* ✅ Layout: posição fixa relativa ao body (não se move com resize) */
  left: var(--page-pad);
}

/* ordem vertical respeitando safe-area */
body.modo-leitura .btn-config {
  top: var(--top-ui);
}

body.modo-leitura .btn-fonte {
  top: calc(var(--top-ui) + 54px);
}

body.modo-leitura .btn-voltar {
  top: var(--top-ui);
}

/* =====================================================
   BOTÃO CONFIG — FORA DO READER (SAFE-AREA)
===================================================== */
body:not(.modo-leitura) .btn-config {
  /* position: fixed; */
  top: var(--top-ui);
  /* ✅ Layout: posição fixa relativa ao body (não se move com resize) */
  right: var(--page-pad);
  z-index: 4000;
}

/* OCULTAR BOTÃO CONFIG QUANDO CONFIG ESTIVER ABERTA */
body.config-aberto .btn-config {
  display: none !important;
}

/* =====================================================
   CONFIGURAÇÕES — LAYOUT CENTRALIZADO EM TELAS GRANDES
   Mobile first (não afeta celular)
===================================================== */
@media (min-width: 768px) {
  .painel-config {
    display: flex;
    flex-direction: column;
    align-self: center;
    /* justify-content: center; */
    align-items: center;
    /* padding: 48px 20px; */
  }

  .painel-config > * {
    width: 100%;
    /* ✅ Layout: Largura do conteúdo igual ao header (768px) */
    max-width: 768px;
  }
}
/* 🔒 REGRA ABSOLUTA: painel oculto SEMPRE some */
.painel-config.oculto {
  display: none !important;
}

/* ✅ Painel Config: mantém o scroll, mas esconde a barra (Chrome/Android/iOS/Firefox) */
.painel-config {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE/Edge antigo */
}
.painel-config::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;              /* Chrome/Safari/Android */
}


/* ===============================
   ALINHAMENTO PROGRESSO (DIA + BARRA)
=============================== */
#bloco-progresso {
  max-width: 768px;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#bloco-progresso .progresso-dia {
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #156b4c;
}

#bloco-progresso .progresso-plano {
  margin: 0;
}

/* Oculta bloco de progresso na tela inicial */
body:not(.plano-iniciado) #bloco-progresso {
  display: none;
}

/* ===============================
   PROGRESSO — DARK MODE
=============================== */
body[data-theme='dark'] #bloco-progresso .progresso-dia {
  color: var(--text-secondary);
}

/* =====================================================
   PAINEL CONFIG — COBERTURA TOTAL DA TELA (FIX DEFINITIVO)
   ✅ ITEM 10: Safe-area já aplicado na definição principal (linha 332)
===================================================== */

.link-privacidade {
  display: block;
  margin-top: 24px;
  /* ✅ FIX: margin-bottom e padding para garantir área de toque e espaço abaixo */
  margin-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  color: rgba(21, 107, 76, 0.85);
  text-decoration: underline;
  /* ✅ Área de toque mínima para mobile (44x44px recomendado) */
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Link de política de privacidade — DARK MODE */
body[data-theme='dark'] .link-privacidade {
  color: var(--color-primary)
}

/* ===============================
   SLIDER DE DIAS — MODO OCULTO
=============================== */

.nav-dias {
  display: none;
}

/* quando ativo */
.nav-dias.ativo {
  display: block;
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 420px;
  background: rgba(21, 107, 76, 0.12);
  backdrop-filter: blur(8px);
  padding: 16px;
  border-radius: 18px;
  z-index: 6000;
}

/* 🌙 Dark mode — botão índice */
body[data-theme='dark'] .btn-indice {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}

/* 🔧 Corrige flex apenas do botão índice */
.navegacao .btn-indice {
  flex: 0 0 auto; /* NÃO cresce, NÃO encolhe */
  width: 64px; /* largura real */
  min-width: 64px;
  padding: 10px 0;
}

.config-bloco #ajustar-data {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border-radius: 10px;
  border: 2px solid #ccc;
  background: #fff;
}

.config-bloco #ajustar-data:focus {
  outline: none;
  border-color: var(--bg-tertiary);
}

/* dark mode */
body[data-theme='dark'] .config-bloco #ajustar-data {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-secondary);
  border-width: 1px;

  /* ✅ bordinha suave + premium */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
}


/* === GOOGLE AUTH === */

.google-auth {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  width: 100%;
  padding: 12px 16px;

  background: #ffffff;
  color: #000;
  border: 1px solid #dadce0;
  border-radius: 999px;

  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 500;

  cursor: pointer;
  transition: background 0.2s ease;
}

.google-btn:hover {
  background: #1f6f54;
  color: #eafaf4;
}

.google-btn img {
  width: 18px;
  height: 18px;
}

.google-user {
  display: flex;
  align-items: center;
  gap: 12px;

  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
}

.google-user img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.google-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.google-user-info span {
  font-size: 14px;
  font-weight: 600;
}

.google-user-info small {
  font-size: 12px;
  opacity: 0.85;
}

.google-logout {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #e74c3c;
  font-size: 13px;
  cursor: pointer;
}

/* =========================
   GOOGLE BUTTON — DARK MODE
========================= */

body[data-theme='dark'] .google-btn {
  background-color: var(--bg-tertiary);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-md);
}

body[data-theme='dark'] .painel-config .google-btn {
  background-color: var(--bg-tertiary);
  background-image: linear-gradient(
    180deg,
    rgba(var(--color-primary-rgb), 0.14) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  color: var(--text-primary);
  border-color: rgba(var(--color-primary-rgb), 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-lg);
}

body[data-theme='dark'] .google-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow-lg), var(--glow-soft);
}

body[data-theme='dark'] .painel-config .google-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow-xl), var(--glow-sm);
}

body[data-theme='dark'] .google-btn:active,
body[data-theme='dark'] .painel-config .google-btn:active {
  transform: translateY(1px);
}

body[data-theme='dark'] .google-btn:focus-visible,
body[data-theme='dark'] .painel-config .google-btn:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow-lg), var(--glow-soft);
}


body[data-theme='dark'] #btn-ajustar-data {
  background-color: rgba(var(--color-primary-rgb), 0.18);
  background-image: linear-gradient(
    180deg,
    rgba(var(--color-primary-rgb), 0.22) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  color: var(--btn-primary-text);

  /* ✅ bordinha suave + premium */
  border: 1px solid rgba(var(--color-primary-rgb), 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-lg);
}



  body[data-theme='dark'] #btn-ajustar-data:hover {
    color: var(--text-primary);

    background-color: rgba(var(--color-primary-rgb), 0.26);
    border-color: var(--border-focus);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow-xl), var(--glow-sm);
  }

  body[data-theme='dark'] #btn-ajustar-data:active {
    transform: translateY(1px);
  }

  body[data-theme='dark'] #btn-ajustar-data:focus-visible {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), var(--shadow-lg), var(--glow-soft);
  }



/* =========================
   GOOGLE USER INFO
========================= */

.google-user {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px;
  border-radius: 14px;

  background: rgba(0, 0, 0, 0.05);
}

body[data-theme='dark'] .google-user {
  background: rgba(255, 255, 255, 0.08);
}

/* ESCONDIDO POR PADRÃO */
.google-user.oculto {
  display: none !important;
}

/* Seleção de versículos (clique) */
.texto-biblico p .verso-texto {
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  text-decoration-color: rgba(21, 107, 76, 0);

  transition: text-decoration-color 180ms ease, text-decoration-thickness 180ms ease;
}

.texto-biblico p.verso-selecionado .verso-texto {
  text-decoration-color: rgba(21, 107, 76, 0.9);
}

body[data-theme='dark'] .texto-biblico p.verso-selecionado .verso-texto {
  text-decoration-color: rgba(180, 220, 205, 0.9);
}

/* Painel flutuante — Favoritos (Reader) */
#painel-favoritos {
  position: fixed;
  right: var(--page-pad);
  top: 80vh;
  z-index: 8000;
  min-width: 220px;
  padding: 12px;

  border: 1px solid rgba(21, 107, 76, 0.25);
  border-radius: 16px;

  background: rgba(10, 16, 14, 0.637);
  backdrop-filter: blur(10px);
  justify-self: center;
  touch-action: none;
}

body[data-theme='dark'] #painel-favoritos {
  background: rgba(10, 16, 14, 0.78);
  border-color: rgba(180, 220, 205, 0.22);
}

#painel-favoritos .fav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

#painel-favoritos .fav-title {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #ffffffd8;
}

#painel-favoritos .fav-star {
  width: 40px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(211, 211, 211, 0.35);
  background: transparent;
  color: rgba(255, 255, 255, 0.35); /* amarelo estrela */
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

#painel-favoritos .fav-star.ativo {
  color: #f2c94c; /* amarela */
}

#painel-favoritos .fav-cores {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#painel-favoritos .fav-cor {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 3px solid rgba(0, 0, 0, 0.35);
  background: rgba(21, 107, 76, 0.12);
  cursor: pointer;
}

#painel-favoritos .fav-cor.ativo {
  border-color: rgba(255, 255, 255, 0.35);
}

/* cores (placeholder lógico — visual final a gente ajusta depois) */
#painel-favoritos .fav-cor[data-cor='marca-texto'] {
  background: rgba(170, 255, 80, 0.5);
}
#painel-favoritos .fav-cor[data-cor='amarelo-suave'] {
  background: rgba(255, 252, 90, 0.5);
}
#painel-favoritos .fav-cor[data-cor='azul-suave'] {
  background: rgba(41, 141, 255, 0.5);
}
#painel-favoritos .fav-cor[data-cor='roxo-suave'] {
  background: rgba(161, 89, 255, 0.5);
}
#painel-favoritos .fav-cor[data-cor='laranja-suave'] {
  background: rgba(255, 90, 90, 0.5);
}

/* FAVORITO — MARCAÇÃO NO TEXTO */
.texto-biblico p.verso-favorito .verso-texto {
  padding: 2px 6px;
  border-radius: 10px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* cores (light mode) */
.texto-biblico .verso-texto[data-fav-cor='marca-texto'] {
  background: rgba(170, 255, 80, 0.5);
}
.texto-biblico .verso-texto[data-fav-cor='azul-suave'] {
  background: rgba(41, 141, 255, 0.5);
}
.texto-biblico .verso-texto[data-fav-cor='roxo-suave'] {
  background: rgba(161, 89, 255, 0.5);
}
.texto-biblico .verso-texto[data-fav-cor='amarelo-suave'] {
  background: rgba(255, 252, 90, 0.5);
}
.texto-biblico .verso-texto[data-fav-cor='laranja-suave'] {
  background: rgba(255, 90, 90, 0.5);
}

/* ações do painel (estrela + fechar) */
#painel-favoritos .fav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#painel-favoritos .fav-close {
  position: absolute;
  top: 62px;
  right: 15px;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  line-height: 1;
  cursor: pointer;

  font-size: 18px;
  color: rgba(220, 70, 70, 0.9); /* vermelho discreto */
}

/* ===============================
   FAVORITOS (GLOBAL)
=============================== */

.btn-favoritos-global {
  position: absolute;
  top: 0;
  left: 0;

  width: 42px;
  height: 42px;

  background: #ffffff;
  color: #156b4c;

  border: 2px solid #156b4c;
  border-radius: 50%;

  font-size: 20px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.btn-favoritos-global:hover {
  background: #e9f6f1;
}

.btn-favoritos-global:active {
  transform: scale(0.95);
}

/* caixa do modal maior e com scroll interno */
.modal-caixa.modal-favoritos-global {
  width: calc(100% - 24px);
  max-width: 820px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Favoritos (Minhas Cifras) dentro do modal global */
#modal-favoritos-global[data-modo='mychords'] #fav-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px;
}

#modal-favoritos-global[data-modo='mychords'] .mychords-fav-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 0 12px 6px;
}

#modal-favoritos-global[data-modo='mychords'] .mychords-fav-label {
  font-size: 12px;
  opacity: 0.7;
}

#modal-favoritos-global[data-modo='mychords'] .mychords-fav-sort {
  height: 38px;
  border-radius: 12px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: inherit;
  padding: 0 10px;
}

#modal-favoritos-global[data-modo='mychords'] .mychords-fav-hint {
  font-size: 12px;
  opacity: 0.7;
}

#modal-favoritos-global[data-modo='mychords'] .mychords-fav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#modal-favoritos-global[data-modo='mychords'] .mychords-item-draggable {
  cursor: grab;
}

#modal-favoritos-global[data-modo='mychords'] .mychords-item-draggable:active {
  cursor: grabbing;
}

#modal-favoritos-global[data-modo='mychords'] .mychords-item-draggable.dragging {
  opacity: 0.9;
  transform: scale(1.02);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

#modal-favoritos-global[data-modo='mychords'] .mychords-item-draggable.drag-over {
  border-color: rgba(21, 107, 76, 0.65);
  box-shadow: 0 0 0 2px rgba(21, 107, 76, 0.15);
}

#modal-favoritos-global[data-modo='mychords'] .mychords-drop-line {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(21, 107, 76, 0.2), rgba(21, 107, 76, 0.7), rgba(21, 107, 76, 0.2));
  box-shadow: 0 0 0 1px rgba(21, 107, 76, 0.2);
  opacity: 0;
  pointer-events: none;
}

.mychords-fav-ghost.hinario-item {
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.22);
  background: rgba(175, 175, 175, 0.06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform: scale(1.02);
  z-index: 10005;
  position: fixed;
}

.mychords-fav-ghost {
  --drop-line-top: 0px;
  --drop-line-visible: 0;
}

.mychords-fav-ghost .mychords-drop-line {
  top: var(--drop-line-top);
  opacity: var(--drop-line-visible);
}

#modal-favoritos-global[data-modo='mychords'] .mychords-fav-list {
  position: relative;
}

#modal-favoritos-global[data-modo='mychords'] .mychord-item.drag-hidden {
  opacity: 0.35;
  border-style: dashed;
  border-color: rgba(21, 107, 76, 0.35);
  background: rgba(21, 107, 76, 0.03);
}

.mychords-fav-ghost .hinario-item-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-wide);
  color: #156b4c;
}

.mychords-fav-ghost .hinario-item-sub {
  margin-top: 2px;
  font-size: 13px;
  opacity: 0.75;
}

.mychords-fav-ghost .hinario-star {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: #156b4c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mychords-fav-ghost .mychords-drag-handle {
  display: none;
}

body[data-theme='dark'] .mychords-fav-ghost.hinario-item {
  border-color: var(--border-primary);
  background: var(--bg-card);
}

body[data-theme='dark'] .mychords-fav-ghost .hinario-item-title {
  color: var(--text-primary);
}

body[data-theme='dark'] .mychords-fav-ghost .hinario-star {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

#modal-favoritos-global[data-modo='mychords'] .mychords-drag-handle {
  width: 32px;
  height: 40px;
  border-radius: 12px;
  border: 2px dashed rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.03);
  color: rgba(21, 107, 76, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 1px;
  user-select: none;
  touch-action: none;
}

#modal-favoritos-global[data-modo='mychords'] .hinario-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.22);
  background: rgba(175, 175, 175, 0.06);
}

#modal-favoritos-global[data-modo='mychords'] .hinario-item-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-wide);
  color: #156b4c;
}

#modal-favoritos-global[data-modo='mychords'] .hinario-item-sub {
  margin-top: 2px;
  font-size: 13px;
  opacity: 0.75;
}

#modal-favoritos-global[data-modo='mychords'] .hinario-star {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: #156b4c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#modal-favoritos-global[data-modo='mychords'] .hinario-star.ativo {
  background: #156b4c;
  color: #ffffff;
  border-color: rgba(21, 107, 76, 0.95);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='mychords'] .hinario-item {
  border-color: var(--border-primary);
  background: var(--bg-card);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='mychords'] .hinario-item-title {
  color: var(--text-primary);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='mychords'] .hinario-star {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='mychords'] .hinario-star.ativo {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='mychords'] .hinario-star {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='mychords'] .mychords-fav-sort {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='mychords'] .mychords-drag-handle {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='hinario'] .hinario-item {
  border-color: var(--border-primary);
  background: var(--bg-card);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='hinario'] .hinario-item-title {
  color: var(--text-primary);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='hinario'] .hinario-star {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body[data-theme='dark'] #modal-favoritos-global[data-modo='hinario'] .hinario-star.ativo {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.fav-conteudo {
  background: rgba(134, 134, 134, 0.397);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 18px;
  padding: 20px;
  margin-top: 10px;
  overflow: auto;
  text-align: center;
}

body[data-theme='dark'] .fav-conteudo {
  background: rgba(0, 0, 0, 0.397);
}

.fav-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fav-fechar {
  margin-top: auto;
  margin-left: auto;
  background: transparent !important;
  border: none;
  cursor: pointer;

  font-size: 22px; /* maior */
  line-height: 1;

  color: rgba(220, 90, 90, 0.9) !important;
}

.fav-fechar:active {
  transform: scale(0.95);
}

.fav-livros {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 12px;
}

.fav-livros::-webkit-scrollbar {
  height: 6px;
}

.fav-livros button {
  display: flex;
  align-items: center;
  border: 2px solid #156b4c;
  background: rgba(0, 0, 0, 0.32) !important;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.fav-livros button.ativo {
  border-color: #156b4c;
  background: #156b4c !important;
  color: #ffffff;
}

body[data-theme='light'] .fav-livros button {
  border: 2px solid #156b4c;
  background: rgba(0, 0, 0, 0.06);
  color: #156b4c;
}

body[data-theme='light'] .fav-livros button.ativo {
  border-color: #156b4c;
  background: #156b4c !important;
  color: #ffffff;
}

/* separador por capítulo */
.fav-capitulo {
  margin: 14px 0 6px;
  font-weight: 800;
  color: #156b4c;
}

/* painel inferior */
.painel-fav-global {
  margin-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 10px;

  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-theme='dark'] .painel-fav-global {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.painel-fav-titulo {
  font-weight: 800;
  color: #156b4c;
  margin-right: 4px;
}

.btn-estrela-global {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 22px;

  /* apagada por padrão */
  color: rgba(255, 255, 255, 0.55);
}

body[data-theme='light'] .btn-estrela-global {
  color: rgba(0, 0, 0, 0.35);
}

body[data-theme='dark'] #painel-fav-global .btn-estrela-global {
  background: transparent !important;
}
/* Estrela do Favoritos Global — apagada */
.btn-estrela-global {
  background: transparent;
  color: rgba(0, 0, 0, 0.35);
}

/* Dark: apagada */
body[data-theme='dark'] .btn-estrela-global {
  color: rgba(255, 255, 255, 0.35);
}

body[data-theme='light'] .btn-estrela-global.ativo,
body[data-theme='dark'] .btn-estrela-global.ativo {
  color: #f2c94c;
}

/* Acesa */
.btn-estrela-global.ativo {
  color: #f2c94c;
}

/*
.paleta-fav-global {
  display: flex;
  gap: 8px;
}

.paleta-fav-global button {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  background: var(--c);
}

body[data-theme='dark'] .paleta-fav-global button {
  border-color: rgba(255, 255, 255, 0.18);
}

.paleta-fav-global button.ativo {
  outline: 2px solid rgba(21, 107, 76, 0.65);
  outline-offset: 2px;
} */

/* =====================================================
   BOTÃO FAVORITOS (GLOBAL) — FORA DO READER (SAFE-AREA)
   Reusa o estilo do .btn-config e só muda o lado
===================================================== */
body:not(.modo-leitura) .btn-favoritos-global {
  /* ✅ Layout: posição fixa relativa ao body (não se move com resize) */
  left: var(--page-pad);
  right: auto;
}

/* não mostra o botão favoritos dentro do reader */
body.modo-leitura #btn-favoritos-global {
  display: none !important;
}

/* esconde favoritos antes do plano iniciar (igual ao config) */
body:not(.plano-iniciado) #btn-favoritos-global {
  display: none;
}

/* quando config está aberta, esconde favoritos também (pra não conflitar) */
body.config-aberto #btn-favoritos-global {
  display: none;
}

.fav-fechar i {
  width: 22px;
  height: 22px;
}

/* ===============================
   DESTAQUE — FAVORITO LOCALIZADO
   =============================== */

p.versiculo.fav-localizado {
  position: relative;
  animation: favPulse 1.8s ease-out;
  border-radius: 8px;
}

/* Light mode */
body[data-theme='light'] p.versiculo.fav-localizado {
  background: rgba(255, 215, 100, 0.35);
}

/* Dark mode */
body[data-theme='dark'] p.versiculo.fav-localizado {
  background: rgba(255, 200, 80, 0.18);
}

/* animação suave */
@keyframes favPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 200, 80, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 200, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 200, 80, 0);
  }
}

/* ===============================
   FAVORITOS GLOBAL — BUSCA (LOCALIZAR)
=============================== */
#fav-localizar {
  display: block;
}

#fav-localizar .fav-find {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 5px 6px;
  border-radius: 14px;

  border: 1px solid rgba(21, 107, 76, 0.35);
  background: rgba(21, 107, 76, 0.14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  margin-bottom: 10px;
}

[data-theme='light'] #fav-localizar .fav-find {
  background: rgba(21, 107, 76, 0.1);
  border: 1px solid rgba(21, 107, 76, 0.35);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

#fav-localizar .fav-find-ico {
  color: #42d39a;
  font-weight: 700;
  opacity: 0.95;
}

[data-theme='light'] #fav-localizar .fav-find-ico {
  color: #156b4c;
}

#fav-busca-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;

  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}

#fav-busca-input::placeholder {
  opacity: 0.75;
}

#fav-localizar .fav-find:focus-within {
  border-color: rgba(66, 211, 154, 0.85);
  box-shadow: 0 0 0 3px rgba(66, 211, 154, 0.16), 0 12px 28px rgba(0, 0, 0, 0.28);
}

#fav-busca-clear {
  width: 34px;
  height: 34px;
  border-radius: 12px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.85);

  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  opacity: 0.65;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}

[data-theme='light'] #fav-busca-clear {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

#fav-busca-clear.ativo {
  opacity: 1;
}

#fav-busca-clear:hover {
  transform: scale(1.03);
  background: rgba(66, 211, 154, 0.18);
}

/* Resultados */
.fav-busca-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.fav-hit {
  text-align: left;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

[data-theme='light'] .fav-hit {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.fav-hit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.fav-hit-ref {
  font-weight: 800;
  color: #42d39a;
}

[data-theme='light'] .fav-hit-ref {
  color: #156b4c;
}

.fav-hit-text {
  opacity: 0.9;
  font-size: 13px;
  line-height: 1.35;
}

.fav-busca-empty {
  margin-top: 14px;
  opacity: 0.75;
  padding: 12px;
}

/* Destaque ao rolar pro verso */
.fav-localizado {
  animation: favPulse 1.35s ease-in-out;
  border-radius: 14px;
  outline: 2px solid rgba(66, 211, 154, 0.85);
  box-shadow: 0 0 0 6px rgba(66, 211, 154, 0.18);
}

@keyframes favPulse {
  0% {
    outline-color: rgba(66, 211, 154, 0.15);
    box-shadow: 0 0 0 0 rgba(66, 211, 154, 0);
    transform: scale(1);
  }
  40% {
    outline-color: rgba(66, 211, 154, 0.9);
    box-shadow: 0 0 0 10px rgba(66, 211, 154, 0.18);
    transform: scale(1.01);
  }
  100% {
    outline-color: rgba(66, 211, 154, 0.3);
    box-shadow: 0 0 0 0 rgba(66, 211, 154, 0);
    transform: scale(1);
  }
}

/* Botão copiar (reader) */
#painel-favoritos .fav-copy {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

#painel-favoritos .fav-copy:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

body[data-theme='light'] #painel-favoritos .fav-copy {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.78);
}

/* ===============================
   ANIMAÇÃO do botão copiar (reader)
   =============================== */
@keyframes favCopyPop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

#painel-favoritos .fav-copy.copiou {
  animation: favCopyPop 420ms ease;
}

/* Botão copiar (favoritos globais) */
#painel-fav-global .fav-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;

  display: grid;
  place-items: center;

  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  margin-top: 10px;
  margin-left: 10px;
}

#painel-fav-global .fav-action-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

#painel-fav-global .fav-action-btn:active {
  transform: translateY(0px) scale(0.98);
}

body[data-theme='light'] #painel-fav-global .fav-action-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.78);
}

body[data-theme='light'] #painel-fav-global .fav-action-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* só um ajuste de peso no copiar */
#painel-fav-global .fav-copy-btn {
  font-weight: 700;
}

/* ===============================
   COPIAR — FEEDBACK (texto + toast)
   =============================== */

.verso-copiado {
  position: relative;
}

.verso-copiado::after {
  content: '';
  position: absolute;
  inset: -2px -4px;
  border-radius: 10px;
  pointer-events: none;
  background: rgba(46, 204, 113, 0.18);
  box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.22), 0 10px 28px rgba(46, 204, 113, 0.12);
  animation: versoCopiadoPulse 900ms ease-out 1;
}

body[data-theme='light'] .verso-copiado::after {
  background: rgba(46, 204, 113, 0.14);
  box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.18), 0 10px 26px rgba(46, 204, 113, 0.1);
}

@keyframes versoCopiadoPulse {
  0% {
    opacity: 0;
    transform: scale(0.98);
    filter: blur(0px);
  }
  18% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
  }
  70% {
    opacity: 0.55;
    transform: scale(1.002);
  }
  100% {
    opacity: 0;
    transform: scale(1.01);
    filter: blur(1px);
  }
}

/* Toast (balãozinho) */
#toast-copiado {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(14px);
  opacity: 0;
  pointer-events: none;
  z-index: 99999;

  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;

  color: rgba(255, 255, 255, 0.92);
  background: rgba(14, 61, 38, 0.58);
  border: 1px solid rgba(46, 204, 113, 0.22);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  transition: opacity 180ms ease, transform 180ms ease;
}

body[data-theme='light'] #toast-copiado {
  color: rgba(10, 20, 14, 0.92);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(46, 204, 113, 0.25);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

#toast-copiado.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===============================
   BOTÃO OUVIR (TTS) — READER
=============================== */
.btn-tts {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 20%;

  border: 2px solid #156b4c;
  background: transparent;
  color: #156b4c;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 4000;
}

/* Esconde fora do reader */
body:not(.modo-leitura) .btn-tts {
  display: none;
}

body.config-aberto .btn-tts {
  display: none;
}

/* ===============================
   TTS — BOX TRANSPARENTE NO VERSO ATIVO
=============================== */
.texto-biblico p.verso-tts-ativo {
  border-radius: 14px;
  background: rgba(21, 107, 76, 0.08); /* transparente */
  box-shadow: 0 0 0 2px rgba(21, 107, 76, 0.35);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-theme='dark'] .texto-biblico p.verso-tts-ativo {
  background: var(--bg-subtle);
  box-shadow: 0 0 0 2px rgba(47, 155, 120, 0.35);
}

body.modo-leitura .btn-config,
body.modo-leitura .btn-fonte,
body.modo-leitura .btn-tts,
body.modo-leitura .btn-voltar {
  z-index: 7000;
}

/* direita */
body.modo-leitura .btn-config,
body.modo-leitura .btn-fonte,
body.modo-leitura .btn-tts {
  /* ✅ Layout: posição fixa relativa ao body (não se move com resize) */
  right: var(--page-pad);
}

/* ordem vertical respeitando safe-area */
body.modo-leitura .btn-config {
  top: var(--top-ui);
}

body.modo-leitura .btn-fonte {
  top: calc(var(--top-ui) + 54px);
}

body.modo-leitura .btn-tts {
  top: calc(var(--top-ui) + 108px);
}

/* ===============================
   PLAYER TTS (BOTTOM)
=============================== */
body:not(.modo-leitura) .tts-player {
  display: none;
}
body.config-aberto .tts-player {
  display: none;
}

/* não deixa o player cobrir o final do conteúdo */
.modo-leitura .reader-body {
  padding-bottom: calc(140px + var(--bottom-inset));
}

.tts-player {
  position: fixed;
  display: flex;
  left: env(safe-area-inset-left, 0px);
  right: env(safe-area-inset-right, 0px);
  /* ✅ ITEM 10: Respeita safe-area no bottom (barra de navegação Android) */
  bottom: env(safe-area-inset-bottom, 0px);

  padding: 12px var(--page-pad) calc(12px + var(--bottom-inset));
  z-index: 7600;
  pointer-events: none; /* só o inner recebe clique */
}

.tts-player-inner {
  pointer-events: auto;
  max-width: 100vh;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 12px 14px;
  border-radius: 18px;

  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(10px);

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

body[data-theme='dark'] .tts-player-inner {
  border-color: rgba(67, 211, 162, 0.24);
  background: rgba(8, 20, 15, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.tts-player-meta {
  min-width: 0;
  flex: 1;
}

.tts-nowplaying {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.1;
  color: #156b4c;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme='dark'] .tts-nowplaying {
  color: #eafaf4;
}

.tts-player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tts-player-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;

  border: 1px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: #156b4c;

  display: grid;
  place-items: center;

  cursor: pointer;
}

.tts-player-btn:active {
  transform: scale(0.97);
}

body[data-theme='dark'] .tts-player-btn {
  border-color: var(--border-primary);
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.tts-player-btn-main {
  width: 54px;
  height: 54px;
  border-radius: 18px;

  border: none;
  background: #156b4c;
  color: #fff;
}

body[data-theme='dark'] .tts-player-btn-main {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.tts-player-voice {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 8px 10px;
  border-radius: 14px;

  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.05);
}

body[data-theme='dark'] .tts-player-voice {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
}

#tts-voice-select {
  max-width: 170px;
  border: none;
  background: transparent;
  color: inherit;

  font-size: 12px;
  font-weight: 600;
  outline: none;
}

/* ===============================
   TTS — SELECT DE VOZ (DENTRO DO PLAYER)
=============================== */

.tts-player-voice {
  max-width: 160px; /* impede sair do box */
  flex-shrink: 1;
  position: relative;
}

.tts-player-voice select {
  width: 100%;
  max-width: 100%;

  padding: 8px 28px 8px 10px;
  font-size: 12px;
  font-weight: 600;

  border-radius: 12px;
  border: 1px solid rgba(21, 107, 76, 0.35);

  background: rgba(255, 255, 255, 0.85);
  color: #156b4c;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;
}

/* seta custom */
.tts-player-voice::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  color: #156b4c;
}

/* focus elegante */
.tts-player-voice select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(47, 155, 120, 0.18);
}

/* ===============================
   DARK MODE — SELECT DE VOZ
=============================== */

body[data-theme='dark'] .tts-player-voice select {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-primary);
}

body[data-theme='dark'] .tts-player-voice::after {
  color: var(--color-primary);
}

/* ===============================
   TTS PLAYER — SELECT (VOZ)
   Estilo profissional + dark/light
=============================== */

.tts-player select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-color: rgba(21, 107, 76, 0.12);
  color: inherit;

  border: 1px solid rgba(21, 107, 76, 0.35);
  border-radius: 12px;

  padding: 8px 34px 8px 12px;
  font-size: 14px;
  font-weight: 500;

  max-width: 100%;
  outline: none;

  /* 🔑 força esquema correto do SO */
  color-scheme: light dark;
}

/* seta custom (fica dentro do box) */
.tts-player-voice {
  position: relative;
}

.tts-player-voice::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.7;
  font-size: 12px;
}

/* opções internas */
.tts-player option {
  background: #ffffff;
  color: #000000;
}

/* ===============================
   DARK MODE
=============================== */

body[data-theme='dark'] .tts-player select {
  background-color: rgba(67, 211, 162, 0.18);
  border-color: rgba(180, 220, 205, 0.35);
  color: #eafaf4;
}

body[data-theme='dark'] .tts-player option {
  background: #102620;
  color: #eafaf4;
}

/* ===============================
   LIMITES (não sair da tela)
=============================== */

/* evita dropdown gigante */
.tts-player select {
  max-height: 42px;
}

/* Android / Chrome */
.tts-player select:focus {
  box-shadow: 0 0 0 2px rgba(21, 107, 76, 0.25);
}

/* ===============================
   PLAYER — BARRA DE PROGRESSO (ÁUDIO + TTS)
=============================== */
.tts-audio-bar {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;

  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(21, 107, 76, 0.18);
}

/* cada linha (áudio ou tts) */
.tts-audio-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

body[data-theme='dark'] .tts-audio-bar {
  border-top-color: rgba(67, 211, 162, 0.18);
}

.tts-audio-time {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
  min-width: 44px;
  text-align: center;
}

.tts-audio-range {
  flex: 1;
  appearance: none;
  height: 6px;
  border-radius: 6px;
  background: rgba(21, 107, 76, 0.22);
  outline: none;
}

body[data-theme='dark'] .tts-audio-range {
  background: var(--bg-subtle);
}

.tts-audio-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #156b4c;
  cursor: pointer;
  border: none;
}

body[data-theme='dark'] .tts-audio-range::-webkit-slider-thumb {
  background: var(--color-primary);
}

/* ===============================
   PLAYER — ANIMAÇÃO PLAY (sincronizada)
=============================== */
#btn-tts.is-playing {
  animation: ttsPulse 1.15s ease-in-out infinite;
}

@keyframes ttsPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

/* ===============================
   PLAYER — BARRA EMBAIXO (SIMPLES)
   (meta + controles + voz em cima / barra embaixo)
=============================== */
#tts-player.audio-mode .tts-player-inner {
  flex-wrap: wrap;
  align-items: center;
}

#tts-player.audio-mode .tts-player-meta,
#tts-player.audio-mode .tts-player-controls,
#tts-player.audio-mode .tts-player-voice {
  flex: 0 0 auto;
}

#tts-player.audio-mode .tts-audio-bar {
  flex: 0 0 100%;
  order: 99;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(21, 107, 76, 0.18);
  border-bottom: 0;
}

body[data-theme='dark'] #tts-player.audio-mode .tts-audio-bar {
  border-top-color: var(--border-subtle);
}

/* ===============================
   READER — BOTÃO TOGGLE PLAYER (abaixo do voltar)
=============================== */
.btn-player-toggle {
  border-radius: 20%;
}

body.modo-leitura .btn-player-toggle {
  z-index: 7000;
  /* ✅ Layout: posição fixa relativa ao body (não se move com resize) */
  left: var(--page-pad);
  top: calc(var(--top-ui) + 54px);
}

body:not(.modo-leitura) .btn-player-toggle,
body.config-aberto .btn-player-toggle {
  display: none !important;
}

/* estado ativo (player aberto) */
body.modo-leitura .btn-player-toggle.ativo {
  background: #156b4c;
  color: #fff;
  border-color: #156b4c;
}

body[data-theme='dark'] .btn-player-toggle.ativo {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

/* ===============================
   PLAYER — FECHAR/ABRIR (sem atrapalhar leitura)
=============================== */
body.player-hidden .tts-player {
  display: none !important;
}

/* quando o player está fechado, não precisa reservar 140px */
body.modo-leitura.player-hidden .reader-body {
  padding-bottom: calc(32px + var(--bottom-inset)) !important;
}

/* ===============================
   BTN FONTE — ESTADO ATIVO (igual btn-player-toggle)
=============================== */
body.modo-leitura .btn-fonte.ativo {
  background: #156b4c;
  color: #fff;
  border-color: #156b4c;
}

body[data-theme='dark'] .btn-fonte.ativo {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}
/* ===============================
   PLAYER — RESPONSIVO BONITO (<= 520px)
   (vira GRID, mas continua 1 único bloco coeso)
=============================== */
@media (max-width: 520px) {
  /* container continua 1 box */
  .tts-player-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'meta controls'
      'voice voice'
      'bar  bar';
    gap: 10px;

    /* garante que nada “vaza” */
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .tts-player-meta {
    grid-area: meta;
    min-width: 0;
  }

  .tts-player-controls {
    grid-area: controls;
    justify-self: end;
  }

  .tts-player-voice {
    grid-area: voice;
    min-width: 0;
    max-width: 100%;
  }

  /* select sempre cabe dentro do box */
  #tts-voice-select,
  .tts-player-voice select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* barra só aparece no modo áudio e fica “presa” dentro do box */
  .tts-audio-bar {
    grid-area: bar;
    width: 100%;
  }

  /* reduz um pouco os botões pra caber sem quebrar */
  .tts-player-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .tts-player-btn-main {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  /* textos menores e alinhados */
  .tts-nowplaying {
    font-size: 12px;
  }

  .tts-audio-time {
    font-size: 11px;
    min-width: 40px;
  }
}

/* ===============================
   FAVORITOS GLOBAL — BOTÃO ATIVO (igual toggle)
=============================== */
.btn-favoritos-global.ativo {
  background: #156b4c;
  color: #fff;
  border-color: #156b4c;
}

body[data-theme='dark'] .btn-favoritos-global.ativo {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}


/* ===============================
   BÍBLIA — LIVROS / CAPÍTULOS
=============================== */
#biblia {
  max-width: 768px;
  margin: 0 auto;
}

/* ===============================
   BÍBLIA — FILTRO (modal)
   =============================== */
#biblia-filter-modal .biblia-filter-box {
  border-radius: 18px;
  border: 2px solid rgba(21, 107, 76, 0.22);
  background: rgba(255, 255, 255, 0.98);
}

body[data-theme='dark'] #biblia-filter-modal .biblia-filter-box {
  background: var(--bg-primary);
  border-color: var(--border-primary);
  color: var(--text-primary);
}

/* “chips” das opções */
#biblia-filter-modal .biblia-filter-row label {
  padding: 8px 12px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.06);
}

body[data-theme='dark'] #biblia-filter-modal .biblia-filter-row label {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
}

/* bolinhas no tema */
#biblia-filter-modal input[type='radio'] {
  accent-color: #156b4c;
}

body[data-theme='dark'] #biblia-filter-modal input[type='radio'] {
  accent-color: var(--color-primary);
}

/* select bem IPB */
#biblia-filter-modal #biblia-filter-book {
  border: 2px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.06);
  border-radius: 14px;
  height: 44px;
  padding: 0 12px;
}

body[data-theme='dark'] #biblia-filter-modal #biblia-filter-book {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ===============================
   HINÁRIO — LISTA + DETALHE
=============================== */
#hinario {
  max-width: 768px;
  margin: 0 auto;
}

.hinario-top {
  margin: 10px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hinario-filter-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: inherit;
  cursor: pointer;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body[data-theme='dark'] .hinario-filter-btn {
  border-color: var(--border-primary);
  background: var(--bg-card);
  color: var(--text-primary);
}

.hinario-search {
  width: 100%;
  padding: 14px 14px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: #0b1f18;
  font-weight: 700;
  outline: none;
}

/* ===============================
   HINÁRIO — SWITCH (LISTA / ÍNDICE)
=============================== */
.hinario-mode {
  display: flex;
  width: 100%;
  margin: 0 0 12px;
}

.hinario-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.06);
}

.hinario-switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.hinario-switch-text {
  font-weight: 900;
  opacity: 0.7;
  user-select: none;
}

.hinario-switch-text.ativo {
  opacity: 1;
}

.hinario-switch-track {
  position: relative;
  width: 62px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
}

.hinario-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--color-primary);
  transition: transform 160ms ease;
}

.hinario-switch-input:checked + .hinario-switch-track .hinario-switch-thumb {
  transform: translateX(30px);
}

body[data-theme='light'] .hinario-switch {
  background: rgba(255, 255, 255, 0.75);
}

body[data-theme='light'] .hinario-switch-track {
  background: rgba(0, 0, 0, 0.06);
}

/* ===============================
   HINÁRIO — ÍNDICE (ACCORDION)
=============================== */
.hinario-index {
  width: 100%;
  display: block;
}

.hinario-index-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hinario-index details {
  margin: 10px 0 0;
}

.hinario-index summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.1);
  font-weight: 900;
}

.hinario-index summary::-webkit-details-marker {
  display: none;
}

.hinario-index-count {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.75;
}

.hinario-subtitle {
  margin: 12px 2px 6px;
  font-weight: 900;
  opacity: 0.9;
}

.hinario-divider {
  border: none;
  height: 1px;
  background: rgba(21, 107, 76, 0.18);
  margin: 0 0 10px;
}

body[data-theme='dark'] .hinario-divider {
  background: rgba(67, 211, 162, 0.18);
}

/* ===============================
   HINÁRIO — MODAL FILTROS
=============================== */
#hinario-filter-modal.modal {
  padding: 18px;
}

.hinario-filter-box {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(10, 24, 18, 0.92);
  color: #e9fff7;
  padding: 14px;
}

body[data-theme='light'] .hinario-filter-box {
  background: rgba(255, 255, 255, 0.96);
  color: #0b1f18;
}

.hinario-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.hinario-filter-title {
  font-weight: 1000;
}

.hinario-filter-close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.08);
  cursor: pointer;
  color: inherit;
  font-weight: 900;
}

.hinario-filter-list {
  max-height: 52vh;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  padding: 10px;
}

.hinario-filter-section {
  margin: 10px 0 12px;
}

.hinario-filter-section-title {
  font-weight: 900;
  opacity: 0.85;
  margin: 0 0 8px;
}

.hinario-filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 12px;
}

.hinario-filter-item input {
  width: 18px;
  height: 18px;
}

.hinario-filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.hinario-filter-clear,
.hinario-filter-apply {
  flex: 1 1 0;
  height: 44px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.08);
  color: inherit;
  cursor: pointer;
  font-weight: 900;
}

.hinario-filter-apply {
  background: #156b4c;
  border-color: #156b4c;
  color: #fff;
}

.hinario-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hinario-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.22);
  background: rgba(175, 175, 175, 0.06);
}

.hinario-item-main {
  flex: 1;
  min-width: 0;
}

.hinario-item-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-wide);
  color: #156b4c;
}

/* ✅ máx 2 linhas + ... */
.hinario-item-sub {
  margin-top: 2px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  opacity: 0.75;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.hinario-star {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: #156b4c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hinario-star.ativo {
  background: #156b4c;
  color: #ffffff;
  border-color: rgba(21, 107, 76, 0.95);
}

.hinario-empty {
  margin-top: 14px;
  text-align: center;
  opacity: 0.75;
}

/* detalhe */
.hinario-detail {
  margin-top: 10px;
}

.hinario-detail-title {
  margin: 14px 0 8px;
  font-weight: 900;
  color: #156b4c;
  line-height: 1.2;
}

.hinario-detail-sub {
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 12px;
}

/* .hinario-lyrics {
  white-space: pre-wrap;
  line-height: 1.6;
  font-weight: 600;
} */

/* PLAYER DO HINO */
.hinario-audio {
  border: 2px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.06);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0 14px;
}

.hinario-audio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hinario-audio-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: #ffffff;
  color: #156b4c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hinario-audio-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hinario-audio-label {
  font-weight: 900;
  color: #156b4c;
}

.hinario-audio-time {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.75;
  font-weight: 700;
}

.hinario-audio-range {
  width: 100%;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: rgba(21, 107, 76, 0.22);
  outline: none;
}

.hinario-audio-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #156b4c;
  cursor: pointer;
  border: none;
}

/* dark */
body[data-theme='dark'] #hinario .hinario-search {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body[data-theme='dark'] #hinario .hinario-item {
  border-color: var(--border-primary);
  background: var(--bg-card);
}

body[data-theme='dark'] #hinario .hinario-item-title,
body[data-theme='dark'] #hinario .hinario-detail-title,
body[data-theme='dark'] #hinario .hinario-audio-label {
  color: var(--text-primary);
}

body[data-theme='dark'] #hinario .hinario-star {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body[data-theme='dark'] #hinario .hinario-star.ativo {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

body[data-theme='dark'] #mychords .hinario-item {
  border-color: var(--border-primary);
  background: var(--bg-card);
}

body[data-theme='dark'] #mychords .hinario-item-title {
  color: var(--text-primary);
}

body[data-theme='dark'] #mychords .hinario-star {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body[data-theme='dark'] #mychords .hinario-star.ativo {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

body[data-theme='dark'] #hinario .hinario-audio {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
}

body[data-theme='dark'] #hinario .hinario-audio-btn {
  background: var(--bg-tertiary);
  border-color: var(--border-primary);
  color: var(--text-primary);
}

body[data-theme='dark'] #hinario .hinario-audio-range {
  background: var(--bg-subtle);
}

body[data-theme='dark'] #hinario .hinario-audio-range::-webkit-slider-thumb {
  background: var(--color-primary);
}

/* ===============================
   HINÁRIO — BUSCA (input + clear + filtro)
=============================== */
.hinario-top {
  display: flex;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 0;
  align-items: center;
  width: 100%;
}

.hinario-search-clear {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: inherit;
  cursor: pointer;
  font-weight: 900;
}

body[data-theme='dark'] #hinario .hinario-search-clear {
  border-color: var(--border-primary);
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ===============================
   BÍBLIA — LIVROS (ESTANTE / PRATELEIRAS)
=============================== */

.biblia-tools {
  display: flex;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 0;
  align-items: center;
  width: 100%;
}

.biblia-search {
  width: 100%;
  padding: 14px 14px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  outline: none;
}

.biblia-search::placeholder {
  opacity: 0.7;
}

.biblia-search-clear {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: inherit;
  cursor: pointer;
  font-weight: 900;
}

/* ===============================
   BÍBLIA — SWITCH (LIVROS / VERSÍCULOS)
=============================== */
.biblia-mode {
  display: flex;
  width: 100%;
  margin: 0 0 10px;
}

.biblia-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.06);
}

.biblia-switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.biblia-switch-text {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-wide);
  opacity: 0.7;
  user-select: none;
}

.biblia-switch-text.ativo {
  opacity: 1;
}

.biblia-switch-track {
  position: relative;
  width: 62px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
}

.biblia-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--color-primary);
  transition: transform 160ms ease;
}

.biblia-switch-input:checked + .biblia-switch-track .biblia-switch-thumb {
  transform: translateX(30px);
}

body[data-theme='light'] .biblia-switch {
  background: rgba(255, 255, 255, 0.75);
}

body[data-theme='light'] .biblia-switch-track {
  background: rgba(0, 0, 0, 0.06);
}

/* ===============================
   BÍBLIA — RESULTADOS DE VERSÍCULOS
=============================== */
.biblia-versos-view {
  width: 100%;
}

.biblia-versos-info {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.08);
  font-weight: 800;
  opacity: 0.95;
}

.biblia-versos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.biblia-verse-item {
  width: 100%;
  text-align: left;
  border-radius: 16px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.06);
  padding: 12px 12px;
  cursor: pointer;
}

body[data-theme='dark'] .biblia-verse-item {
  background: rgba(16, 38, 32, 0.55);
  border-color: rgba(67, 211, 162, 0.22);
}

.biblia-verse-ref {
  font-weight: 900;
  margin: 0 0 6px;
}

.biblia-verse-text {
  margin: 0;
  opacity: 0.92;
  line-height: 1.25;
}

.biblia-accordion {
  padding: 0;
  width: 100%;
}

.biblia-accordion details {
  margin: 10px 0 0;
}

/* dark: igual hinário */
body[data-theme='dark'] #biblia .biblia-search {
  border-color: var(--border-primary);
  background: var(--bg-card);
  color: var(--text-primary);
}

body[data-theme='dark'] #biblia .biblia-search-clear {
  border-color: var(--border-primary);
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ===============================
   BÍBLIA — FILTRO (versículos)
   =============================== */
.biblia-filter-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.1);
  display: grid;
  place-items: center;
  cursor: pointer;
}

body[data-theme='dark'] #biblia .biblia-filter-btn {
  border-color: rgba(67, 211, 162, 0.22);
  background: var(--bg-card);
  color: var(--text-primary);
}

.biblia-filter-box {
  width: min(520px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(255, 255, 255, 0.98);
  padding: 14px;
}

body[data-theme='dark'] .biblia-filter-box {
  background: rgba(8, 20, 16, 0.96);
  border-color: rgba(67, 211, 162, 0.22);
  color: #e9fff7;
}

.biblia-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.biblia-filter-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-wide);
}

.biblia-filter-close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.08);
  cursor: pointer;
}

.biblia-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 10px 0;
}

.biblia-filter-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  opacity: 0.95;
}

.biblia-filter-book select {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.06);
  padding: 0 12px;
}

body[data-theme='dark'] .biblia-filter-book select {
  border-color: rgba(67, 211, 162, 0.22);
  background: var(--bg-card);
  color: var(--text-primary);
}

.biblia-filter-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.biblia-filter-clear,
.biblia-filter-apply {
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.biblia-filter-apply {
  background: rgba(21, 107, 76, 0.16);
}

.biblia-accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.1);
  font-weight: 800;
}

.biblia-accordion summary::-webkit-details-marker {
  display: none;
}

.biblia-count {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.75;
}

/* mantém o visual de “prateleira” por seção */
.biblia-accordion .biblia-livros {
  margin-top: 10px;
}

.biblia-livros {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;

  /* prateleiras: cada “linha” é uma prateleira */
  /* grid-auto-rows: 76px; */

  padding: 8px;
  border-radius: 18px;

  background:
    /* leve “madeira/placa” */ linear-gradient(to bottom, rgba(21, 107, 76, 0.08), rgba(21, 107, 76, 0.02)),
    /* prateleiras repetidas */ repeating-linear-gradient(to bottom, transparent 0px, transparent 78px, rgba(21, 107, 76, 0.22) 78px);

  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  align-content: start;
}

@media (min-width: 520px) {
  .biblia-livros {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    /* grid-auto-rows removido - altura automática baseada no conteúdo */
  }
}

/* ===============================
   LIVROS DA BÍBLIA - ESTANTE PROFISSIONAL
=============================== */

.biblia-book {
  position: relative;
  min-height: 54px; /* ✅ menor */
  height: auto;

  border: 1px solid rgba(21, 107, 76, 0.2);
  border-left: none; /* Remove borda esquerda (lombada faz o papel) */
  border-radius: 0 12px 12px 0;

  padding: 12px 14px 12px 0; /* ✅ mais compacto */
  padding-left: 22px; /* ✅ mantém lombada, só reduz um pouco */
  text-align: left;
  cursor: pointer;

  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(250, 252, 251, 0.9) 100%
  );
  box-shadow: 0 2px 8px rgba(21, 107, 76, 0.08),
              0 1px 3px rgba(21, 107, 76, 0.05);

  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.biblia-book::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: #156b4c; /* “lombada” do livro */
}

.biblia-book::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 16px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 20%,
    transparent 80%,
    rgba(0, 0, 0, 0.1) 100%
  );
  border-radius: 12px 0 0 12px;
  pointer-events: none;
}

.biblia-book-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 0;
}

.biblia-book-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  margin-left: auto;
  transition: opacity 0.2s ease;
}

.biblia-book-ico i {
  width: 18px;
  height: 18px;
}

@media (hover: hover) {
  .biblia-book:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(21, 107, 76, 0.15),
                0 2px 6px rgba(21, 107, 76, 0.1);
    background: linear-gradient(135deg,
      rgba(255, 255, 255, 1) 0%,
      rgba(250, 252, 251, 0.95) 100%
    );
  }

  .biblia-book:hover .biblia-book-ico {
    opacity: 1;
  }

  .biblia-book:hover::before {
    background: linear-gradient(180deg,
      var(--color-primary-light) 0%,
      var(--color-primary) 50%,
      var(--color-primary-light) 100%
    );
  }
}

/* Nome do livro - UMA LINHA SEMPRE, com ellipsis */
.biblia-book-name {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--color-primary);
  margin: 0;

  /* ✅ UMA LINHA SEMPRE - ellipsis para nomes longos */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  /* Tooltip no hover para nomes cortados */
  position: relative;
}

/* Meta (número de capítulos) */
.biblia-book-meta {
  display: none !important; /* ✅ remove “50 caps” */
}

/* ===============================
   DARK MODE — ESTANTE
   (precisa ser mais específico porque existe regra global: body[data-theme='dark'] button {...})
=============================== */
body[data-theme='dark'] .biblia-livros {
  /* background: linear-gradient(to bottom, rgba(67, 211, 162, 0.1), rgba(8, 20, 15, 0.1)), repeating-linear-gradient(to bottom, transparent 0px, transparent 78px, rgba(67, 211, 162, 0.18) 78px); */
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

/* ===============================
   DARK MODE - ESTANTE DE LIVROS
=============================== */

body[data-theme='dark'] .biblia-book {
  border-color: var(--border-primary);
  border-left: none;
  background: var(--bg-card);
  box-shadow: var(--shadow-md), var(--shadow-sm);
  color: var(--text-primary);
}

/* Lombada no dark mode */
body[data-theme='dark'] .biblia-book::before {
  background: var(--color-primary);
  box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.3),
              inset 2px 0 2px rgba(255, 255, 255, 0.15);
}

/* Brilho na lombada (dark mode) */
body[data-theme='dark'] .biblia-book::after {
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme='dark'] .biblia-book-name {
  color: var(--text-primary);
}

body[data-theme='dark'] .biblia-book-meta {
  color: var(--text-tertiary);
  opacity: 1;
}

@media (hover: hover) {
  body[data-theme='dark'] .biblia-book:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg), var(--shadow-md);
  }

  body[data-theme='dark'] .biblia-book:hover::before {
    background: var(--color-primary-light);
  }
}

.biblia-caps-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 14px 0;
}

.biblia-livro-titulo {
  font-weight: 900;
  color: var(--color-primary);
  flex: 1;
  text-align: center;
}

.biblia-caps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

@media (min-width: 520px) {
  .biblia-caps {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

.biblia-cap {
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.06);
  border-radius: 14px;
  padding: 10px 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-normal);
  color: #156b4c;
  cursor: pointer;
  text-align: center;
}

body[data-theme='dark'] .biblia-cap {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ===============================
   MODO BÍBLIA — esconder configs do PLANO
=============================== */
body.modo-biblia #cfg-tipo-plano,
body.modo-biblia #cfg-ajustar-data,
body.modo-biblia #cfg-reset-plano {
  display: none;
}

/* ===============================
   MODO BÍBLIA — MAIS ESPAÇO NO TOPO
=============================== */
body.modo-biblia #bloco-progresso {
  display: none !important;
}

body.modo-biblia header .verso {
  display: none !important;
}

/* diminui um pouco o respiro do header quando está na Bíblia */
body.modo-biblia .cabecalho {
  margin-bottom: 18px;
}

/* ===============================
   NAV BAR (TOP) — preparada para + abas
=============================== */
.nav-modos {
  max-width: 768px;
  margin: 0 auto 18px auto;

  display: flex;
  justify-content: center; /* ✅ centraliza quando não precisa scroll */
  align-items: center;

  gap: 10px;
  padding: 10px;

  border-radius: 18px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.06);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);

  overflow-x: auto; /* ✅ se no futuro tiver mais abas, rola */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  /* ✅ evita “travamento”/bounce estranho */
  overscroll-behavior-x: contain;

  /* ✅ base para o indicador animado */
  position: relative;
}

/* ✅ “pill” animado que corre por baixo do botão ativo */
.nav-modos .nav-indicator {
  position: absolute;
  top: 5px;    /* ✅ sobe um pouco (mais perto do botão) */
  left: 7px;  /* mantém alinhamento horizontal */

  width: 0;
  height: 0;

  border-radius: 16px;
  pointer-events: none;

  background: linear-gradient(180deg, rgba(21, 107, 76, 0.16), rgba(21, 107, 76, 0.08));
  border: 1px solid rgba(21, 107, 76, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 22px rgba(21, 107, 76, 0.12);

  transform: translate3d(0, 0, 0);
  opacity: 0;
  z-index: 0;

  transition:
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 180ms ease;
}

body[data-theme='dark'] .nav-modos .nav-indicator {
  background: linear-gradient(180deg, rgba(47, 155, 120, 0.18), rgba(47, 155, 120, 0.09));
  border-color: rgba(47, 155, 120, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 12px 26px rgba(0, 0, 0, 0.28);
}

.nav-modos::-webkit-scrollbar {
  display: none; /* Esconde a barra de rolagem para navegadores WebKit */
  -ms-overflow-style: none; /* Esconde a barra de rolagem para o IE e Edge mais antigo */
  scrollbar-width: none; /* Esconde a barra de rolagem para o Firefox */
}

.nav-modo-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 12px 14px;
  border-radius: 16px;

  /* ✅ premium: glass leve + sombra curta */
  position: relative;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.52));
  color: #156b4c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 16px rgba(0, 0, 0, 0.06);

  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-wide);
  cursor: pointer;
  user-select: none;

  -webkit-tap-highlight-color: transparent;

  /* ✅ fica acima do indicator */
  z-index: 1;

  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    color 0.18s ease;
}

/* brilho sutil (premium) */
.nav-modo-btn::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 52%);
  opacity: 0.32;
  pointer-events: none;
}

.nav-modo-btn i {
  width: 18px;
  height: 18px;
  opacity: 0.92;
}

.nav-modo-btn span {
  white-space: nowrap;
}

@media (hover: hover) {
  .nav-modo-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(21, 107, 76, 0.28);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.65),
      0 10px 22px rgba(0, 0, 0, 0.08);
  }
}

.nav-modo-btn:active {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ✅ ATIVO: gradiente + borda forte + glow mais CONTIDO (premium) */
.nav-modo-btn.ativo {
  background: linear-gradient(180deg, var(--color-primary-light), var(--color-primary-dark));
  color: #fff;
  border-color: rgba(21, 107, 76, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 18px rgba(21, 107, 76, 0.18),
    0 0 0 1px rgba(21, 107, 76, 0.22);
}

.nav-modo-btn.ativo::before {
  opacity: 0.42;
}

.nav-modo-btn.ativo i {
  opacity: 1;
}

body[data-theme='dark'] .nav-modos {
  border-color: var(--border-subtle);
  background: var(--bg-tertiary);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
}

/* ✅ Inativo no dark: um pouco mais “glass” (premium) */
body[data-theme='dark'] .nav-modo-btn {
  border-color: var(--bg-tertiary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

body[data-theme='dark'] .nav-modo-btn::before {
  opacity: 0.18;
}

/* ✅ Ativo no dark: glow menor, mais elegante */
body[data-theme='dark'] .nav-modo-btn.ativo {
  background: linear-gradient(180deg, var(--btn-primary-hover), var(--btn-primary-bg));
  color: var(--btn-primary-text);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 26px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(47, 155, 120, 0.18);
}

body[data-theme='dark'] .nav-modo-btn.ativo::before {
  opacity: 0.28;
}

/* Evita trocar enquanto lê */
body.modo-leitura #nav-modos {
  display: none !important;
}

/* ===============================
   BÍBLIA — BOTÃO VOLTAR (LIVROS)
=============================== */
.btn-biblia-voltar {
  /* ✅ Refinamento visual: padding, bordas arredondadas, espaçamento */
  padding: 12px 20px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.22);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ✅ Light: sobrescreve o cinza do .btn-secundario e fica no padrão IPB */
body[data-theme='light'] .btn-biblia-voltar {
  background: rgba(21, 107, 76, 0.06);
  color: #156b4c;
  border-color: rgba(21, 107, 76, 0.22);
}

.btn-biblia-voltar:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .btn-biblia-voltar:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  }
}

body[data-theme='dark'] .btn-biblia-voltar {
  border-color: var(--border-primary);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

@media (hover: hover) {
  body[data-theme='dark'] .btn-biblia-voltar:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }
}

body[data-theme='dark'] .biblia-livro-titulo {
  color: var(--text-primary);
  font-size: 18px;
}

body.plano-iniciado .verso {
  display: none;
}

.btn-biblia-voltar i {
  width: 18px;
  height: 18px;
}

body.modo-home #nav-modos {
  display: none !important;
}

.biblia-fade-in {
  animation: bibliaFadeIn 0.22s ease;
}

.biblia-fade-out {
  animation: bibliaFadeOut 0.18s ease;
}

@keyframes bibliaFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bibliaFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

body.modo-home .btn-config {
  display: none !important;
}

#tab-home {
  display: none !important;
}

#tab-plano {
  margin-right: 0 !important;
}

/* ===============================
   PLAYER — MOSTRAR SÓ 1 BARRA POR VEZ
   (ÁUDIO: minutos | TTS: versículos)
=============================== */

/* quando está em modo áudio */
#tts-player.audio-mode .tts-audio-row[data-row='audio'] {
  display: flex !important;
}
#tts-player.audio-mode .tts-audio-row[data-row='tts'] {
  display: none !important;
}

/* quando está em modo TTS (não-audio-mode) */
#tts-player:not(.audio-mode) .tts-audio-row[data-row='audio'] {
  display: none !important;
}
#tts-player:not(.audio-mode) .tts-audio-row[data-row='tts'] {
  display: flex !important;
}

/* segurança: se alguma linha estiver com .oculto, sempre some */
.tts-audio-row.oculto {
  display: none !important;
}

/* =====================================================
   NAV MODOS — CENTRALIZA SEM TRAVAR (MOBILE FRIENDLY)
   remove o "center" problemático em container scrollável
===================================================== */
#nav-modos.nav-modos {
  justify-content: flex-start !important;
}

/* espaçadores: centraliza quando cabe; quando não cabe, encolhe e deixa rolar */
#nav-modos.nav-modos::before,
#nav-modos.nav-modos::after {
  content: '';
  flex: 1 1 0;
  min-width: 0;
}

body.modo-hinario #bloco-progresso {
  display: none !important;
}

/* HINÁRIO — DETALHE (V1) */
.hinario-detail {
  margin-top: 10px;
}

.hinario-detail-title {
  margin: 14px 0 8px;
  font-weight: 900;
  color: #156b4c;
  line-height: 1.2;
}

.hinario-detail-sub {
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 12px;
}

.hinario-lyrics {
  /* ✅ mesmo “card” do hinario-chords / hinario-score */
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.06);
  padding: 15px;
  width: 100%;
  display: block;

  /* ✅ comportamento do texto */
  white-space: pre-wrap;
  line-height: 1.5;
  font-weight: 400;
  font-family: 'Inter', sans-serif;


  /* ✅ guardrails anti-estouro */
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body[data-theme='dark'] .hinario-lyrics {
  border-color: rgba(67, 211, 162, 0.22);
  background: var(--bg-card);
}

/* HINÁRIO — PLAYER ÁUDIO (TODOS) */
.hinario-audio {
  border: 2px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.06);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0 14px;
}

.hinario-audio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hinario-audio-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: #ffffff;
  color: #156b4c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hinario-audio-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hinario-audio-label {
  font-weight: 900;
  color: #156b4c;
}

.hinario-audio-time {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.75;
  font-weight: 700;
}

.hinario-audio-range {
  width: 100%;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: rgba(21, 107, 76, 0.22);
  outline: none;
}

.hinario-audio-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #156b4c;
  cursor: pointer;
  border: none;
}

body[data-theme='dark'] .hinario-audio {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
}

body[data-theme='dark'] .hinario-audio-btn {
  background: var(--bg-tertiary);
  border-color: var(--border-primary);
  color: var(--text-primary);
}

body[data-theme='dark'] .hinario-audio-label {
  color: var(--text-primary);
}

body[data-theme='dark'] .hinario-audio-range {
  background: var(--bg-subtle);
}

body[data-theme='dark'] .hinario-audio-range::-webkit-slider-thumb {
  background: var(--color-primary);
}

/* dark */
body[data-theme='dark'] .hinario-detail-title {
  color: #e9fff7;
}

/* =====================================================
   READER (HINÁRIO) — reaproveita player, mas sem select/skip
===================================================== */
/* body.modo-leitura-hinario #tts-player .tts-player-voice {
  display: none;
} */

/* body.modo-leitura-hinario #btn-tts-prev,
body.modo-leitura-hinario #btn-tts-next {
  display: none;
} */

/* =====================================================
   CONFIG (HINÁRIO no READER) — esconder itens do plano/bíblia
   (Versão da Bíblia / Tipo de plano / Ajustar data / Reiniciar plano)
===================================================== */
body.modo-leitura-hinario #painel-config #cfg-versao-biblia,
body.modo-leitura-hinario #painel-config #cfg-tipo-plano,
body.modo-leitura-hinario #painel-config #cfg-ajustar-data,
body.modo-leitura-hinario #painel-config #cfg-reset-plano {
  display: none;
}

/* ===============================
   FAVORITOS GLOBAL — HINÁRIO
   (somente no modal do hinário)
=============================== */
#modal-favoritos-global[data-modo='hinario'] #fav-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* CONFIG: no Hinário e no Reader do Hinário, esconder itens de Bíblia/Plano */
body.modo-hinario #cfg-versao-biblia,
body.modo-hinario #cfg-tipo-plano,
body.modo-hinario #cfg-ajustar-data,
body.modo-hinario #cfg-reset-plano,
body.modo-leitura-hinario #cfg-versao-biblia,
body.modo-leitura-hinario #cfg-tipo-plano,
body.modo-leitura-hinario #cfg-ajustar-data,
body.modo-leitura-hinario #cfg-reset-plano,
body.modo-mychords #cfg-versao-biblia,
body.modo-mychords #cfg-tipo-plano,
body.modo-mychords #cfg-ajustar-data,
body.modo-mychords #cfg-reset-plano {
  display: none;
}

/* ===============================
   MINHAS CIFRAS
   (usa mesmos estilos do Hinário)
=============================== */
#mychords {
  max-width: 700px;
  margin: 0 auto;
}

#mychords .mychords-sort {
  height: 44px;
  width: 88px;
  border-radius: 14px;
  border: 2px solid rgba(21, 107, 76, 0.25);
  background: rgba(21, 107, 76, 0.06);
  color: inherit;
  padding: 0 8px;
  font-size: 12px;
}

body[data-theme='dark'] #mychords .mychords-sort {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Modal de escolha (Manual / Upload) */
#mychords-add-modal.modal {
  padding: 18px;
}

#mychords-add-modal .mychords-add-box {
  max-width: 520px;
  width: min(520px, 92vw);
}

.mychords-add-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.mychords-add-title {
  font-weight: 900;
  font-size: 18px;
}

.mychords-add-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.08);
  cursor: pointer;
}

.mychords-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .mychords-add-grid {
    grid-template-columns: 1fr;
  }
}

.mychords-add-card {
  border-radius: 16px;
  border: 2px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.06);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.mychords-add-card i {
  width: 26px;
  height: 26px;
}

.mychords-add-card-title {
  font-weight: 900;
  color: #156b4c;
}

.mychords-add-card-sub {
  font-size: 13px;
  opacity: 0.75;
}

body[data-theme='dark'] .mychords-add-card {
  border-color: rgba(67, 211, 162, 0.22);
  background: rgba(16, 38, 32, 0.55);
}

body[data-theme='dark'] .mychords-add-card-title {
  color: #e9fff7;
}

body[data-theme='dark'] .mychords-add-close {
  border-color: rgba(67, 211, 162, 0.22);
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Editor: campos Título/Artista */
/* ✅ FIX: Limita largura do meta (título/artista) ao container geral (768px) */
.mychords-editor-meta {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 14px;
  border: 1px solid rgba(21, 107, 76, 0.18);
  background: rgba(21, 107, 76, 0.06);
  width: 100%;
  max-width: 768px;
  box-sizing: border-box;
}

.mychords-editor-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mychords-editor-row label {
  font-weight: 700;
  color: #156b4c;
}

.mychords-editor-row input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(255, 255, 255, 0.92);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mychords-editor-error {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(200, 50, 50, 0.1);
  border: 1px solid rgba(200, 50, 50, 0.35);
  color: #b93838;
  font-weight: 700;
  font-size: 13px;
}

.hinario-editor-container.mychords-editor-on .btn-restore-icon {
  display: none;
}

body[data-theme='dark'] .mychords-editor-meta {
  border-color: var(--border-primary);
  background: var(--bg-card);
}

body[data-theme='dark'] .mychords-editor-row label {
  color: var(--text-secondary);
}

body[data-theme='dark'] .mychords-editor-row input {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-primary);
}

body[data-theme='dark'] .mychords-editor-error {
  background: rgba(200, 50, 50, 0.15);
  border-color: rgba(200, 50, 50, 0.35);
  color: #ff9a8f;
}

/* Reader Minhas Cifras */
body.modo-leitura-mychords #hinario-view-tabs,
body.modo-leitura-mychords #hinario-score,
body.modo-leitura-mychords #hinario-cifra-pdf,
body.modo-leitura-mychords #tts-player,
body.modo-leitura-mychords #footer-licenca {
  display: none !important;
}

/* ✅ Esconde apenas o toggle PDF dentro do transpose (não o transpose inteiro) */
body.modo-leitura-mychords #hinario-transpose .hinario-pdf-toggle {
  display: none !important;
}

/* ✅ Minhas Cifras: MOSTRA o footer de controles (com botão editar) */
body.modo-leitura-mychords #hinario-controls-footer {
  display: flex !important;
}

/* Minhas Cifras: não mostrar busca/lista dentro do reader */
body.modo-leitura-mychords #mychords,
body.modo-leitura-mychords #mychords .hinario-top,
body.modo-leitura-mychords #mychords .btn-mychord-delete {
  display: none !important;
}

.mychords-audio-panel {
  margin: 12px 0 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.06);
}

.mychords-audio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mychords-audio-title {
  font-weight: 900;
  color: #156b4c;
}

.mychords-audio-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.08);
  cursor: pointer;
}

.mychords-audio-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

#mychords-audio-input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(255, 255, 255, 0.92);
  flex: 1 1 100%;
  min-width: 160px;
}

.mychords-audio-save,
.mychords-audio-clear,
.mychords-audio-open {
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(21, 107, 76, 0.22);
  background: rgba(21, 107, 76, 0.12);
  cursor: pointer;
  font-weight: 700;
  flex: 1 1 auto;
}

.mychords-audio-msg {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #b93838;
}

.mychords-audio-embed {
  margin-top: 10px;
}

.mychords-audio-frame {
  position: relative;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.mychords-audio-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

body[data-theme='dark'] .mychords-audio-panel {
  border-color: var(--border-primary);
  background: var(--bg-card);
}

body[data-theme='dark'] .mychords-audio-title {
  color: var(--text-primary);
}

body[data-theme='dark'] #mychords-audio-input {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-primary);
}

body[data-theme='dark'] .mychords-audio-save,
body[data-theme='dark'] .mychords-audio-clear,
body[data-theme='dark'] .mychords-audio-close {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ✅ Dark mode: cor da letra na barra de pesquisa */
body[data-theme='dark'] #mychords-search-input {
  color: #eafaf4;
}

body[data-theme='dark'] #mychords-search-input::placeholder {
  color: rgba(234, 250, 244, 0.5);
}

/* ✅ Dark mode: mensagem "nenhuma cifra" */
body[data-theme='dark'] #mychords-empty {
  color: var(--text-muted);
}

/* ✅ Mensagem vazia profissional (com ícone) */
.mychords-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: rgba(0, 0, 0, 0.5);
  gap: 12px;
}

.mychords-empty-title {
  font-size: 1.1em;
  font-weight: 600;
  margin: 0;
  color: rgba(0, 0, 0, 0.7);
}

.mychords-empty-sub {
  font-size: 0.95em;
  margin: 0;
  opacity: 0.8;
}

.mychords-empty strong {
  font-weight: 700;
  color: #156b4c;
}

/* ✅ Dark mode: mensagem vazia */
body[data-theme='dark'] .mychords-empty {
  color: rgba(190, 225, 211, 0.7);
}

body[data-theme='dark'] .mychords-empty-title {
  color: rgba(230, 243, 238, 0.9);
}

body[data-theme='dark'] .mychords-empty-sub {
  color: rgba(190, 225, 211, 0.7);
}

body[data-theme='dark'] .mychords-empty strong {
  color: var(--color-primary);
}

/* ✅ Ações (editar + favorito + excluir) */
.mychord-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mychord-item .btn-mychord-edit {
  border-color: rgba(21, 107, 76, 0.35);
  background: rgba(21, 107, 76, 0.08);
  color: #156b4c;
}

.mychord-item .btn-mychord-edit:hover {
  border-color: rgba(21, 107, 76, 0.6);
  background: rgba(21, 107, 76, 0.12);
}

.mychord-item .btn-mychord-edit i {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  color: #156b4c;
}

body[data-theme='dark'] .mychord-item .btn-mychord-edit {
  border-color: var(--border-primary);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

body[data-theme='dark'] .mychord-item .btn-mychord-edit:hover {
  border-color: var(--border-primary);
  background: var(--bg-card-hover);
}

body[data-theme='dark'] .mychord-item .btn-mychord-edit i {
  color: var(--text-primary);
}

.mychord-item .btn-mychord-delete {
  border-color: rgba(220, 53, 69, 0.35);
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545;
}

.mychord-item .btn-mychord-delete:hover {
  border-color: rgba(220, 53, 69, 0.6);
  background: rgba(220, 53, 69, 0.12);
}

.mychord-item .btn-mychord-delete i {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  color: #dc3545;
}

/* ===============================
   DARK MODE — RESET BUTTONS (Premium)
   Overrides (late in file) to ensure consistency.
=============================== */
body[data-theme='dark'] #btn-confirmar-reset,
body[data-theme='dark'] #btn-reset {
  background: #4a1515;
  color: #fff;
}

body[data-theme='dark'] #btn-confirmar-reset-plano,
body[data-theme='dark'] #btn-reset-plano {
  background: #6a531e;
  color: #fff;
}

body[data-theme='dark'] #btn-confirmar-reset:hover,
body[data-theme='dark'] #btn-reset:hover {
  filter: brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-md);
}

body[data-theme='dark'] #btn-confirmar-reset-plano:hover,
body[data-theme='dark'] #btn-reset-plano:hover {
  filter: brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-md);
}

body[data-theme='dark'] #btn-confirmar-reset:active,
body[data-theme='dark'] #btn-reset:active,
body[data-theme='dark'] #btn-confirmar-reset-plano:active,
body[data-theme='dark'] #btn-reset-plano:active {
  transform: translateY(1px);
  filter: brightness(0.98);
}

body[data-theme='dark'] #btn-confirmar-reset:focus-visible,
body[data-theme='dark'] #btn-reset:focus-visible,
body[data-theme='dark'] #btn-confirmar-reset-plano:focus-visible,
body[data-theme='dark'] #btn-reset-plano:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.14), var(--shadow-sm);
}
