/* Atlas de Defensas del Yo · área de membros (mobile-first, 360–375 px) */
:root {
  --azul: #1F3A5F;
  --terracota: #B5562E;
  --salvia: #7A9A7E;
  --crema: #F7F3EA;
  --carbon: #2B2B2B;
  --branco: #FFFFFF;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--carbon);
  background: var(--crema);
  font-size: 16px;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2 { font-family: "Playfair Display", Georgia, serif; color: var(--azul); line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; color: var(--azul); margin: 14px 0 6px; }
p { margin: 0 0 10px; }
.wrap { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }

/* Login */
#login { padding-top: 40px; }
.aviso-login {
  background: #FFF4D6;
  border-left: 4px solid var(--terracota);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.95rem;
}
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="email"] {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  padding: 10px 12px;
  border: 2px solid #CFC7B5;
  border-radius: 10px;
  background: var(--branco);
}
input[type="email"]:focus { outline: 3px solid var(--salvia); border-color: var(--azul); }
.erro { color: #A23B3B; font-weight: 600; min-height: 1.2em; }

/* Botões (mínimo 48 px) */
.btn {
  display: block;
  width: 100%;
  min-height: 48px;
  line-height: 48px;
  padding: 0 16px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  margin: 10px 0 0;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-main { background: var(--terracota); color: var(--branco); }
.btn-sec { background: var(--branco); color: var(--azul); border-color: var(--azul); }
.link-btn {
  background: none; border: none; color: var(--azul);
  text-decoration: underline; cursor: pointer; font-size: 0.9rem; min-height: 44px; padding: 0 4px;
}

/* Topo */
.topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.topo h1 { margin: 0; }

/* Blocos */
.bloco { background: var(--branco); border-radius: 12px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.progresso-texto { font-weight: 800; color: var(--azul); margin-bottom: 6px; }
.barra { background: #E6DFCF; border-radius: 999px; height: 12px; overflow: hidden; margin-bottom: 10px; }
.preench { background: var(--salvia); height: 100%; border-radius: 999px; }
.aviso-liberacao { font-size: 0.93rem; color: #444; }
.lista { padding-left: 18px; margin: 0 0 8px; }
.lista li { margin-bottom: 6px; }
details { border-top: 1px solid #E6DFCF; padding: 8px 0; }
summary { font-weight: 700; color: var(--azul); cursor: pointer; min-height: 32px; }

/* Fichas */
.fichas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ficha {
  background: #FBF9F4;
  border: 1px solid #E6DFCF;
  border-radius: 10px;
  padding: 6px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ficha img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; }
.ficha-num { font-size: 0.8rem; font-weight: 700; color: var(--azul); }
.ficha.bloqueada { cursor: default; align-items: center; justify-content: center; text-align: center; min-height: 130px; opacity: 0.85; }
.cadeado { font-size: 1.5rem; }
.liberacao { font-size: 0.75rem; color: #666; }
.card-liberacao { margin-top: 10px; font-size: 0.9rem; color: #555; background: #F1EDE2; padding: 8px 10px; border-radius: 8px; }

/* Bônus */
.bono { border: 1px solid #E6DFCF; border-radius: 10px; padding: 12px; margin-top: 12px; text-align: center; }
.bono img { width: 100%; max-width: 220px; margin: 0 auto 8px; border-radius: 8px; }
.bono p { font-size: 0.93rem; }
.bono.bloqueado img { filter: grayscale(0.4); }
.tag {
  display: inline-block;
  background: var(--salvia);
  color: var(--branco);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
}

/* Visor da ficha */
.visor { border: none; border-radius: 12px; padding: 12px; width: 96vw; max-width: 560px; background: #111; color: #fff; }
.visor::backdrop { background: rgba(0,0,0,0.75); }
.visor img { width: 100%; height: auto; border-radius: 6px; cursor: zoom-in; }
.visor img.zoom { width: 180%; max-width: none; cursor: zoom-out; }
.visor-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.visor-acoes .btn { margin-top: 10px; font-size: 0.9rem; }
.visor .fechar {
  float: right; width: 40px; height: 40px; border: none; background: transparent;
  font-size: 1.8rem; line-height: 1; cursor: pointer; color: #fff;
}

/* Pendência visível (contato de suporte) */
.pendente { background: #FFF4D6; border-radius: 4px; padding: 4px 8px; font-weight: 800; color: var(--terracota); }

/* Placeholder de imagem pendente */
.ph {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: #E9E4D6;
  border: 2px dashed #B9B09A;
  border-radius: 8px;
  color: #6B6457;
  font-size: 0.75rem;
  padding: 10px;
  word-break: break-all;
  min-height: 120px;
}

@media (min-width: 720px) {
  .fichas { grid-template-columns: repeat(4, 1fr); }
  .bono { display: grid; grid-template-columns: 180px 1fr; text-align: left; gap: 12px; align-items: center; }
  .bono img { margin: 0; }
  .bono .btn, .bono .tag { justify-self: start; width: auto; padding: 0 18px; }
}
