/* Bíblia Master — estilos. Paleta de biblioteca teológica: azul-marinho, dourado discreto, papel e neutros. */

:root {
  --marinho: #14213d;
  --marinho-2: #1f3060;
  --dourado: #7a5c14;        /* dourado escurecido: contraste AA sobre papel e realces */
  --dourado-claro: #c9a54e;
  --papel: #fbf9f4;
  --superficie: #ffffff;
  --superficie-2: #f2efe7;
  --linha: #ddd7c9;
  --tinta: #1d2430;
  --tinta-2: #4a5263;        /* texto secundário, 7:1 sobre o papel */
  --foco: #1a5fd0;
  --perigo: #a3261f;
  --sucesso: #1e6b3a;
  --sombra: 0 1px 2px rgb(20 33 61 / .08), 0 4px 16px rgb(20 33 61 / .08);

  --d-amarelo: #f8e9a0; --d-verde: #cdeacb; --d-azul: #cde0f5; --d-rosa: #f5d3e1; --d-laranja: #f9d9b6;

  --fonte-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fonte-leitura: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --tam-texto: 19px;
  --entrelinha: 1.7;
  --largura-lateral: 232px;
  --largura-painel: 380px;
  --raio: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --marinho: #0e1729; --marinho-2: #1b2a4d; --dourado: #d8b65f; --dourado-claro: #e3c47b;
    --papel: #11161f; --superficie: #171e2b; --superficie-2: #1e2738; --linha: #2c3850;
    --tinta: #e9e5db; --tinta-2: #b4bccb; --foco: #7fb0ff; --perigo: #ff8a80; --sucesso: #7dd39a;
    --sombra: 0 1px 2px rgb(0 0 0 / .4), 0 4px 16px rgb(0 0 0 / .35);
    --d-amarelo: #5b4f1b; --d-verde: #22472a; --d-azul: #1f3a5c; --d-rosa: #552a3d; --d-laranja: #5c3a1c;
    color-scheme: dark;
  }
}
:root[data-tema="escuro"] {
  --marinho: #0e1729; --marinho-2: #1b2a4d; --dourado: #d8b65f; --dourado-claro: #e3c47b;
  --papel: #11161f; --superficie: #171e2b; --superficie-2: #1e2738; --linha: #2c3850;
  --tinta: #e9e5db; --tinta-2: #b4bccb; --foco: #7fb0ff; --perigo: #ff8a80; --sucesso: #7dd39a;
  --sombra: 0 1px 2px rgb(0 0 0 / .4), 0 4px 16px rgb(0 0 0 / .35);
  --d-amarelo: #5b4f1b; --d-verde: #22472a; --d-azul: #1f3a5c; --d-rosa: #552a3d; --d-laranja: #5c3a1c;
  color-scheme: dark;
}
:root[data-fonte="sem_serifa"] { --fonte-leitura: var(--fonte-ui); }
:root[data-espacamento="compacto"] { --entrelinha: 1.5; }
:root[data-espacamento="amplo"] { --entrelinha: 2; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papel); color: var(--tinta);
  font: 16px/1.5 var(--fonte-ui); min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--fonte-leitura); font-weight: 600; line-height: 1.25; color: var(--tinta); }
