/* ===== Clube do Livro — estilos ===== */

:root {
  --fundo: #151009;
  --painel: #1f1810;
  --painel-2: #271e13;
  --borda: #3a2e1d;
  --texto: #f3e9d8;
  --texto-suave: #b3a288;
  --acento: #d9a441;
  --acento-forte: #e8b95c;
  --acento-texto: #241804;
  --serifa: Georgia, 'Palatino Linotype', 'Book Antiqua', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--fundo);
  color: var(--texto);
}
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }
::selection { background: #d9a44155; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3a2e1d; border-radius: 99px; border: 2px solid var(--fundo); }
::-webkit-scrollbar-track { background: transparent; }

/* ===== tela de login ===== */

.tela-auth {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background:
    radial-gradient(900px 480px at 50% -80px, #33271266, transparent),
    var(--fundo);
}

.cartao-auth {
  width: min(420px, 100%);
  background: var(--painel);
  border: 1px solid var(--borda);
  border-radius: 18px;
  padding: 34px 30px;
  box-shadow: 0 30px 80px #0009;
}

.marca { text-align: center; margin-bottom: 22px; }
.marca h1 {
  font-family: var(--serifa);
  font-size: 30px;
  margin: 12px 0 6px;
  letter-spacing: .3px;
}
.slogan { color: var(--texto-suave); margin: 0; font-size: 14.5px; }

.marca-icone {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 16px;
  background: linear-gradient(150deg, var(--acento-forte), #a3711f);
  display: grid;
  place-items: center;
  color: var(--acento-texto);
  box-shadow: 0 8px 24px #d9a44133;
}
.marca-icone svg { width: 30px; height: 30px; }
.marca-icone.pequeno {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  margin: 0;
  box-shadow: none;
}
.marca-icone.pequeno svg { width: 20px; height: 20px; }

.abas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #120d07;
  border: 1px solid var(--borda);
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
  margin-bottom: 18px;
}
.aba {
  background: transparent;
  border: 0;
  color: var(--texto-suave);
  padding: 9px;
  border-radius: 9px;
}
.aba.ativa { background: var(--painel-2); color: var(--texto); font-weight: 600; }

.form-auth { display: flex; flex-direction: column; gap: 14px; }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--texto-suave);
  font-weight: 600;
}

