/* ============================================================
   MANUAL.CSS — Manual completo do jogo
   Usa a mesma paleta clara ("pergaminho") das outras páginas de
   conteúdo do jogo (bijuu.html, status etc.) em vez dos tokens
   escuros de game.css — só o cabeçalho/topbar é escuro no jogo.
   Só flexbox — sem CSS Grid e sem :has() (padrão do projeto).
   ============================================================ */

.man-body { background: var(--page-bg) !important; min-height: 100vh; }

.man-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.man-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.man-header-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #F4F2ED, #EDE9DE);
  border: 1px solid #D9D5CC;
}
.man-titulo-page { font-family: var(--font-body); font-weight: 800; font-size: 1.35rem; color: var(--text); margin: 0; }
.man-subtitulo-page { font-size: .82rem; color: var(--text-dim); margin: 4px 0 0; }

/* ── SIDEBAR (TOC) ──────────────────────────────────────────── */
.man-toc {
  flex: 0 0 220px;
  position: sticky;
  /* 64px do .np-topbar + ~54px da .np-saldo-bar (ambos sticky, fixos no
     topo da página) + uma folga de 16px — sem isso o TOC ficava por
     baixo daquela barra branca de saldo ao rolar a página. */
  top: 134px;
  background: #F4F2ED;
  border: 1px solid #D9D5CC;
  border-radius: 12px;
  padding: 12px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}
.man-toc-titulo { font-size: .66rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #8b8f9a; padding: 4px 8px 8px; }
.man-toc a {
  display: block;
  font-size: .78rem;
  color: #666873;
  padding: 6px 8px;
  border-radius: 7px;
  transition: background .12s ease, color .12s ease;
}
.man-toc a:hover { background: #EDE9DE; color: #20212A; }

/* ── CONTEÚDO ───────────────────────────────────────────────── */
.man-conteudo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.man-secao {
  background: #F4F2ED;
  border: 1px solid #D9D5CC;
  border-radius: 12px;
  padding: 18px 20px;
  scroll-margin-top: 16px;
}
.man-secao-titulo {
  font-family: var(--font-body); font-weight: 800; font-size: 1.02rem; color: #20212A;
  margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid #D9D5CC;
  padding-bottom: 10px;
}
.man-secao p { font-size: .82rem; color: #666873; line-height: 1.6; margin: 0 0 10px; }
.man-secao p:last-child { margin-bottom: 0; }
.man-secao ul { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.man-secao ul:last-child { margin-bottom: 0; }
.man-secao li { font-size: .8rem; color: #666873; line-height: 1.5; }
.man-secao b { color: #20212A; }
.man-secao h4 { font-size: .84rem; font-weight: 800; color: #20212A; margin: 14px 0 6px; }
.man-secao h4:first-of-type { margin-top: 0; }

.man-tag-formula {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  color: #146c94;
  background: rgba(41,128,185,.12);
  border: 1px solid #2980b9;
  border-radius: 6px;
  padding: 2px 8px;
  margin: 2px 0;
}

/* ── GRADUAÇÃO NINJA (bordas por Poder Total) ──────────────── */
.man-grad-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.man-grad-card {
  flex: 1 1 120px; max-width: 150px;
  background: #FFFFFF; border: 1px solid #D9D5CC; border-radius: 10px;
  padding: 10px 8px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.man-grad-img { width: 54px; height: 54px; object-fit: contain; }
.man-grad-nome { font-size: .76rem; font-weight: 800; color: #20212A; }
.man-grad-limiar { font-size: .66rem; color: #8b8f9a; }

/* ── RANK DE MISSÕES (por nível) ───────────────────────────── */
.man-rank-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.man-rank-chip {
  display: flex; align-items: center; gap: 6px;
  background: #FFFFFF; border: 1px solid #D9D5CC; border-radius: 20px;
  padding: 5px 12px; font-size: .76rem; color: #666873;
}
.man-rank-chip b { color: #20212A; }

/* ── ZOOM AO PASSAR O MOUSE (molduras, jutsus, habilidades) ── */
.man-zoom { cursor: zoom-in; }
.man-zoom-preview {
  position: fixed;
  z-index: 5000;
  display: none;
  padding: 10px;
  background: #FFFFFF;
  border: 1px solid #D9D5CC;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
  pointer-events: none;
}
.man-zoom-preview img { display: block; max-width: 260px; max-height: 260px; object-fit: contain; margin: 0 auto; }
.man-zoom-preview .man-zoom-cap { margin-top: 8px; font-size: .74rem; font-weight: 800; color: #20212A; text-align: center; max-width: 260px; }

/* ── CATEGORIAS (Jutsus / Habilidades / Linhagem) ────────────── */
.man-cat {
  background: #FFFFFF;
  border: 1px solid #D9D5CC;
  border-radius: 10px;
  padding: 4px 0;
  margin: 0 0 8px;
}
.man-cat summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}
.man-cat summary::-webkit-details-marker { display: none; }
.man-cat summary::before {
  content: '▸';
  color: #8b8f9a;
  font-size: .72rem;
  transition: transform .15s ease;
}
.man-cat[open] summary::before { transform: rotate(90deg); }
.man-cat-img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.man-cat-img-sm { width: 24px; height: 24px; object-fit: contain; border-radius: 5px; flex-shrink: 0; }
.man-cat-nome { font-size: .86rem; font-weight: 800; color: #20212A; }
.man-cat-count { margin-left: auto; font-size: .68rem; color: #8b8f9a; }
.man-cat-req { font-size: .68rem; color: #8b8f9a; font-style: italic; }
.man-cat-desc { font-size: .78rem; color: #666873; line-height: 1.5; margin: 0 12px 10px; }

.man-jutsu-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; }
.man-jutsu-card {
  flex: 1 1 150px; max-width: 190px;
  background: #F4F2ED; border: 1px solid #D9D5CC; border-radius: 9px;
  padding: 8px; display: flex; gap: 8px; align-items: flex-start;
}
.man-item-img, .man-cat-img, .man-cat-img-sm { background: #EDE9DE; }
.man-item-img { width: 44px; height: 44px; object-fit: contain; border-radius: 7px; flex-shrink: 0; }
.man-item-img-vazia {
  width: 44px; height: 44px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #EDE9DE; color: #8b8f9a; font-size: .8rem;
}
.man-item-img-erro { display: none; }
.man-jutsu-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.man-jutsu-nome { font-size: .74rem; font-weight: 800; color: #20212A; line-height: 1.25; }
.man-jutsu-desc { font-size: .68rem; color: #8b8f9a; line-height: 1.35; }
.man-jutsu-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.man-dano-chip, .man-tipo-chip, .man-rank-badge {
  font-size: .64rem; font-weight: 800; padding: 1px 6px; border-radius: 8px;
  border: 1px solid #D9D5CC; color: #20212A; background: #FFFFFF;
}
.man-dano-chip { color: #146c94; border-color: #2980b9; background: rgba(41,128,185,.1); }

.man-subvariante { margin: 0 12px 12px; padding-top: 8px; border-top: 1px dashed #D9D5CC; }
.man-subvariante:first-of-type { border-top: none; padding-top: 0; }
.man-subvariante-titulo { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; color: #20212A; margin-bottom: 6px; }

@media (max-width: 880px) {
  .man-page { flex-direction: column; }
  .man-toc { position: static; width: 100%; flex: 1 1 auto; max-height: none; }
}