h1 { font-size: 1.75rem; margin: 0 0 .75rem; }
h2 { font-size: 1.3rem; margin: 1.5rem 0 .6rem; }
h3 { font-size: 1.08rem; margin: 1rem 0 .4rem; }
a { color: var(--marinho-2); text-underline-offset: 2px; }
:root[data-tema="escuro"] a { color: #9cc0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) a { color: #9cc0ff; } }
p { margin: .5rem 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.oculto, [hidden] { display: none !important; }
.sprite { display: none; }
svg { width: 1.25em; height: 1.25em; flex: none; }

.pular { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--superficie); padding: .5rem 1rem; border-radius: var(--raio); }
.pular:focus { left: 8px; }

/* ---------- topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .5rem;
  height: 56px; padding: 0 .75rem; background: var(--marinho); color: #f4efe2;
  border-bottom: 2px solid var(--dourado-claro);
}
.marca { display: flex; align-items: center; gap: .5rem; color: #f4efe2 !important; text-decoration: none; font-family: var(--fonte-leitura); font-size: 1.15rem; font-weight: 600; white-space: nowrap; }
.marca-icone { color: var(--dourado-claro); width: 1.5em; height: 1.5em; }
.busca-topo { flex: 1; max-width: 520px; margin-left: auto; }
.busca-topo input[type="search"] {
  width: 100%; height: 38px; border-radius: 19px; border: 1px solid rgb(255 255 255 / .25);
  background: rgb(255 255 255 / .1); color: #fff; padding: 0 1rem;
}
.busca-topo input[type="search"]::placeholder { color: rgb(255 255 255 / .75); }
#abrir-busca { display: none; }
.botao-icone {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px;
  border: 0; background: transparent; color: inherit; border-radius: 22px; cursor: pointer; padding: 0 .5rem; gap: .35rem;
}
.botao-icone:hover { background: rgb(127 127 127 / .14); }
.topo .botao-icone { color: #f4efe2; }

/* ---------- estrutura ---------- */
.estrutura { display: grid; grid-template-columns: var(--largura-lateral) minmax(0, 1fr); min-height: calc(100vh - 56px); }
.estrutura.com-painel { grid-template-columns: var(--largura-lateral) minmax(0, 1fr) var(--largura-painel); }
.lateral {
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; padding: 1rem .5rem;
  border-right: 1px solid var(--linha); background: var(--superficie-2);
}
.lateral ul { list-style: none; margin: 0; padding: 0; }
.lateral .secundaria { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--linha); }
.lateral a, .lateral .link {
  display: flex; align-items: center; gap: .65rem; width: 100%; min-height: 42px; padding: .4rem .75rem;
  border-radius: 8px; color: var(--tinta) !important; text-decoration: none; border: 0; background: none; cursor: pointer; text-align: left;
}
.lateral a:hover, .lateral .link:hover { background: rgb(127 127 127 / .12); }
.lateral a[aria-current="page"] { background: var(--marinho); color: #f4efe2 !important; }
.lateral a[aria-current="page"] svg { color: var(--dourado-claro); }
:root[data-tema="escuro"] .lateral a[aria-current="page"], :root[data-tema="escuro"] .avisos > div:not(.erro) { background: #2d4373; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .lateral a[aria-current="page"], :root:not([data-tema="claro"]) .avisos > div:not(.erro) { background: #2d4373; } }

main { padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 5rem; min-width: 0; outline: none; }
.largura-leitura { max-width: 46rem; margin: 0 auto; }
.largura-larga { max-width: 72rem; margin: 0 auto; }
.carregando { color: var(--tinta-2); }

/* ---------- painel contextual ---------- */
.painel {
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; background: var(--superficie);
  border-left: 1px solid var(--linha); display: flex; flex-direction: column;
}
.painel-cabeca { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .5rem .5rem 1rem; border-bottom: 1px solid var(--linha); position: sticky; top: 0; background: var(--superficie); z-index: 1; }
.painel-cabeca h2 { margin: 0; font-size: 1.1rem; }
.painel-corpo { padding: 1rem; }

/* ---------- componentes ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .5rem 1rem;
  border-radius: 8px; border: 1px solid var(--linha); background: var(--superficie); color: var(--tinta); cursor: pointer; text-decoration: none; font-weight: 500;
}
.botao:hover { border-color: var(--tinta-2); }
.botao.primario { background: var(--marinho); border-color: var(--marinho); color: #f4efe2; }
.botao.primario:hover { background: var(--marinho-2); }
.botao.perigo { color: var(--perigo); border-color: currentColor; background: transparent; }
.botao.pequeno { min-height: 36px; padding: .3rem .7rem; font-size: .92rem; }
.botao[disabled] { opacity: .55; cursor: not-allowed; }
.botao[aria-pressed="true"] { background: var(--marinho); color: #f4efe2; border-color: var(--marinho); }
.cartao { overflow-wrap: anywhere; background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem 1.15rem; box-shadow: var(--sombra); min-width: 0; }
.cartao h2, .cartao h3 { margin-top: 0; }
.grade { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.linha-botoes { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.discreto { color: var(--tinta-2); font-size: .92rem; }
.vazio { color: var(--tinta-2); font-style: italic; }
.aviso { border-left: 4px solid var(--dourado); background: var(--superficie-2); padding: .65rem .9rem; border-radius: 6px; margin: .75rem 0; }
.aviso.erro { border-color: var(--perigo); }
.selo {
  display: inline-flex; align-items: center; gap: .3rem; font: 600 .72rem/1 var(--fonte-ui); letter-spacing: .03em; text-transform: uppercase;
  padding: .3rem .5rem; border-radius: 999px; border: 1px solid var(--linha); color: var(--tinta-2); background: var(--superficie-2); white-space: nowrap;
}
.selo.texto_biblico { color: var(--marinho-2); border-color: currentColor; }
.selo.referencia_cruzada { color: #6a3e9c; border-color: currentColor; }
.selo.anotacao_pessoal { color: var(--sucesso); border-color: currentColor; }
.selo.pendente { color: var(--dourado); border-color: currentColor; background: transparent; }
:root[data-tema="escuro"] .selo.texto_biblico, :root[data-tema="escuro"] .selo.referencia_cruzada { color: #9cc0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .selo.texto_biblico, :root:not([data-tema="claro"]) .selo.referencia_cruzada { color: #b7a3ff; } }
.selo.sigla { text-transform: none; letter-spacing: 0; color: var(--tinta); }

label { display: block; font-weight: 600; margin: .75rem 0 .3rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--linha); border-radius: 8px; background: var(--superficie);
}
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
.campo-dica { font-size: .88rem; color: var(--tinta-2); margin: .25rem 0 0; }
fieldset { border: 1px solid var(--linha); border-radius: var(--raio); padding: .75rem 1rem 1rem; margin: 1rem 0; min-width: 0; }
legend { font-weight: 600; padding: 0 .35rem; }
.opcoes-radio { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.opcoes-radio label { font-weight: 400; display: flex; align-items: center; gap: .4rem; margin: 0; min-height: 36px; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--marinho-2); }
input[type="range"] { width: 100%; accent-color: var(--marinho-2); }

/* ---------- painel inicial ---------- */
.busca-destaque { background: var(--marinho); color: #f4efe2; border-radius: var(--raio); padding: 1.25rem; margin-bottom: 1rem; }
.busca-destaque h1 { color: #f4efe2; margin-bottom: .5rem; }
.busca-destaque form { display: flex; gap: .5rem; flex-wrap: wrap; }
.busca-destaque input { flex: 1 1 14rem; background: #fff; color: #1d2430; border: 0; }
.busca-destaque .botao { background: var(--dourado-claro); color: #14213d; border: 0; }
.busca-destaque .discreto { color: rgb(244 239 226 / .85); margin-top: .6rem; }
.verso-dia blockquote { font-family: var(--fonte-leitura); font-size: 1.15rem; line-height: 1.6; margin: .5rem 0; padding-left: 1rem; border-left: 3px solid var(--dourado); }
.lista-simples { list-style: none; margin: 0; padding: 0; }
.lista-simples li { padding: .55rem 0; border-bottom: 1px solid var(--linha); }
.lista-simples li:last-child { border-bottom: 0; }
.lista-simples .trecho { font-family: var(--fonte-leitura); color: var(--tinta-2); display: block; overflow-wrap: anywhere; }
.livros-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: .35rem; }
.livros-grade a { display: block; padding: .5rem .6rem; border-radius: 6px; text-decoration: none; color: var(--tinta) !important; border: 1px solid var(--linha); background: var(--superficie); min-height: 44px; }
.livros-grade a:hover { border-color: var(--dourado); }
.categoria-titulo { font: 600 .8rem var(--fonte-ui); text-transform: uppercase; letter-spacing: .05em; color: var(--tinta-2); margin: 1rem 0 .4rem; }

/* ---------- leitor ---------- */
.leitor-barra {
  position: sticky; top: 56px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  background: var(--papel); padding: .5rem 0; border-bottom: 1px solid var(--linha); margin-bottom: 1rem;
}
.leitor-barra .seletor { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.leitor-barra select { width: auto; min-width: 0; max-width: 11rem; }
.leitor-barra .espaco { flex: 1; }
.traducoes { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: .15rem; border: 1px solid var(--linha); border-radius: 999px; padding: 0 0 0 .7rem; background: var(--superficie); min-height: 36px; font-weight: 600; font-size: .9rem; }
.chip button { border: 0; background: none; min-width: 36px; height: 36px; border-radius: 18px; cursor: pointer; color: var(--tinta-2); display: inline-flex; align-items: center; justify-content: center; }
.chip button:hover { background: rgb(127 127 127 / .15); }
.chip svg { width: 1rem; height: 1rem; }
.chip.unico { padding-right: .7rem; }
.titulo-capitulo { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; }
.titulo-capitulo h1 { margin: 0; }
.creditos-capitulo { font-size: .85rem; color: var(--tinta-2); margin: .25rem 0 1.25rem; }
.creditos-capitulo span { display: block; }

.versos { font-family: var(--fonte-leitura); font-size: var(--tam-texto); line-height: var(--entrelinha); }
.verso {
  display: grid; grid-template-columns: repeat(var(--colunas, 1), minmax(0, 1fr)); gap: 1.25rem;
  padding: .15rem .4rem; margin: 0 -.4rem; border-radius: 6px; cursor: pointer; position: relative;
}
.verso:hover { background: rgb(127 127 127 / .07); }
.verso.selecionado { outline: 2px solid var(--dourado); outline-offset: -1px; }
.verso .col { min-width: 0; overflow-wrap: anywhere; }
.verso .num, .link-num {
  font: 700 .66em/1 var(--fonte-ui); color: var(--dourado); user-select: none; border: 0; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 0 .2em; margin-right: .15em;
  vertical-align: .15em; border-radius: 4px;
}
.link-num:hover { background: rgb(127 127 127 / .15); }
.pre { white-space: pre-wrap; }
.verso .sigla-verso { display: none; font: 700 .68rem var(--fonte-ui); color: var(--tinta-2); margin-right: .35rem; }
.verso .ausente { font-family: var(--fonte-ui); font-size: .85em; color: var(--tinta-2); font-style: italic; }
.verso .marcas { position: absolute; right: .25rem; top: .3rem; display: flex; gap: .15rem; color: var(--dourado); }
.verso .marcas svg { width: .85rem; height: .85rem; }
.verso.tem-marca .col:last-child { padding-right: 1.6rem; }
.cabecalho-colunas { display: grid; grid-template-columns: repeat(var(--colunas, 1), minmax(0, 1fr)); gap: 1.25rem; font: 700 .8rem var(--fonte-ui); color: var(--tinta-2); text-transform: uppercase; letter-spacing: .04em; padding: 0 .4rem; margin: 0 -.4rem .5rem; }
:root[data-numeros="nao"] .verso .num { display: none; }
.d-amarelo { background: var(--d-amarelo) !important; } .d-verde { background: var(--d-verde) !important; } .d-azul { background: var(--d-azul) !important; }
.d-rosa { background: var(--d-rosa) !important; } .d-laranja { background: var(--d-laranja) !important; }
.navegacao-capitulo { display: flex; justify-content: space-between; gap: .5rem; margin-top: 2rem; flex-wrap: wrap; }

/* modo sem distrações */
body.foco .lateral, body.foco .topo, body.foco .inferior, body.foco .leitor-barra .so-normal { display: none !important; }
body.foco .estrutura { grid-template-columns: minmax(0, 1fr) !important; }
body.foco .leitor-barra { top: 0; }
body.foco main { padding-top: .5rem; }

/* ações do versículo */
.cores { display: flex; gap: .4rem; flex-wrap: wrap; }
.cor { width: 44px; height: 44px; border-radius: 22px; border: 2px solid var(--linha); cursor: pointer; }
.cor[aria-pressed="true"] { border-color: var(--tinta); box-shadow: 0 0 0 2px var(--superficie) inset; }
.anotacao { border: 1px solid var(--linha); border-radius: 8px; padding: .6rem .75rem; margin: .5rem 0; background: var(--superficie-2); }
.anotacao p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 .4rem; }
.ref-item { border-bottom: 1px solid var(--linha); padding: .65rem 0; }
.ref-item a { font-weight: 600; }
.ref-item .trecho { font-family: var(--fonte-leitura); margin: .25rem 0; overflow-wrap: anywhere; }
.medidor { display: inline-flex; gap: 2px; vertical-align: middle; }
.medidor i { width: 6px; height: 12px; border-radius: 2px; background: var(--linha); }
.medidor i.on { background: var(--dourado); }

/* ---------- busca ---------- */
.form-busca { display: grid; gap: .5rem; }
.form-busca .linha { display: flex; gap: .5rem; flex-wrap: wrap; }
.form-busca .linha input { flex: 1 1 14rem; }
.filtros { display: grid; gap: .5rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.filtros label { margin: 0 0 .2rem; font-size: .88rem; }
.resultado { padding: .85rem 0; border-bottom: 1px solid var(--linha); }
.resultado .cab { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.resultado .cab a { font-weight: 600; }
.resultado .texto { font-family: var(--fonte-leitura); font-size: 1.05rem; margin: .3rem 0; overflow-wrap: anywhere; }
.resultado .contexto { font-family: var(--fonte-leitura); color: var(--tinta-2); font-size: .95rem; overflow-wrap: anywhere; }
.resultado .contexto .num { font: 700 .7em var(--fonte-ui); color: var(--dourado); margin-right: .2em; }
mark { background: var(--d-amarelo); color: inherit; padding: 0 .1em; border-radius: 2px; }
.paginacao { display: flex; justify-content: center; align-items: center; gap: .75rem; margin: 1.5rem 0; flex-wrap: wrap; }
.passagem { font-family: var(--fonte-leitura); line-height: 1.65; }
.passagem .num { font: 700 .65em var(--fonte-ui); color: var(--dourado); vertical-align: super; margin-right: .2em; }

/* ---------- tabelas de crédito / admin ---------- */
.fonte-card + .fonte-card { margin-top: 1rem; }
.fonte-card dl { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .3rem 1rem; margin: .5rem 0; }
.fonte-card dt { color: var(--tinta-2); font-size: .9rem; }
.fonte-card dd { margin: 0; overflow-wrap: anywhere; }
.permissoes { display: flex; flex-wrap: wrap; gap: .35rem; }
.permissoes .sim { color: var(--sucesso); border-color: currentColor; }
.permissoes .nao { color: var(--perigo); border-color: currentColor; }
.tabela-rolagem { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--linha); vertical-align: top; overflow-wrap: anywhere; }
progress { width: 100%; height: 12px; accent-color: var(--marinho-2); }

/* ---------- avisos ---------- */
.avisos { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 60; display: grid; gap: .5rem; width: min(92vw, 28rem); pointer-events: none; }
.avisos > div { background: var(--marinho); color: #f4efe2; padding: .75rem 1rem; border-radius: 8px; box-shadow: var(--sombra); pointer-events: auto; display: flex; gap: .75rem; align-items: center; justify-content: space-between; }
.avisos > div.erro { background: var(--perigo); color: #fff; }
.avisos button { background: none; border: 1px solid currentColor; color: inherit; border-radius: 6px; min-height: 36px; padding: 0 .75rem; cursor: pointer; }
.rede-aviso { position: fixed; top: 56px; left: 0; right: 0; z-index: 25; background: var(--dourado-claro); color: #14213d; text-align: center; padding: .35rem 1rem; font-size: .9rem; }

dialog { border: 1px solid var(--linha); border-radius: var(--raio); background: var(--superficie); color: var(--tinta); padding: 0; width: min(92vw, 34rem); max-height: 85vh; box-shadow: var(--sombra); }
dialog::backdrop { background: rgb(10 15 25 / .55); }
.dialogo-cabeca { display: flex; justify-content: space-between; align-items: center; padding: .5rem .5rem .5rem 1rem; border-bottom: 1px solid var(--linha); }
.dialogo-cabeca h2 { margin: 0; font-size: 1.1rem; }
#dialogo-corpo { padding: 1rem; overflow-y: auto; }
kbd { font: 600 .85rem var(--fonte-ui); border: 1px solid var(--linha); border-bottom-width: 2px; border-radius: 4px; padding: .1rem .4rem; background: var(--superficie-2); }
.atalhos-lista { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; align-items: center; margin: 0; }
.atalhos-lista dd { margin: 0; }

.inferior { display: none; }
.so-celular { display: none !important; }

/* ---------- celular e tablet ---------- */
@media (max-width: 1100px) {
  .estrutura.com-painel { grid-template-columns: var(--largura-lateral) minmax(0, 1fr); }
  .estrutura.com-painel .painel {
    position: fixed; right: 0; top: 56px; bottom: 0; width: min(var(--largura-painel), 92vw); z-index: 40; box-shadow: var(--sombra); height: auto;
  }
}
@media (max-width: 860px) {
  .so-celular { display: inline-flex !important; }
  .busca-topo { display: none; }
  #abrir-busca { display: inline-flex; margin-left: auto; }
  .estrutura, .estrutura.com-painel { grid-template-columns: minmax(0, 1fr); }
  .lateral {
    position: fixed; z-index: 45; top: 56px; left: 0; bottom: 0; height: auto; width: min(84vw, 300px);
    transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--sombra);
  }
  .lateral.aberta { transform: none; }
  .estrutura.com-painel .painel, .painel {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; height: auto; max-height: 78vh; z-index: 50;
    border-left: 0; border-top: 2px solid var(--dourado-claro); border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgb(0 0 0 / .25);
  }
  .inferior {
    display: flex !important; position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: var(--superficie); border-top: 1px solid var(--linha); justify-content: space-around;
  }
  .inferior a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; color: var(--tinta-2) !important; text-decoration: none; min-width: 0; }
  .inferior a[aria-current="page"] { color: var(--marinho-2) !important; font-weight: 700; }
  :root[data-tema="escuro"] .inferior a[aria-current="page"] { color: var(--dourado) !important; }
  @media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .inferior a[aria-current="page"] { color: var(--dourado) !important; } }
  main { padding: 1rem 1rem calc(80px + env(safe-area-inset-bottom)); }
  .leitor-barra { position: static; margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
  .leitor-barra .seletor select { max-width: 9.5rem; }
  .avisos { bottom: calc(72px + env(safe-area-inset-bottom)); }
  /* paralelo empilhado: uma tradução abaixo da outra, com a sigla visível */
  .verso { grid-template-columns: minmax(0, 1fr); gap: .2rem; padding-top: .35rem; padding-bottom: .35rem; }
  .verso.paralelo .sigla-verso { display: inline; }
  .verso.paralelo { border-bottom: 1px solid var(--linha); border-radius: 0; }
  .cabecalho-colunas { display: none; }
  .fonte-card dl { grid-template-columns: minmax(0, 1fr); }
  .fonte-card dd { margin-bottom: .4rem; }
  h1 { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .topo, .lateral, .inferior, .painel, .leitor-barra, .avisos, .navegacao-capitulo { display: none !important; }
  .estrutura { display: block; } body { background: #fff; color: #000; }
}

/* ---------- Fase 2: texto original, léxico, concordância, roteiro ---------- */
:root { --fonte-grego: "Gentium Plus", "SBL Greek", "Noto Serif", "Palatino Linotype", "Times New Roman", serif;
        --fonte-hebraico: "SBL Hebrew", "Ezra SIL", "Noto Serif Hebrew", "Taamey Frank CLM", "Times New Roman", serif; }
[lang="grc"] { font-family: var(--fonte-grego); }
[lang="hbo"] { font-family: var(--fonte-hebraico); }
.rotulo-curto { margin-left: .35rem; }
.interlinear { display: flex; flex-wrap: wrap; gap: .35rem; grid-column: 1 / -1; margin: .35rem 0 .6rem; padding: .4rem 0 .2rem; border-top: 1px dashed var(--linha); }
.interlinear[dir="rtl"] { flex-direction: row; }
.palavra-orig {
  display: inline-flex; flex-direction: column; align-items: center; gap: .05rem; min-width: 44px; min-height: 44px; padding: .25rem .4rem;
  border: 1px solid var(--linha); border-radius: 6px; background: var(--superficie); color: var(--tinta); cursor: pointer; font: inherit; line-height: 1.2;
}
.palavra-orig:hover { border-color: var(--dourado); }
.palavra-orig.tem-variante { border-style: dashed; border-color: var(--dourado); }
.po-texto { font-size: 1.15em; }
.interlinear[lang="hbo"] .po-texto { font-family: var(--fonte-hebraico); font-size: 1.3em; direction: rtl; }
.interlinear[lang="grc"] .po-texto { font-family: var(--fonte-grego); }
.po-var { color: var(--dourado); font-size: .6em; margin-left: .15em; vertical-align: super; }
.po-translit, .po-glosa, .po-strong { font: .68rem/1.25 var(--fonte-ui); color: var(--tinta-2); direction: ltr; text-align: center; }
.po-glosa { color: var(--tinta); font-style: italic; }
.verso.titulo-salmo { cursor: default; }
.interlinear-credito { margin-top: 1rem; }
.palavra-grande { font-size: 2rem; line-height: 1.3; margin: .25rem 0; }
.ficha { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: .25rem .75rem; margin: .5rem 0; }
.ficha dt { color: var(--tinta-2); font-size: .9rem; }
.ficha dd { margin: 0; overflow-wrap: anywhere; }
.definicao { font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; border-left: 3px solid var(--linha); padding-left: .75rem; }
.chips-livros { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 1rem; }
.chip-livro { border: 1px solid var(--linha); border-radius: 999px; padding: .2rem .6rem; font-size: .85rem; background: var(--superficie); color: var(--tinta) !important; text-decoration: none; }
a.chip-livro { min-height: 32px; display: inline-flex; align-items: center; }
.ocorrencias li { overflow-wrap: anywhere; }
.contexto .debate { border-left: 4px solid var(--dourado); background: var(--superficie-2); padding: .35rem .8rem; border-radius: 6px; margin: .5rem 0; }
.contexto h3 { font-size: .95rem; font-family: var(--fonte-ui); text-transform: uppercase; letter-spacing: .04em; color: var(--tinta-2); margin-top: .9rem; }
.selo.dado_lexical { color: #8a4b08; border-color: currentColor; }
.selo.interpretacao_academica { color: #5b3d8a; border-color: currentColor; }
:root[data-tema="escuro"] .selo.dado_lexical { color: #f0b46a; } :root[data-tema="escuro"] .selo.interpretacao_academica { color: #c5a8f0; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .selo.dado_lexical { color: #f0b46a; } :root:not([data-tema="claro"]) .selo.interpretacao_academica { color: #c5a8f0; } }
.etapa textarea { min-height: 10rem; }
.perguntas { margin: .25rem 0 .5rem 1.1rem; padding: 0; color: var(--tinta-2); }
.perguntas li { margin: .2rem 0; }
.variante-item { border-bottom: 1px solid var(--linha); padding: .4rem 0; }
.comparar-item { border-bottom: 1px solid var(--linha); padding: .3rem 0; }
@media (max-width: 860px) {
  .rotulo-curto { display: none; }
  .ficha { grid-template-columns: minmax(0, 1fr); }
  .palavra-orig { min-width: 40px; }
}
.palavra-orig { max-width: 100%; }
.po-strong, .po-glosa, .po-translit { overflow-wrap: anywhere; white-space: normal; max-width: 9rem; }
.botao.ativo { background: var(--marinho); color: #f4efe2; border-color: var(--marinho); }

/* ---------- Fase 3: sermões, EBD, planos, diário, assistente ---------- */
.lateral-titulo { font: 600 .72rem var(--fonte-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); margin: 1rem .75rem .3rem; }
.selo.gerado_ia { color: #8c2f39; border-color: currentColor; }
.selo.tradicao_denominacional { color: #24557a; border-color: currentColor; }
.selo.aplicacao_pastoral, .selo.conteudo_autor { color: var(--sucesso); border-color: currentColor; }
:root[data-tema="escuro"] .selo.gerado_ia { color: #ff9aa5; } :root[data-tema="escuro"] .selo.tradicao_denominacional { color: #8cc4ef; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .selo.gerado_ia { color: #ff9aa5; } :root:not([data-tema="claro"]) .selo.tradicao_denominacional { color: #8cc4ef; } }

.campo { min-width: 0; }
.campo label { margin-top: .6rem; }
.campo.sem-rotulo > label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linha-campos { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; }
.linha-campos > * { flex: 1 1 12rem; min-width: 0; }
.linha-campos > .botao, .linha-campos > button { flex: 0 0 auto; }
.linha-campos select { width: 100%; }
input.curto, .curto input { max-width: 9rem; }
input[type="number"], input[type="date"], input[type="time"] { width: 100%; min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--linha); border-radius: 8px; background: var(--superficie); }
.rotulo-campo { font-weight: 600; margin: .9rem 0 .3rem; }

.editor-documento .titulo-documento { font: 600 1.6rem/1.25 var(--fonte-leitura); border: 0; border-bottom: 2px solid var(--linha); border-radius: 0; background: transparent; padding: .25rem 0; min-height: 48px; width: 100%; }
.editor-documento .titulo-documento:focus-visible { border-bottom-color: var(--foco); }
.linha-estado { margin: .25rem 0 .5rem; }
.estado-salvo { color: var(--tinta-2); font-size: .9rem; }
.estado-salvo.erro { color: var(--perigo); }
.barra-documento { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.secao-documento { margin: 1rem 0; }
.secao-documento > h2 { font-size: 1.15rem; }

.lista-ordenavel { margin: .25rem 0; }
.ordenavel { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.item-ordenavel { border: 1px solid var(--linha); border-radius: 8px; background: var(--superficie-2); min-width: 0; }
.item-ordenavel.arrastando { outline: 2px dashed var(--dourado); opacity: .85; box-shadow: var(--sombra); }
.item-cabeca { display: flex; align-items: center; gap: .35rem; padding: .25rem .35rem .25rem .25rem; border-bottom: 1px solid var(--linha); }
.item-rotulo { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-botoes { display: inline-flex; gap: .1rem; }
.botao-icone.pequeno { min-width: 36px; height: 36px; border-radius: 18px; font-size: 1rem; }
.botao-icone.perigo { color: var(--perigo); }
.botao-icone[disabled] { opacity: .35; cursor: default; }
.alca { touch-action: none; cursor: grab; border: 1px dashed var(--linha); background: var(--superficie); border-radius: 6px; min-width: 36px; min-height: 36px; color: var(--tinta-2); font-size: 1.1rem; }
.alca:active { cursor: grabbing; }
.item-corpo { padding: .25rem .75rem .75rem; min-width: 0; }
.ordenavel.compacta .item-corpo { padding-top: 0; }
.ordenavel .ordenavel .item-ordenavel { background: var(--superficie); }
.subdivisoes { margin-top: .5rem; }

.previa:empty { display: none; }
.citacao-biblica { margin: .5rem 0; padding: .4rem .8rem; border-left: 3px solid var(--dourado); background: var(--superficie); border-radius: 0 6px 6px 0; }
.citacao-biblica .passagem { margin: .25rem 0; overflow-wrap: anywhere; }
.citacao-rotulo { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: 0; font-size: .92rem; }
.credito { font-size: .8rem; color: var(--tinta-2); margin: .2rem 0 0; }
.ausente { color: var(--tinta-2); font-style: italic; }
.inserir-passagem { margin-top: .4rem; }
.inserir-passagem label { font-weight: 500; font-size: .92rem; }
.nota-ia { border: 1px solid var(--linha); border-left: 3px solid #8c2f39; border-radius: 6px; padding: .5rem .75rem; margin: .5rem 0; background: var(--superficie-2); }
.ref-simples { font-family: var(--fonte-leitura); }

.abas { display: flex; gap: .25rem; border-bottom: 1px solid var(--linha); margin: .5rem 0 1rem; flex-wrap: wrap; }
.abas a { padding: .6rem 1rem; text-decoration: none; color: var(--tinta) !important; border-bottom: 3px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.abas a[aria-current="page"] { border-bottom-color: var(--dourado); font-weight: 700; }
.dica-faixa { font-size: .92rem; }
.questao fieldset { margin: .5rem 0; }
.opcao { display: flex; align-items: center; gap: .4rem; margin: .3rem 0; }
.opcao input[type="text"] { flex: 1; min-width: 0; }
.opcao .letra { font-weight: 700; color: var(--tinta-2); }
.mes-agenda h3 { text-transform: capitalize; }
.form-turma h3 { margin-top: 0; }
details.cartao > summary { cursor: pointer; min-height: 32px; }
details.cartao[open] > summary { margin-bottom: .5rem; }

.itens-leitura { list-style: none; padding: 0; margin: .25rem 0 .75rem; }
.itens-leitura li { margin: .3rem 0; }
.itens-leitura .caps { display: inline-flex; flex-wrap: wrap; gap: .25rem; vertical-align: middle; }
.lista-leituras { padding-left: 1.6rem; }
.lista-leituras li { margin: .35rem 0; }
.lista-leituras li.feita > label { color: var(--tinta-2); }
.lista-leituras .check { display: inline-flex; align-items: flex-start; }
.destaque-leitura { border-left: 4px solid var(--dourado); }
.titulo-cartao { margin: 0 0 .3rem; font-size: 1.05rem; font-family: var(--fonte-leitura); }
.lista-simples progress { display: block; margin: .3rem 0; }
.entrada-diario { border-bottom: 1px solid var(--linha); padding: .5rem 0 .75rem; }
.entrada-diario h3 { font-size: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.assistente .fio { display: grid; gap: .75rem; margin: 1rem 0; }
.msg { border: 1px solid var(--linha); border-radius: var(--raio); padding: .75rem 1rem; background: var(--superficie); overflow-wrap: anywhere; }
.msg-usuario { background: var(--superficie-2); }
.msg-ia { border-left: 4px solid #8c2f39; }
.msg-ia.sem-dados { border-left-color: var(--tinta-2); }
.msg-autor { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-weight: 600; font-size: .9rem; margin: 0 0 .4rem; }
.cit { display: inline; border: 1px solid var(--dourado); background: var(--superficie-2); color: var(--tinta); border-radius: 999px; padding: .05rem .5rem; font: 600 .82rem var(--fonte-ui); cursor: pointer; min-height: 24px; margin: 0 .1rem; }
.cit:hover { background: var(--d-amarelo); }
mark.removido { background: transparent; color: var(--perigo); font-style: italic; font-size: .9em; }
.citacoes, .verificacao { margin-top: .5rem; font-size: .92rem; }
.citacoes summary, .verificacao summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.link { background: none; border: 0; padding: 0; color: var(--marinho-2); text-decoration: underline; cursor: pointer; font: inherit; min-height: 24px; }
:root[data-tema="escuro"] .link { color: #9cc0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .link { color: #9cc0ff; } }
.form-ia textarea { min-height: 5.5rem; }
.versoes li { overflow-wrap: anywhere; }
.permissoes { list-style: none; padding: 0; }
.documento.compacto h1 { font-size: 1.3rem; }

/* apresentação em tela cheia */
body.apresentando .topo, body.apresentando .lateral, body.apresentando .inferior, body.apresentando .painel { display: none !important; }
body.apresentando .estrutura { display: block; }
body.apresentando main { padding: 0; }
.apresentacao { position: fixed; inset: 0; z-index: 90; background: var(--papel); color: var(--tinta); display: flex; flex-direction: column; }
.ap-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .5rem .75rem; border-bottom: 1px solid var(--linha); background: var(--superficie); }
.ap-barra select { width: auto; max-width: min(60vw, 22rem); }
.ap-barra .espaco { flex: 1; }
.ap-contador { font-weight: 600; color: var(--tinta-2); min-width: 3.5rem; }
.ap-cronometro { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ap-tempo { font: 600 1rem var(--fonte-ui); font-variant-numeric: tabular-nums; padding: .2rem .5rem; border-radius: 6px; background: var(--superficie-2); }
.apresentacao.esgotado .ap-tempo:nth-child(2) { background: var(--perigo); color: #fff; }
.ap-esgotado:empty { display: none; }
.ap-esgotado { background: var(--perigo); color: #fff; text-align: center; padding: .25rem; font-weight: 700; }
.ap-conteudo { --ap-tam: 34px; flex: 1; overflow-y: auto; padding: 2rem clamp(1rem, 6vw, 6rem); font: var(--ap-tam)/1.45 var(--fonte-leitura); outline: none; }
.ap-conteudo h1, .ap-conteudo h2, .ap-conteudo h3 { font-size: 1.15em; margin: 0 0 .5em; }
.ap-conteudo .ap-titulo { font-size: 1.5em; }
.ap-conteudo .ap-topico { color: var(--dourado); font-size: .8em; text-transform: uppercase; letter-spacing: .04em; }
.ap-conteudo .ap-ideia { font-size: 1.15em; font-weight: 600; }
.ap-conteudo .citacao-biblica { font-size: .92em; }
.ap-conteudo .credito, .ap-conteudo .citacao-rotulo { font-size: .45em; }
.ap-conteudo .selo { font-size: .35em; }
.ap-dica { margin: 0; padding: .3rem .75rem; font-size: .8rem; color: var(--tinta-2); border-top: 1px solid var(--linha); }
@media (max-width: 860px) { .ap-conteudo { padding: 1rem; } .ap-dica { display: none; } }

/* documento para impressão */
.documento h1 { margin-top: .5rem; }
.documento .ficha { grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); }
.questionario > li { margin: .6rem 0; }
.alternativas { list-style: none; padding-left: .5rem; }
.gabarito { color: var(--sucesso); font-weight: 600; }
.linhas-resposta span { display: block; border-bottom: 1px solid var(--linha); height: 1.9rem; }
@media print {
  .nao-imprimir, .barra-documento, .avisos, .rede-aviso { display: none !important; }
  main { padding: 0 !important; }
  .largura-leitura { max-width: none; }
  .documento { font: 11pt/1.5 Georgia, "Times New Roman", serif; color: #000; }
  .documento h1, .documento h2, .documento h3 { break-after: avoid; color: #14213d; }
  .citacao-biblica { break-inside: avoid; border-left-color: #7a5c14; background: none; }
  .selo { border-color: #7a5c14 !important; color: #7a5c14 !important; background: none !important; }
}

/* ---------- Fase 4: mapas, linha do tempo, biblioteca, grupos, acessibilidade ---------- */
:root { --mapa-agua: #dde8ef; --mapa-terra: #f1ebdc; --mapa-borda: #b9ad92; --mapa-rio: #7fa4bd; --m-forte: #1f3060; --m-media: #6b4e0f; --m-fraca: #5a4a8a; --m-rota1: #a3261f; --m-rota2: #1e6b3a; --m-rota3: #1f3060; --m-rota4: #6b4e0f; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) { --mapa-agua: #0f1724; --mapa-terra: #253048; --mapa-borda: #4a5a7a; --mapa-rio: #4f7ea3; --m-forte: #e9e5db; --m-media: #e3c47b; --m-fraca: #c5a8f0; --m-rota1: #ff8a80; --m-rota2: #7dd39a; --m-rota3: #9cc0ff; --m-rota4: #e3c47b; } }
:root[data-tema="escuro"] { --mapa-agua: #0f1724; --mapa-terra: #253048; --mapa-borda: #4a5a7a; --mapa-rio: #4f7ea3; --m-forte: #e9e5db; --m-media: #e3c47b; --m-fraca: #c5a8f0; --m-rota1: #ff8a80; --m-rota2: #7dd39a; --m-rota3: #9cc0ff; --m-rota4: #e3c47b; }
.largura-ampla { max-width: 72rem; margin: 0 auto; }
.mapa { position: relative; border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; background: var(--mapa-agua); margin: .75rem 0; }
.mapa-svg { display: block; width: 100%; height: var(--mapa-altura, 420px); max-height: 70vh; touch-action: none; cursor: grab; user-select: none; }
.mapa-svg:active { cursor: grabbing; }
.mapa-svg:focus-visible { outline: 3px solid var(--foco); outline-offset: -3px; }
.mapa .terra { fill: var(--mapa-terra); stroke: var(--mapa-borda); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mapa .lagos { fill: var(--mapa-agua); stroke: var(--mapa-rio); stroke-width: .8; vector-effect: non-scaling-stroke; }
.mapa .rios { fill: none; stroke: var(--mapa-rio); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.mapa .rota { fill: none; stroke-width: 3; stroke-dasharray: 8 5; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.rota-v1 { stroke: var(--m-rota1); } .rota-v2 { stroke: var(--m-rota2); } .rota-v3 { stroke: var(--m-rota3); } .rota-v4 { stroke: var(--m-rota4); }
.marcador { cursor: pointer; }
.marcador .ponto { stroke-width: 2.5; }
.marcador text { font: 600 12px var(--fonte-ui); fill: var(--tinta); paint-order: stroke; stroke: var(--mapa-terra); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.marcador text.rotulo-alt { font-weight: 400; font-style: italic; }
.m-consenso .ponto { fill: var(--m-forte); stroke: var(--mapa-terra); }
.m-provavel .ponto { fill: var(--m-media); stroke: var(--mapa-terra); }
.m-possivel .ponto { fill: var(--mapa-terra); stroke: var(--m-media); }
.m-incerta .ponto, .m-improvavel .ponto, .m-desconhecida .ponto { fill: var(--mapa-terra); stroke: var(--m-fraca); stroke-dasharray: 3 2; }
.marcador.alt circle { fill: none; stroke: var(--m-fraca); stroke-width: 2; stroke-dasharray: 3 2; }
.marcador.alt.m-provavel circle, .marcador.alt.m-consenso circle { stroke: var(--m-media); stroke-dasharray: none; }
.marcador .area { fill: var(--m-media); fill-opacity: .14; stroke: var(--m-media); stroke-width: 1; stroke-dasharray: 2 2; }
.marcador.ativo .ponto { stroke: var(--foco); stroke-width: 3; }
.mapa .ligacao { stroke: var(--m-fraca); stroke-width: 1.5; stroke-dasharray: 4 3; }
.mapa-controles { position: absolute; top: .5rem; right: .5rem; display: flex; flex-direction: column; gap: .3rem; }
.mapa-controles .botao-icone { background: var(--superficie); border: 1px solid var(--linha); box-shadow: var(--sombra); }
.mapa-controles .menos { font-size: 1.4rem; line-height: 1; }
.mapa-credito { position: absolute; left: .4rem; bottom: .2rem; margin: 0; font-size: .7rem; color: var(--tinta-2); background: color-mix(in srgb, var(--superficie) 80%, transparent); padding: 0 .3rem; border-radius: 3px; }
.mapa.compacto .mapa-svg { max-height: 40vh; }
.mapa-legenda ul { list-style: none; padding: 0; margin: .25rem 0 .75rem; display: grid; gap: .25rem; font-size: .9rem; }
.mapa-legenda svg.amostra { vertical-align: middle; overflow: visible; }
.mapa-legenda .ponto { stroke-width: 2; }
.amostra-area { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px dashed var(--m-media); background: color-mix(in srgb, var(--m-media) 18%, transparent); vertical-align: middle; }
.grau { font-size: .85rem; font-weight: 600; padding: 0 .35rem; border-radius: 4px; border: 1px solid currentColor; white-space: nowrap; }
.g-consenso { color: var(--sucesso); } .g-provavel { color: var(--dourado); } .g-possivel, .g-incerta, .g-improvavel, .g-desconhecida { color: #5b3d8a; }
:root[data-tema="escuro"] .g-possivel, :root[data-tema="escuro"] .g-incerta, :root[data-tema="escuro"] .g-improvavel, :root[data-tema="escuro"] .g-desconhecida { color: #c5a8f0; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .g-possivel, :root:not([data-tema="claro"]) .g-incerta, :root:not([data-tema="claro"]) .g-improvavel, :root:not([data-tema="claro"]) .g-desconhecida { color: #c5a8f0; } }
.aviso.incerteza { border-left-color: #5b3d8a; }
.identificacoes { padding-left: 1.3rem; }
.identificacoes li { margin: .5rem 0 .9rem; }
.barra-confianca { height: 8px; background: var(--superficie-2); border: 1px solid var(--linha); border-radius: 4px; max-width: 22rem; overflow: hidden; }
.barra-confianca .preenchida { display: block; height: 100%; width: var(--v, 0%); background: var(--dourado); }
.lista-lugares { list-style: none; padding: 0; margin: .5rem 0; columns: 2 18rem; column-gap: 2rem; }
.lista-lugares li { break-inside: avoid; padding: .3rem 0; }
.lista-equivalente summary { cursor: pointer; min-height: 32px; font-weight: 600; }
.versos-lugar p { margin: .3rem 0; line-height: 1.8; }
.estudo-capitulo { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 1rem 0; padding-top: .75rem; border-top: 1px solid var(--linha); }
.atalhos-pesquisa { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
/* linha do tempo */
.periodo h2 .discreto { font: 400 .9rem var(--fonte-ui); }
.linha-tempo { list-style: none; padding: 0 0 0 1rem; margin: .5rem 0 1.5rem; border-left: 3px solid var(--linha); }
.linha-tempo.compacta { margin: .25rem 0; }
.evento { position: relative; display: grid; grid-template-columns: 8.5rem 1fr; gap: .25rem .75rem; padding: .35rem 0; }
.evento::before { content: ""; position: absolute; left: calc(-1rem - 7px); top: .9rem; width: 11px; height: 11px; border-radius: 50%; background: var(--superficie); border: 2px solid var(--dourado); }
.evento.realce { background: var(--superficie-2); border-radius: 6px; }
.ev-data { font-variant-numeric: tabular-nums; color: var(--tinta-2); font-size: .92rem; padding-top: .15rem; }
.ev-titulo { text-align: left; }
.selo.debatida { color: #5b3d8a; border-color: currentColor; margin-left: .35rem; }
:root[data-tema="escuro"] .selo.debatida { color: #c5a8f0; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .selo.debatida { color: #c5a8f0; } }
.nota-debate { border-left: 3px solid #5b3d8a; padding: .4rem .75rem; background: var(--superficie-2); border-radius: 6px; margin: .5rem 0; }
@media (max-width: 560px) { .evento { grid-template-columns: 1fr; gap: 0; } }
/* biblioteca */
.categoria-biblioteca h2 { border-bottom: 1px solid var(--linha); padding-bottom: .25rem; }
.lista-obras { list-style: none; padding: 0; }
.lista-obras > li { padding: .5rem 0; border-bottom: 1px solid var(--linha); }
.lista-verbetes { list-style: none; padding: 0; }
.lista-verbetes li { padding: .5rem 0; border-bottom: 1px solid var(--linha); }
.lista-verbetes .trecho { margin: .2rem 0 0; color: var(--tinta-2); font-size: .92rem; }
.verbete p:not(.credito-fonte):not(.discreto) { font-family: var(--fonte-leitura); font-size: 1.05rem; line-height: 1.7; }
.ref-verbete { white-space: nowrap; }
.selo.dado_geografico { color: #24557a; border-color: currentColor; }
.selo.obra_dominio_publico { color: var(--dourado); border-color: currentColor; }
.selo.conteudo_usuario { color: var(--sucesso); border-color: currentColor; }
:root[data-tema="escuro"] .selo.dado_geografico { color: #8cc4ef; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .selo.dado_geografico { color: #8cc4ef; } }
.lista-bib, .lista-citacoes { padding-left: 1.2rem; }
.lista-bib > li, .lista-citacoes > li { padding: .6rem 0; border-bottom: 1px solid var(--linha); }
.lista-citacoes { list-style: none; padding: 0; }
.lista-citacoes blockquote { margin: 0 0 .3rem; padding: .3rem .8rem; border-left: 3px solid var(--dourado); font-family: var(--fonte-leitura); }
.abnt { overflow-wrap: anywhere; }
.pessoas { border: 1px dashed var(--linha); border-radius: 6px; padding: .4rem .6rem; margin: .5rem 0; }
.rotulo-grupo { font-weight: 600; margin: 0 0 .25rem; }
.pessoa { align-items: flex-end; }
.lista-escolha { list-style: none; padding: 0; max-height: 50vh; overflow: auto; }
.lista-escolha li { padding: .35rem 0; border-bottom: 1px solid var(--linha); }
/* grupos */
.lista-grupos { list-style: none; padding: 0; }
.lista-grupos li { padding: .6rem 0; border-bottom: 1px solid var(--linha); }
.lista-membros { list-style: none; padding: 0; }
.lista-membros li { padding: .45rem 0; border-bottom: 1px solid var(--linha); display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.acoes-membro { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin-left: auto; }
.codigo-convite { font: 700 1.6rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; overflow-wrap: anywhere; }
.duas-colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.tabela { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabela caption { text-align: left; font-weight: 600; padding: .3rem 0; }
.tabela th, .tabela td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--linha); }
.zona-perigo { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--linha); }
/* acessibilidade: alto contraste e menos movimento (preferências do usuário) */
:root[data-contraste="alto"] { --tinta-2: var(--tinta); --linha: #5c5c5c; --mapa-borda: #3d3d3d; }
:root[data-contraste="alto"][data-tema="escuro"] { --linha: #9aa3b5; --mapa-borda: #b4bccb; }
@media (prefers-color-scheme: dark) { :root[data-contraste="alto"]:not([data-tema="claro"]) { --linha: #9aa3b5; --mapa-borda: #b4bccb; } }
:root[data-contraste="alto"] a, :root[data-contraste="alto"] .link { text-decoration: underline; text-decoration-thickness: 2px; }
:root[data-contraste="alto"] .botao, :root[data-contraste="alto"] .botao-icone, :root[data-contraste="alto"] input, :root[data-contraste="alto"] select, :root[data-contraste="alto"] textarea { border-width: 2px; border-color: var(--tinta); }
:root[data-contraste="alto"] :focus-visible { outline-width: 4px; }
:root[data-contraste="alto"] .discreto, :root[data-contraste="alto"] .vazio { color: var(--tinta); }
:root[data-movimento="reduzido"] *, :root[data-movimento="reduzido"] *::before, :root[data-movimento="reduzido"] *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
.credito-fonte { font-size: .8rem; color: var(--tinta-2); margin-top: 1rem; overflow-wrap: anywhere; }
input[type="file"] { max-width: 100%; }