input {
  background: #120d07;
  border: 1px solid var(--borda);
  color: var(--texto);
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  width: 100%;
}
input:focus { border-color: var(--acento); box-shadow: 0 0 0 3px #d9a44126; }

.btn {
  border: 1px solid var(--borda);
  background: var(--painel-2);
  color: var(--texto);
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 600;
}
.btn:hover { border-color: #56452a; }
.btn:disabled { opacity: .6; cursor: default; }

.btn-primario {
  background: linear-gradient(160deg, var(--acento-forte), var(--acento));
  border: 0;
  color: var(--acento-texto);
}
.btn-primario:hover { filter: brightness(1.06); }

.erro {
  color: #ff9d8a;
  background: #3d1f16;
  border: 1px solid #6b3021;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  margin: 0;
  font-weight: 400;
}

.dica-demo {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--texto-suave);
}
.dica-demo button {
  background: none;
  border: 1px dashed #57451f;
  color: var(--acento);
  border-radius: 8px;
  padding: 5px 12px;
  margin-top: 7px;
}
.dica-demo button:hover { background: #2a2010; }

.rodape-auth { color: #6f6049; font-size: 12.5px; margin: 0; }

/* ===== layout do app ===== */

.app {
  display: grid;
  grid-template-columns: 304px 1fr;
  height: 100dvh;
}

/* --- barra lateral --- */

.barra {
  display: flex;
  flex-direction: column;
  background: var(--painel);
  border-right: 1px solid var(--borda);
  min-height: 0;
}

.barra-topo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--borda);
}
.barra-titulo { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.barra-titulo strong { font-family: var(--serifa); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-titulo span { font-size: 12px; color: var(--texto-suave); }

.btn-icone {
  background: transparent;
  border: 0;
  color: var(--texto-suave);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
}
.btn-icone:hover { background: var(--painel-2); color: var(--texto); }
.btn-icone svg { width: 19px; height: 19px; }

.barra-rolagem {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.titulo-secao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px 2px;
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8d7c5f;
  font-weight: 700;
}

.btn-mini {
  background: transparent;
  border: 1px solid var(--borda);
  color: var(--acento);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.btn-mini:hover { background: var(--painel-2); }

.lista-livros { display: flex; flex-direction: column; gap: 4px; }
.lista-vazia { color: var(--texto-suave); font-size: 13px; padding: 6px 8px; margin: 0; }

.livro-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 11px;
  padding: 9px 10px;
  color: var(--texto);
}
.livro-item:hover { background: var(--painel-2); }
.livro-item.ativo { background: var(--painel-2); box-shadow: inset 3px 0 0 var(--acento); }

.livro-icone {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #2e2314;
  color: var(--acento);
  display: grid;
  place-items: center;
  flex: none;
}
.livro-icone svg { width: 17px; height: 17px; }

.livro-info { flex: 1; min-width: 0; }
.livro-nome {
  display: block;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--serifa);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.livro-prev {
  display: block;
  font-size: 12px;
  color: var(--texto-suave);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.badge {
  background: var(--acento);
  color: var(--acento-texto);
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  flex: none;
}

/* --- membros --- */

.lista-membros { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 4px 10px; }
.membro {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--painel-2);
  border: 1px solid var(--borda);
  border-radius: 999px;
  padding: 4px 11px 4px 4px;
  font-size: 12.5px;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  flex: none;
  text-shadow: 0 1px 2px #0006;
}

.barra-rodape {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--borda);
}
.barra-rodape .mim { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.barra-rodape strong { font-size: 13.5px; }
.barra-rodape span { font-size: 12px; color: var(--texto-suave); }

/* --- painel da conversa --- */

.painel { display: flex; min-height: 0; min-width: 0; }

.sem-livro { margin: auto; text-align: center; max-width: 380px; padding: 24px; color: var(--texto-suave); }
.sem-livro-icone {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 20px;
  background: var(--painel-2);
  border: 1px solid var(--borda);
  display: grid;
  place-items: center;
  color: var(--acento);
}
.sem-livro-icone svg { width: 34px; height: 34px; }
.sem-livro h2 { font-family: var(--serifa); color: var(--texto); margin: 0 0 8px; }
.sem-livro p { margin: 0; line-height: 1.55; font-size: 14.5px; }

.conversa { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }

.conversa-topo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--borda);
  background: var(--painel);
}
.livro-rotulo { flex: 1; min-width: 0; }
.livro-rotulo h2 {
  margin: 0;
  font-family: var(--serifa);
  font-size: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.livro-rotulo p { margin: 2px 0 0; font-size: 12.5px; color: var(--texto-suave); }

.mensagens {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #171109, var(--fundo));
}

.vazio { margin: auto; text-align: center; color: var(--texto-suave); font-size: 14.5px; }

.divisor-dia {
  align-self: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9b8a6c;
  background: #241c11;
  border: 1px solid var(--borda);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 8px 0 2px;
}

.msg { display: flex; gap: 9px; max-width: min(560px, 82%); align-items: flex-end; }
.msg .avatar { width: 28px; height: 28px; font-size: 10.5px; margin-bottom: 3px; }
.msg.propria { align-self: flex-end; flex-direction: row-reverse; }

.bolha {
  background: var(--painel-2);
  border: 1px solid var(--borda);
  border-radius: 14px 14px 14px 4px;
  padding: 8px 12px 7px;
  min-width: 0;
}
.msg.propria .bolha {
  background: linear-gradient(160deg, #e2b055, #cf9836);
  border-color: #a97e29;
  color: var(--acento-texto);
  border-radius: 14px 14px 4px 14px;
}

.bolha-topo { display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px; }
.msg-nome { font-size: 12.5px; font-weight: 700; }
.msg-hora { font-size: 10.5px; opacity: .65; margin-left: auto; }
.msg-texto { font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }

.form-mensagem {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--borda);
  background: var(--painel);
}
#input-mensagem { flex: 1; border-radius: 999px; padding: 12px 18px; }
.btn-enviar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(160deg, var(--acento-forte), var(--acento));
  color: var(--acento-texto);
  display: grid;
  place-items: center;
  flex: none;
}
.btn-enviar svg { width: 20px; height: 20px; margin-left: 2px; }
.btn-enviar:hover { filter: brightness(1.07); }

/* ===== modal ===== */

.modal {
  position: fixed;
  inset: 0;
  background: #000a;
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 50;
}
.modal-cartao {
  width: min(420px, 100%);
  background: var(--painel);
  border: 1px solid var(--borda);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 30px 80px #000c;
}
.modal-cartao h3 { margin: 0 0 4px; font-family: var(--serifa); font-size: 21px; }
.modal-sub { margin: 0 0 16px; color: var(--texto-suave); font-size: 13.5px; }
#form-livro { display: flex; flex-direction: column; gap: 13px; }
.modal-acoes { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }

/* ===== aviso (toast) ===== */

.aviso {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: #3d1f16;
  color: #ffd9cf;
  border: 1px solid #6b3021;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  z-index: 60;
  box-shadow: 0 10px 30px #000a;
  max-width: min(480px, 90vw);
}

/* ===== admin ===== */

.tag-admin {
  background: #3a2b12;
  color: var(--acento);
  border: 1px solid #57451f;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex: none;
}
.tag-admin.mini { font-size: 9px; padding: 0 6px; margin-left: 5px; }

.acoes-admin { display: flex; gap: 4px; margin-left: auto; flex: none; }
.btn-icone.perigo:hover { background: #3d1f16; color: #ff9d8a; }
.btn-icone.ativo { color: var(--acento); background: #2a2010; }

.livro-fixado {
  display: inline-flex;
  vertical-align: -2px;
  margin-left: 4px;
  color: var(--acento);
  flex: none;
}
.livro-fixado svg { width: 12px; height: 12px; }

.btn-perigo {
  background: linear-gradient(160deg, #e2574b, #c7382c);
  border: 0;
  color: #fff;
}
.btn-perigo:hover { filter: brightness(1.07); }

.livro-cadeado {
  display: inline-flex;
  vertical-align: -2px;
  margin-left: 5px;
  color: var(--texto-suave);
  flex: none;
}
.livro-cadeado svg { width: 12px; height: 12px; }

#titulo-cadeado {
  display: inline-flex;
  vertical-align: -3px;
  margin-left: 7px;
  color: var(--acento);
}
#titulo-cadeado svg { width: 15px; height: 15px; }

/* apagar mensagem (aparece para admin, ao passar o mouse) */
.msg .bolha { position: relative; }
.msg-apagar {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #6b3021;
  background: #3d1f16;
  color: #ffb4a3;
  display: none;
  place-items: center;
  padding: 0;
  z-index: 2;
}
.msg-apagar:hover { background: #54251b; color: #ffd9cf; }
.msg-apagar svg { width: 11px; height: 11px; }
.msg:hover .msg-apagar { display: grid; }

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  flex: none;
  accent-color: var(--acento);
}

.linha-toggle {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  color: var(--texto);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.acesso-membros {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 8px;
  background: #120d07;
  margin-bottom: 4px;
}
.acesso-membros.desativada { opacity: .45; pointer-events: none; }
.acesso-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--texto);
  cursor: pointer;
}
.acesso-item:hover { background: var(--painel-2); }
.acesso-item input { width: 16px; height: 16px; }
.acesso-vazio { color: var(--texto-suave); font-size: 13px; padding: 6px 8px; margin: 0; }

.nota-admin { font-size: 12.5px; color: var(--texto-suave); margin: 8px 0 0; }

/* ===== login com google / divisor ===== */

.auth-divisor {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--texto-suave);
  font-size: 12.5px;
  margin-top: 18px;
}
.auth-divisor::before,
.auth-divisor::after { content: ''; flex: 1; height: 1px; background: var(--borda); }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #1f1f1f;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 14px;
}
.btn-google:hover { filter: brightness(.95); }

