@font-face { 
    font-family: 'Galatia SIL'; 
    src: url('../GalatiaSIL.ttf') format('truetype'); 
}

/* ==========================================================================
   ESCUDO DE PROTEÇÃO UNIVERSAL CONTRA ERROS DO AFFINITY PUBLISHER
   ========================================================================== */
span[id^="PageRef"],
[role="doc-pagebreak"],
[epub\:type="pagebreak"] {
    display: inline !important;
    position: static !important;
    float: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

:root, body[data-theme="light"] { 
    --bg-color: #f9f9f9; 
    --text-color: #2c2c2c; 
    --accent-color: #8b0000; 
    --note-bg: #ffffff; 
    --note-text: #333333; 
    --tag-critica: #8b0000; 
    --tag-hist: #b8860b; 
    --tag-coment: #282121; 
    --tag-citacao: #282121; 
    --cita-color: #666666; 
    --btn-bg: #e5e5e5; 
    --btn-icon: #2c2c2c; 
    --texto-disputado: #7a7a7a; 
}

body[data-theme="sepia"] { 
    --bg-color: #f4ecd8; 
    --text-color: #433422; 
    --accent-color: #4a4a4a; 
    --note-bg: #fdf6e3; 
    --note-text: #433422; 
    --tag-coment: #433422; 
    --tag-citacao: #433422; 
    --cita-color: #7b6a58; 
    --btn-bg: #e4d7bd; 
    --btn-icon: #433422; 
    --texto-disputado: #8a7b6a; 
}

body[data-theme="dark"] { 
    --bg-color: #282121; 
    --text-color: #e4e0d9; 
    --accent-color: #ff7b7b; 
    --note-bg: #3a3131; 
    --note-text: #e4e0d9; 
    --tag-coment: #1a1515; 
    --tag-citacao: #1a1515; 
    --cita-color: #b0a8a8; 
    --btn-bg: #403636; 
    --btn-icon: #e4e0d9; 
    --texto-disputado: #999999; 
}

body { 
    font-family: 'Georgia', serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    line-height: 1.85; 
    padding: 20px; 
    max-width: 700px; 
    margin: 0 auto; 
    padding-bottom: 60px; 
    transition: background-color 0.4s ease, color 0.4s ease; 
}

img { display: none !important; }

.disputado { color: var(--texto-disputado); }
.Variante { color: var(--texto-disputado); text-decoration: line-through; }
[class*="versalete" i], [class*="smallcaps" i], [class*="manuscritos" i], [class*="versa" i] { 
    font-variant: small-caps; 
    text-transform: lowercase; 
    letter-spacing: 0.5px; 
}
.tachado, s, strike, del { text-decoration: line-through; }

/* ESTILOS VINDO DO AFFINITY PUBLISHER */
b, strong, .negrito, .bold { font-weight: bold; }
i, em, .italico { font-style: italic; }
.bold-italico { font-weight: bold; font-style: italic; }
u, .sublinhado { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.italico-sublinhado { font-style: italic; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bold-italico-sublinhado { font-weight: bold; font-style: italic; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.versa-bold { text-transform: lowercase; font-variant: small-caps; letter-spacing: 0.5px; font-weight: bold; }

sup { font-size: 0.7em; line-height: 0; position: relative; vertical-align: baseline; top: -0.5em; }

header { text-align: center; margin-bottom: 30px; border-bottom: 1px solid var(--btn-bg); padding-bottom: 25px; }
.logo-pequena { font-family: 'Arial', sans-serif; letter-spacing: 2px; font-size: 0.8em; opacity: 0.6; text-transform: uppercase; margin-bottom: 20px; }
h2 { font-size: 1.1em; font-weight: normal; opacity: 0.8; margin: 0; }
h1 { font-family: 'Georgia', serif; color: var(--accent-color); font-size: 2.2em; margin-top: 5px; margin-bottom: 20px; font-weight: normal; }
.seletor-capitulo { padding: 8px 15px; font-size: 1em; font-family: 'Georgia', serif; background-color: var(--bg-color); color: var(--text-color); border: 2px solid var(--btn-bg); border-radius: 8px; outline: none; cursor: pointer; }
.theme-switcher { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; }
.btn-theme { width: 42px; height: 42px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0.5; background-color: var(--btn-bg); color: var(--btn-icon); }
.btn-theme.active, .btn-theme:hover { opacity: 1; transform: scale(1.1); border-color: var(--accent-color); }

.texto { margin-bottom: 15px; font-size: 1.15em; }
.numero-versiculo, [class^="dropCap_"] { font-size: 0.8em; font-weight: bold; vertical-align: super; opacity: 0.7; cursor: pointer; transition: all 0.4s ease; display: inline-block; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; margin: 0 1px; }
.numero-versiculo:hover, [class^="dropCap_"]:hover { opacity: 1; color: #fff; background-color: var(--accent-color); }
.nota-link { font-size: 0.65em; vertical-align: super; color: var(--accent-color); cursor: pointer; text-decoration: underline; font-family: sans-serif; margin-left: 2px; font-weight: bold; }
[class*="grego" i] { font-family: 'Galatia SIL', serif !important; font-size: 1em; }
.hebraico { font-weight: bold; }

.TitleHead { font-family: 'Georgia', serif; font-size: 2.4em; color: var(--accent-color); text-align: center; margin-top: 20px; margin-bottom: 5px; font-weight: normal; line-height: 1.2; }
.TitleHead + p, .TitleHead + div, .TitleHead + h1, .TitleHead + h2, .TitleHead + h3, .TitleHead + span { font-family: 'Arial', sans-serif !important; font-size: 0.85em !important; font-weight: bold !important; text-align: center; opacity: 0.6; margin-top: 0px !important; margin-bottom: 40px !important; text-transform: uppercase; letter-spacing: 2px; }
.titulo-incorporado, .titulo-da-introducao { font-size: 1.3em; font-weight: bold; color: var(--accent-color); margin-top: 35px; margin-bottom: 15px; text-align: center; }
.secao-introducao .titulo-da-introducao:first-child { margin-top: 5px; }
.cita__o-b_blica { margin-left: 2rem; margin-right: 1rem; font-style: italic; color: var(--cita-color); line-height: 1.65; }
.texto-oracao { margin-left: 2rem; margin-right: 1rem; line-height: 1.65; }

.btn-intro { display: block; width: 100%; max-width: 400px; margin: 0 auto 25px auto; background-color: var(--accent-color); color: #fff; border: none; padding: 12px 20px; border-radius: 8px; font-family: 'Georgia', serif; font-size: 1.1em; cursor: pointer; transition: opacity 0.3s; }
.btn-intro:hover { opacity: 0.8; }
.secao-introducao { background-color: var(--note-bg); padding: 20px; border-radius: 10px; margin-bottom: 30px; font-size: 0.98em; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: left; }
.nav-fim-capitulo { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--btn-bg); }
.btn-nav-cap { background-color: var(--btn-bg); color: var(--text-color); text-decoration: none; border: none; padding: 10px 20px; border-radius: 8px; font-family: 'Georgia', serif; font-size: 1em; cursor: pointer; transition: opacity 0.3s; }
.btn-nav-cap:hover { opacity: 0.8; }

.backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); opacity: 0; visibility: hidden; transition: opacity 0.3s ease; z-index: 999; }
.backdrop.show { opacity: 1; visibility: visible; }
.bottom-sheet { position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 100%); width: 100%; max-width: 700px; background: var(--note-bg); color: var(--note-text); padding: 25px 20px 40px; border-radius: 20px 20px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,0.4); transition: transform 0.35s ease-out; z-index: 1000; box-sizing: border-box; touch-action: none; }
.bottom-sheet.show { transform: translate(-50%, 0); }
.bottom-sheet.dragging { transition: none !important; }
.linha-puxador { width: 40px; height: 5px; background: #888; border-radius: 10px; margin: 0 auto 15px auto; opacity: 0.5; cursor: grab; }
.header-nota { display: flex; align-items: center; gap: 15px; margin-bottom: 12px; }
.fechar { position: absolute; top: 15px; right: 20px; cursor: pointer; font-weight: bold; font-size: 1.5em; opacity: 0.6; }

/* RÓTULO / TAG DA NOTA DE RODAPÉ (SANS-SERIF LEVE) */
.tag-nota { 
    font-family: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    display: inline-block; 
    color: white; 
    padding: 4px 14px; 
    border-radius: 50px; 
    font-size: 0.72em; 
    text-transform: uppercase; 
    letter-spacing: 0.08em; 
}

.btn-share { background: none; border: none; color: var(--note-text); opacity: 0.5; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; transition: opacity 0.2s, color 0.2s; }
.btn-share:hover { opacity: 1; color: var(--accent-color); transform: scale(1.1); }
.texto-nota { font-size: 1.05em; line-height: 1.65; max-height: 60vh; overflow-y: auto; padding-right: 5px; touch-action: pan-y; }
.texto-nota * { font-family: inherit; } 
#toast { visibility: hidden; min-width: 250px; background-color: var(--accent-color); color: #fff; text-align: center; border-radius: 8px; padding: 12px; position: fixed; z-index: 1001; left: 50%; bottom: 30px; transform: translateX(-50%); font-family: 'Georgia', serif; font-size: 1em; opacity: 0; transition: opacity 0.3s, bottom 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
#toast.show { visibility: visible; opacity: 1; bottom: 50px; }