/* =========================================================================
   Portal Oculto — Cartas das Entidades e Dossiê (escopo exclusivo .pc-*)
   Conversa com assets/css/badges.css: mesmo ouro, mesmo chanfro, mesma
   moldura. Nada aqui redefine classe de style.css.
   ========================================================================= */

.pc-overlay {
  position: fixed;
  inset: 0;
  z-index: 200; /* acima do #modal do app.js (z-index 100) */
  background: rgba(4, 4, 7, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  animation: pcEntra 0.22s ease;
}

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

.pc-painel {
  position: relative;
  width: min(1180px, 94vw);
  margin: 28px auto 56px;
  padding: 30px clamp(16px, 3vw, 40px) 40px;
  border-radius: 20px;
  background: linear-gradient(170deg, rgba(28, 24, 33, 0.97), rgba(13, 12, 17, 0.985));
  border: 1px solid rgba(212, 175, 55, 0.38);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.pc-fechar {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted, #A9A6B0);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.pc-fechar:hover { color: var(--gold, #D4AF37); }

.pc-cabeca { text-align: center; margin-bottom: 4px; }

.pc-titulo {
  /* Cinzel só desenha Ã/Õ no peso 400 — o "negrito" vem do contorno. */
  font-family: var(--font-display, 'Cinzel'), Georgia, serif;
  font-weight: 400;
  font-synthesis: none;
  -webkit-text-stroke: 0.9px currentColor;
  paint-order: stroke fill;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #EBCE6E;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
  margin: 0;
}

.pc-sub {
  margin: 6px 0 0;
  font-family: var(--font-serif, 'Cormorant Garamond'), Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-muted, #A9A6B0);
}

.pc-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 22px;
  color: var(--gold, #D4AF37);
}

.pc-rule::before,
.pc-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.55), transparent);
}

.pc-rule span { font-size: 9px; letter-spacing: 0.3em; opacity: 0.8; }

/* ----------------------------------------------------------------- filtros */

.pc-filtros {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.pc-filtro-linha {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pc-filtro-rotulo {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.45);
  min-width: 56px;
}

.pc-chip {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(230, 214, 170, 0.78);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.pc-chip:hover { border-color: rgba(212, 175, 55, 0.55); color: #F3DD8B; }

.pc-chip.is-ativo {
  background: linear-gradient(180deg, rgba(243, 221, 139, 0.22), rgba(140, 109, 31, 0.18));
  border-color: rgba(212, 175, 55, 0.7);
  color: #F3DD8B;
}

.pc-contagem {
  margin: 0 0 14px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(244, 241, 232, 0.5);
  letter-spacing: 0.03em;
}

/* ------------------------------------------------------------------- grade */

/* ATENÇÃO: este envoltório é `block` de propósito. Quando ele era `grid`, a
   .pc-grid virava UM item da grade de fora e colapsava em uma coluna só — o
   mesmo bug que já pegou a .badges-grid (ver comentário em style.css). */
.pc-grid-wrap { display: block; }

.pc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pc-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.pc-tile:hover,
.pc-tile:focus-visible {
  transform: translateY(-5px);
  filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.35)) drop-shadow(0 18px 34px rgba(0, 0, 0, 0.6));
  outline: none;
}

.pc-tile .pc-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.pc-tile__pe {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(244, 241, 232, 0.55);
}

.pc-selo-liberado {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FBF0B8, #C49B24);
  color: #2B1D03;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* -------------------------------------------------------------- paginação */

.pc-paginacao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.pc-paginacao button:disabled { opacity: 0.35; cursor: not-allowed; }

.pc-pagina-atual {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(244, 241, 232, 0.55);
  padding: 0 8px;
}

/* --------------------------------------------------------------- detalhe */

/* Envoltório `block` pelo mesmo motivo da .pc-grid-wrap. */
.pc-detalhe-wrap { display: block; }

.pc-detalhe {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.pc-detalhe__carta { position: sticky; top: 20px; }

.pc-detalhe__carta .pc-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.65);
}

.pc-radar-caixa {
  margin-top: 18px;
  padding: 12px 10px 6px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.pc-radar-caixa .pc-radar { display: block; width: 100%; height: auto; }

.pc-detalhe__texto { min-width: 0; }

.pc-ficha {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.pc-ficha li {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(255, 255, 255, 0.025);
}

.pc-ficha dt,
.pc-ficha__rotulo {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.42);
  margin-bottom: 3px;
}

.pc-ficha__valor {
  font-family: var(--font-serif, 'Cormorant Garamond'), Georgia, serif;
  font-size: 16px;
  line-height: 1.35;
  color: #F3DD8B;
}

.pc-nota-editorial {
  margin: 0 0 22px;
  padding: 12px 14px;
  border-left: 2px solid rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.05);
  border-radius: 0 10px 10px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(244, 241, 232, 0.72);
}

.pc-secao { margin-bottom: 24px; }

.pc-secao h3 {
  margin: 0 0 8px;
  font-family: var(--font-display, 'Cinzel'), Georgia, serif;
  font-weight: 400;
  font-synthesis: none;
  -webkit-text-stroke: 0.5px currentColor;
  paint-order: stroke fill;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold, #D4AF37);
}

.pc-secao p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.72;
  color: rgba(244, 241, 232, 0.9);
}