/* ===== selos ===== */

.selo {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid;
  letter-spacing: .05em;
  text-transform: uppercase;
  flex: none;
}
.selo.mini { font-size: 9px; padding: 0 6px; }
.selo-adm { color: #ffd479; border-color: #8a6a24; background: #3a2b12; }
.selo-embaixador { color: #7fd8c8; border-color: #2f6e63; background: #12302b; }
.selo-arquivista { color: #c3aef5; border-color: #5d4a8f; background: #241b3d; }

.membro { padding-right: 8px; }
.btn-selos {
  background: none;
  border: 0;
  color: var(--texto-suave);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  padding: 0;
  flex: none;
}
.btn-selos:hover { color: var(--acento); background: var(--painel-2); }
.btn-selos svg { width: 13px; height: 13px; }

.selos-lista { display: flex; flex-direction: column; gap: 4px; }
.selo-opcao {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--borda);
  border-radius: 10px;
  background: #120d07;
  cursor: pointer;
  font-weight: 400;
  color: var(--texto);
  font-size: 14px;
}
.selo-opcao:hover { border-color: #56452a; }
.selo-descricao { color: var(--texto-suave); font-size: 12.5px; }

/* ===== avatar com foto (google) ===== */

.avatar { position: relative; overflow: hidden; }
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ===== reações com emoji (estilo instagram) ===== */

.msg { position: relative; }
.msg-coluna { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }

.reacoes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.reacao {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1c1610;
  border: 1px solid var(--borda);
  border-radius: 999px;
  padding: 2px 10px 2px 7px;
  font-size: 12px;
  color: var(--texto-suave);
}
button.reacao { cursor: pointer; }
button.reacao:hover { border-color: #56452a; }
.reacao .r-emoji { font-size: 13px; }
.reacao.minha { border-color: var(--acento); color: var(--texto); background: #2a2010; }

.btn-reagir {
  position: absolute;
  bottom: -8px;
  right: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--borda);
  background: var(--painel-2);
  color: var(--texto-suave);
  display: none;
  place-items: center;
  padding: 0;
  z-index: 3;
}
.btn-reagir:hover { color: var(--acento); border-color: #57451f; }
.btn-reagir svg { width: 13px; height: 13px; }
.msg:hover .btn-reagir { display: grid; }

.emoji-picker {
  position: absolute;
  bottom: 28px;
  right: -6px;
  background: var(--painel-2);
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  gap: 2px;
  z-index: 6;
  box-shadow: 0 12px 30px #000a;
}
.emoji-picker button {
  background: none;
  border: 0;
  font-size: 19px;
  padding: 4px 5px;
  border-radius: 8px;
  line-height: 1;
}
.emoji-picker button:hover { background: #3a2e1d; transform: scale(1.12); }

/* ===== seções minimizáveis ===== */

.secao { display: flex; flex-direction: column; gap: 6px; }
.secao-cabecalho { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 7px; }
.secao-nome { flex: 1; text-align: left; min-width: 0; }
.seta {
  background: none;
  border: 0;
  color: #8d7c5f;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  flex: none;
  transition: transform .18s ease;
}
.seta svg { width: 13px; height: 13px; }
.secao.fechada .seta { transform: rotate(-90deg); }
.secao.fechada > *:not(.secao-cabecalho) { display: none; }

/* ===== segmento livro / grupo especial ===== */

.segmento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #120d07;
  border: 1px solid var(--borda);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 15px;
}
.segmento-btn {
  background: transparent;
  border: 0;
  color: var(--texto-suave);
  padding: 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
}
.segmento-btn.ativa { background: var(--painel-2); color: var(--texto); }

#form-livro > div { display: flex; flex-direction: column; gap: 13px; }

textarea {
  background: #120d07;
  border: 1px solid var(--borda);
  color: var(--texto);
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  width: 100%;
  font: inherit;
  resize: vertical;
}
textarea:focus { border-color: var(--acento); box-shadow: 0 0 0 3px #d9a44126; }
#campo-descricao { margin: 12px 0 4px; }

/* ===== links clicáveis nas mensagens ===== */

.msg-texto a { color: #8ab8ff; text-decoration: underline; word-break: break-word; }
.msg.propria .msg-texto a { color: #241804; }

/* ===== busca de membros ===== */

.busca-membro {
  margin: 0 2px 8px;
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 13px;
}
.membro-resultado-vazio { color: var(--texto-suave); font-size: 13px; padding: 4px 8px; margin: 0; }

/* ===== enquetes ===== */

.btn-enquete {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--borda);
  background: var(--painel-2);
  color: var(--texto-suave);
  display: grid;
  place-items: center;
  flex: none;
}
.btn-enquete:hover { color: var(--acento); border-color: #57451f; }
.btn-enquete svg { width: 20px; height: 20px; }

.enquete { min-width: min(260px, 100%); }
.enquete-rotulo {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--texto-suave);
}
.enquete-pergunta { font-weight: 700; font-size: 15px; margin: 4px 0 10px; }

.enquete-opcao {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--borda);
  border-radius: 9px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  overflow: hidden;
  background: transparent;
  color: var(--texto);
  text-align: left;
}
.msg.propria .enquete-opcao { color: var(--acento-texto); }
.enquete-opcao:hover { border-color: #56452a; }
.enquete-opcao.minha { border-color: var(--acento); }
.enquete-barra {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: #d9a44126;
  transition: width .25s ease;
}
.msg.propria .enquete-barra { background: #24180422; }
.enquete-opcao-rotulo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  min-width: 0;
}
.enquete-check {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid #7d6a4a;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex: none;
  color: var(--acento);
}
.enquete-opcao.minha .enquete-check { border-color: var(--acento); background: #d9a4411f; }
.enquete-info { position: relative; font-size: 12px; color: var(--texto-suave); flex: none; }
.msg.propria .enquete-info { color: #241804b5; }
.enquete-votantes { font-size: 11.5px; color: var(--texto-suave); margin: -2px 0 6px 14px; }
.msg.propria .enquete-votantes { color: #241804b5; }
.enquete-rodape { font-size: 12px; color: var(--texto-suave); margin-top: 4px; }
.msg.propria .enquete-rodape { color: #241804b5; }

/* modal: linhas de opções da enquete */
.enquete-opcoes-container { display: flex; flex-direction: column; gap: 10px; }
.enquete-linha { display: flex; gap: 8px; align-items: center; }
.enquete-linha input { flex: 1; }
.enquete-remover {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--borda);
  background: transparent;
  color: var(--texto-suave);
  display: grid;
  place-items: center;
  flex: none;
  font-size: 17px;
  line-height: 1;
}
.enquete-remover:hover { color: #ff9d8a; border-color: #6b3021; }

/* ===== correções de estouro horizontal (celular) ===== */

html, body { overflow-x: hidden; max-width: 100%; }
.barra, .barra-rolagem, .painel, .conversa, .mensagens, .lista-livros, .livro-info { min-width: 0; }
.barra-rolagem { overflow-x: hidden; }
.livro-info { overflow: hidden; }
.livro-nome, .livro-prev { max-width: 100%; }
.msg-texto, .msg-texto a, .enquete-pergunta, .enquete-opcao-rotulo span:last-child,
.msg-nome, .perfil-valor, .acesso-item span:last-child { overflow-wrap: anywhere; }
.reacao, .membro { max-width: 100%; }

/* ===== perfil ===== */

.barra-rodape { cursor: pointer; }
.barra-rodape:hover { background: var(--painel-2); }
.rodape-editar { width: 15px; height: 15px; color: var(--texto-suave); margin-left: auto; flex: none; }
.membro { cursor: pointer; }

select {
  background: #120d07;
  border: 1px solid var(--borda);
  color: var(--texto);
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  width: 100%;
  font: inherit;
}
select:focus { border-color: var(--acento); }

.grade-perfil { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
@media (max-width: 480px) { .grade-perfil { grid-template-columns: 1fr; } }

.avatar-grande { width: 62px; height: 62px; font-size: 21px; flex: none; }
.perfil-cabecalho { display: flex; gap: 14px; align-items: center; margin: 6px 0 12px; }
.perfil-identidade { min-width: 0; }
.perfil-nome { font-family: var(--serifa); font-size: 21px; margin: 0 0 2px; }
.perfil-selos { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.perfil-sub2 { color: var(--texto-suave); font-size: 13px; }
.perfil-infos { display: flex; flex-direction: column; }
.perfil-linha { display: flex; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--borda); font-size: 14px; }
.perfil-linha:last-child { border-bottom: 0; }
.perfil-rotulo { width: 148px; flex: none; color: var(--texto-suave); font-size: 12.5px; font-weight: 600; padding-top: 1px; }
.perfil-valor { min-width: 0; }
.perfil-vazio { color: var(--texto-suave); font-size: 13.5px; margin: 4px 0 0; }

.modal-scroll { max-height: calc(100dvh - 40px); overflow-y: auto; }

/* ===== banner de instalação (PWA) ===== */

.banner-instalar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  z-index: 40;
  width: min(430px, calc(100vw - 28px));
  background: var(--painel);
  border: 1px solid var(--borda);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 18px 50px #000c;
}
.banner-icone {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--acento-forte), #a3711f);
  display: grid;
  place-items: center;
  color: var(--acento-texto);
  flex: none;
}
.banner-icone svg { width: 22px; height: 22px; }
.banner-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.banner-texto strong { font-size: 14.5px; }
.banner-texto span { font-size: 12px; color: var(--texto-suave); }
#banner-instalar .btn { padding: 8px 14px; font-size: 13.5px; flex: none; }
#banner-instalar .btn-icone { flex: none; }

/* ===== celular ===== */

.so-mobile { display: none; }

@media (max-width: 840px) {
  .app { grid-template-columns: 1fr; }
  .barra { border-right: 0; }
  .painel { position: fixed; inset: 0; z-index: 5; background: var(--fundo); }
  body:not(.chat-aberto) .painel { display: none; }
  body.chat-aberto .barra { display: none; }
  .so-mobile { display: grid; }
  .msg { max-width: 88%; }
  .mensagens { padding: 14px 12px 10px; }
  .form-mensagem { padding: 10px 12px; }
  .cartao-auth { padding: 26px 20px; }
}
