/* Wiki do Avalon Tale: paginas estaticas com o mesmo visual do site (tema kfh).
   Usa as variaveis e o topo/rodape de /assets/index-BIT2-2zY.css; aqui fica so o
   que e da wiki. */

.wiki-hero {
  position: relative;
  padding: calc(var(--nav-offset) + 56px) 0 48px;
  background:
    linear-gradient(rgba(10, 10, 10, .72), rgba(10, 10, 10, .62) 55%, #0a0a0a 100%),
    url("/img/home-topo.webp") 50% 70% / cover no-repeat;
  border-bottom: 1px solid #1c1c1c;
}
.wiki-hero::before {
  content: "";
  position: absolute;
  top: var(--nav-offset);
  left: 0;
  width: 110px;
  height: 110px;
  pointer-events: none;
  opacity: .85;
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--kfh-orange) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}
.wiki-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}
.wiki-crumbs a { color: var(--muted); text-decoration: none; }
.wiki-crumbs a:hover { color: var(--kfh-orange); }
.wiki-crumbs li + li::before { content: "/"; margin-right: 6px; color: #444; }
.wiki-crumbs [aria-current] { color: #fff; }

.wiki-hero__kicker {
  margin: 0 0 6px;
  color: var(--kfh-orange);
  font: 600 13px/1.2 var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.wiki-hero h1 {
  margin: 0 0 16px;
  padding-bottom: 14px;
  font: 700 clamp(34px, 5vw, 52px)/1.1 var(--display);
  letter-spacing: -.015em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
  background: linear-gradient(var(--kfh-orange), var(--kfh-orange)) left bottom / 110px 3px no-repeat;
}
.wiki-hero p {
  max-width: 720px;
  margin: 0;
  color: #f2f2f2;
  font-size: 17px;
  line-height: 1.6;
}
.wiki-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.wiki-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 106, 0, .5);
  border-radius: 4px;
  background: rgba(10, 10, 10, .75);
  font-size: 14px;
  color: #e6e6e6;
}
.wiki-facts b { color: var(--kfh-orange); font-weight: 600; }

.wiki-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 72px;
}
.wiki-toc {
  position: sticky;
  top: calc(var(--nav-h-min) + 20px);
  padding: 18px;
  border: 1px solid #1f1f1f;
  border-radius: 4px;
  background: linear-gradient(var(--kfh-orange), var(--kfh-red)) left top / 3px 100% no-repeat, #0e0e0e;
}
.wiki-toc h2 {
  margin: 0 0 12px;
  font: 700 14px/1.2 var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
}
.wiki-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.wiki-toc li { margin: 2px 0; }
.wiki-toc li li { padding-left: 14px; }
.wiki-toc a {
  display: block;
  padding: 6px 8px;
  border-radius: 3px;
  color: #cfcfcf;
  font-size: 14px;
  text-decoration: none;
}
.wiki-toc a:hover { color: #fff; background: rgba(255, 106, 0, .12); }
.wiki-toc ol ol a { font-size: 13px; color: #9a9a9a; }

.wiki-section { scroll-margin-top: calc(var(--nav-h-min) + 20px); margin-bottom: 48px; }
.wiki-section > h2 {
  margin: 0 0 18px;
  padding-bottom: 12px;
  font: 700 clamp(24px, 3vw, 30px)/1.2 var(--display);
  color: #fff;
  background: linear-gradient(var(--kfh-orange), var(--kfh-orange)) left bottom / 64px 3px no-repeat;
}
.wiki-section > p, .wiki-section .wiki-p { color: #cfcfcf; line-height: 1.7; margin: 0 0 14px; }
.wiki-section h3, .wiki-path h3 {
  margin: 28px 0 12px;
  font: 600 19px/1.3 var(--display);
  color: #fff;
}
.wiki-section h3 small, .wiki-path h3 small { display: block; margin-bottom: 4px; color: var(--kfh-orange); font: 600 12px var(--font); letter-spacing: .1em; text-transform: uppercase; }

/* cabecalho de cada caminho (Tempskron / Morion) */
.wiki-path {
  scroll-margin-top: calc(var(--nav-h-min) + 20px);
  margin-bottom: 48px;
  padding: 26px;
  border: 1px solid #1f1f1f;
  border-radius: 4px;
  background: radial-gradient(ellipse 60% 50% at 100% 0%, var(--tribe-glow), transparent 70%), #0e0e0e;
  box-shadow: inset 0 3px 0 var(--tribe);
}
.wiki-path__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.wiki-path__head h2 { margin: 0; font: 700 clamp(24px, 3vw, 30px)/1.2 var(--display); color: #fff; }
.wiki-path__head h2 span { display: block; font: 600 12px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--tribe); margin-bottom: 4px; }
.wiki-classes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wiki-classes a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid #262626;
  border-radius: 999px;
  background: #111;
  color: #ddd;
  font-size: 13px;
  text-decoration: none;
}
.wiki-classes a:hover { border-color: var(--tribe); color: #fff; }
.wiki-classes img { width: 24px; height: 24px; border-radius: 50%; }

/* NPC */
.wiki-npc {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid #262626;
  border-radius: 4px;
  background: #121212;
}
.wiki-npc img { width: 56px; height: 56px; border-radius: 4px; border: 1px solid #333; object-fit: cover; }
.wiki-npc small { display: block; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.wiki-npc b { color: #fff; font: 600 17px var(--display); }
.wiki-npc span { color: #cfcfcf; font-size: 14px; }

/* tabela de itens */
.wiki-table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid #1f1f1f; border-radius: 4px; }
.wiki-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wiki-table th {
  padding: 12px 14px;
  text-align: left;
  font: 600 12px var(--font);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9a9a9a;
  background: #141414;
  border-bottom: 1px solid #262626;
}
.wiki-table td { padding: 12px 14px; border-bottom: 1px solid #1c1c1c; color: #ddd; vertical-align: middle; }
.wiki-table tr:last-child td { border-bottom: 0; }
.wiki-table td b { color: #fff; }
.wiki-map { display: flex; align-items: center; gap: 10px; }
.wiki-map img { width: 40px; height: 40px; border-radius: 3px; border: 1px solid #333; }
.wiki-qty {
  display: inline-block;
  min-width: 34px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(255, 106, 0, .12);
  border: 1px solid rgba(255, 106, 0, .5);
  color: var(--kfh-orange);
  font-weight: 700;
  text-align: center;
}

/* passo a passo */
.wiki-steps { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: step; }
.wiki-steps li {
  position: relative;
  margin: 0;
  padding: 0 0 18px 52px;
  color: #ddd;
  line-height: 1.6;
  counter-increment: step;
}
.wiki-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--kfh-orange);
  color: #0a0a0a;
  font: 700 15px var(--display);
}
.wiki-steps li::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 4px;
  width: 2px;
  background: #262626;
}
.wiki-steps li:last-child { padding-bottom: 0; }
.wiki-steps li:last-child::after { display: none; }
.wiki-steps b { color: #fff; }

/* desafios do Morion lado a lado */
.wiki-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.wiki-card {
  scroll-margin-top: calc(var(--nav-h-min) + 20px);
  padding: 20px;
  border: 1px solid #262626;
  border-radius: 4px;
  background: #111;
}
.wiki-card h3 { margin-top: 0; }

/* avisos */
.wiki-note {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 106, 0, .45);
  border-left: 3px solid var(--kfh-orange);
  border-radius: 4px;
  background: rgba(255, 106, 0, .07);
  color: #e6e6e6;
  line-height: 1.6;
  font-size: 15px;
}
.wiki-note svg { flex: none; width: 22px; height: 22px; color: var(--kfh-orange); margin-top: 1px; }

/* recompensa */
.wiki-reward { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.wiki-reward li {
  padding: 18px;
  border: 1px solid #262626;
  border-radius: 4px;
  background: linear-gradient(var(--kfh-orange), var(--kfh-orange)) left top / 48px 3px no-repeat, #111;
}
.wiki-reward b { display: block; margin-bottom: 6px; color: #fff; font: 600 17px var(--display); }
.wiki-reward span { color: #cfcfcf; font-size: 14px; line-height: 1.6; }

.wiki-tips { margin: 0; padding: 0 0 0 20px; color: #cfcfcf; line-height: 1.8; }
.wiki-tips li::marker { color: var(--kfh-orange); }

.wiki-next {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #1f1f1f;
}
.wiki-next a { color: var(--kfh-orange); text-decoration: none; font-weight: 600; }
.wiki-next a:hover { text-decoration: underline; }

/* indice da wiki */
.wiki-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.wiki-tile {
  display: block;
  padding: 20px;
  border: 1px solid #1f1f1f;
  border-radius: 4px;
  background: linear-gradient(var(--kfh-orange), var(--kfh-orange)) left top / 48px 3px no-repeat, #111;
  color: #ddd;
  text-decoration: none;
  transition: border-color .2s;
}
a.wiki-tile:hover { border-color: rgba(255, 106, 0, .6); }
a.wiki-tile:hover b { color: var(--kfh-orange); }
.wiki-tile small { display: block; margin-bottom: 6px; color: var(--kfh-orange); font: 600 12px var(--font); letter-spacing: .1em; text-transform: uppercase; }
.wiki-tile b { display: block; margin-bottom: 6px; color: #fff; font: 600 18px var(--display); }
.wiki-tile span { color: #9a9a9a; font-size: 14px; line-height: 1.6; }
.wiki-tile--soon { opacity: .55; }

@media (width <= 1000px) {
  .wiki-body { grid-template-columns: 1fr; gap: 24px; }
  .wiki-toc { position: static; }
}
@media (width <= 700px) {
  .wiki-split, .wiki-reward { grid-template-columns: 1fr; }
  .wiki-path { padding: 18px; }
  .wiki-hero { padding-top: calc(var(--nav-offset) + 32px); }
}

/* Foto de janela do jogo nas páginas de sistema */
.wiki-shot { margin: 18px 0 6px; }
.wiki-shot img { display: block; width: 100%; max-width: 760px; height: auto; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.wiki-shot figcaption { margin-top: 8px; color: var(--muted, #9a9a9a); font-size: 13px; }
.wiki-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; padding: 0; list-style: none; }
.wiki-tabs a { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,106,0,.45); color: #fff; text-decoration: none; font-size: 14px; }
.wiki-tabs a:hover { background: rgba(255,106,0,.15); }

/* Menu "Guia do jogo": mesma caixa do menu Personagens, com rolagem */
.dd.dd-guia { width: 420px; max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.dd.dd-guia::-webkit-scrollbar { width: 8px; }
.dd.dd-guia::-webkit-scrollbar-thumb { background: #333; border-radius: 8px; }
.dd-guia__title { grid-column: 1 / -1; padding: 10px 10px 4px; color: var(--kfh-orange); font: 600 11px var(--font); letter-spacing: .12em; text-transform: uppercase; }
.dd-guia__all { grid-column: 1 / -1; }
.dd-badge { flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border: 1px solid #333; border-radius: 999px; color: var(--kfh-orange); font: 700 11px var(--font); }
.dd a:hover .dd-badge { border-color: var(--kfh-orange); }
.dd-badge--sys { color: #fff; background: rgba(255,106,0,.14); }
@media (max-width: 1000px) { .dd.dd-guia { width: auto; max-height: 60vh; } }

/* Topo das páginas estáticas igual ao do site principal (mesmas regras do guia-menu.css):
   o menu "Guia do jogo" substitui o ícone do guia, e abaixo de 1280px os ícones sociais
   saem do topo para o menu caber (continuam no menu do celular e no rodapé). */
.nav__social .social__guide { display: none; }
@media (width < 1280px) { .nav__social, .nav__sep { display: none; } }

/* Entre 1001px e 1199px os 5 itens do menu (com Guia do jogo e Ranking) não cabiam ao lado de
   Entrar e Criar conta: o Ranking ficava por cima do Entrar. Aqui o menu fica só mais justo. */
@media (width > 1000px) and (width < 1200px) {
  .nav__in { gap: 14px; }
  .menu__list { gap: 2px; }
  .menu-link { padding-left: 9px; padding-right: 9px; }
  .nav__side { gap: 10px; }
}

/* "Guia do jogo" e "Ranking" têm rolagem (overflow), e a rolagem corta a ponte invisível (.dd::before)
   que segura o mouse no respiro de 6px entre o botão e a caixa: o menu fechava no caminho até os links.
   Aqui o respiro vira borda transparente da própria caixa (passar por ela conta como estar no menu);
   a linha do topo e os cantos são refeitos para o visual ficar igual. */
@media (hover: hover) and (width > 1000px) {
  .dd.dd-guia {
    margin-top: 0;
    border-top: 7px solid transparent;
    background-clip: padding-box;
    border-top-left-radius: 8px 14px;
    border-top-right-radius: 8px 14px;
    box-shadow: inset 0 1px 0 #1f1f1f, 0 18px 40px rgba(0, 0, 0, .55);
  }
}