.pc-secao--ponto p {
  font-family: var(--font-serif, 'Cormorant Garamond'), Georgia, serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: #F3DD8B;
}

/* --------------------------------------------------------- muro de acesso */

.pc-muro {
  position: relative;
  margin-top: 8px;
  padding: 24px 22px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background:
    radial-gradient(130% 90% at 50% -10%, rgba(212, 175, 55, 0.1), transparent 62%),
    linear-gradient(180deg, #17171D 0%, #101014 100%);
  text-align: center;
}

.pc-muro__desvanece {
  position: relative;
  max-height: 150px;
  overflow: hidden;
  margin-bottom: 18px;
  text-align: left;
}

.pc-muro__desvanece::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 90px;
  background: linear-gradient(180deg, transparent, #13131A);
  pointer-events: none;
}

.pc-muro h3 {
  margin: 0 0 8px;
  font-family: var(--font-display, 'Cinzel'), Georgia, serif;
  font-weight: 400;
  font-synthesis: none;
  -webkit-text-stroke: 0.7px currentColor;
  paint-order: stroke fill;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #EBCE6E;
}

.pc-muro__lista {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
}

.pc-muro__lista li {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: rgba(230, 214, 170, 0.72);
}

.pc-muro__lista li::before { content: '\00A0\1F512\00A0'; opacity: 0.6; }

.pc-preco {
  display: block;
  font-family: var(--font-display, 'Cinzel'), Georgia, serif;
  font-weight: 400;
  font-synthesis: none;
  -webkit-text-stroke: 0.8px currentColor;
  paint-order: stroke fill;
  font-size: 30px;
  letter-spacing: 0.04em;
  color: #EBCE6E;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
  margin-bottom: 4px;
}

.pc-muro__nota {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(169, 166, 176, 0.85);
}

.pc-muro .btn { margin-top: 12px; }

.pc-aviso {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(232, 197, 71, 0.45);
  background: rgba(232, 197, 71, 0.08);
  font-size: 12.5px;
  line-height: 1.6;
  color: #E8C547;
}

.pc-aviso--ok {
  border-color: rgba(63, 191, 127, 0.45);
  background: rgba(63, 191, 127, 0.08);
  color: #7FE0AC;
}

/* ------------------------------------------------------- estados e vazios */

.pc-carregando {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 260px;
  text-align: center;
}

.pc-aro {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.18);
  border-top-color: var(--gold, #D4AF37);
  animation: pcGira 0.9s linear infinite;
}

@keyframes pcGira { to { transform: rotate(360deg); } }

.pc-carregando p {
  margin: 0;
  font-family: var(--font-serif, 'Cormorant Garamond'), Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-muted, #A9A6B0);
}

.pc-vazio {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed rgba(212, 175, 55, 0.28);
  border-radius: 14px;
  color: rgba(244, 241, 232, 0.6);
  font-size: 14px;
}

.pc-voltar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  color: rgba(230, 214, 170, 0.78);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.pc-voltar:hover { border-color: rgba(212, 175, 55, 0.55); color: #F3DD8B; }

/* -------------------------------------------------- dupla do fim do ritual */

/* Envoltório `block`; quem faz a dupla é a .pc-dupla. */
.pc-dupla-wrap { display: block; }

.pc-dupla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  max-width: 760px;
  margin: 0 auto;
}

.pc-dupla__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.pc-dupla__rotulo {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.45);
}

.pc-dupla__item .pc-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.pc-dupla__item .pc-svg:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.35));
}

/* ------------------------------------------------------- responsividade */

@media (max-width: 880px) {
  .pc-detalhe { grid-template-columns: 1fr; }
  .pc-detalhe__carta { position: static; max-width: 400px; margin: 0 auto; }
}

@media (max-width: 560px) {
  .pc-painel { width: 100%; margin: 0; border-radius: 0; border: none; min-height: 100vh; padding: 24px 14px 40px; }
  .pc-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
  .pc-filtro-rotulo { min-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-overlay { animation: none; }
  .pc-aro { animation: none; border-top-color: rgba(212, 175, 55, 0.2); }
  .pc-tile, .pc-dupla__item .pc-svg { transition: none; }
  .pc-tile:hover, .pc-dupla__item .pc-svg:hover { transform: none; }
}
