:root {
  --ink: #0c0a09;
  --ink-2: #15110e;
  --panel: #1c1713;
  --panel-2: #241d18;
  --line: #33291f;
  --text: #ecdcb8;
  --muted: #ab9c8b;
  --faint: #7a6c5e;
  --fire: #e0352f;
  --fire-2: #ff5a4a;
  --blood: #b3141f;
  --parchment: #ecdcb8;
  --radius: 14px;
  --role-assassino: #ee5a43;
  --role-atirador: #f2a53a;
  --role-guardiao: #57a3ee;
  --role-suporte: #5cc77f;
  --role-estrategista: #ad82ee;
  --font-display: "Dela Gothic One", "Arial Black", sans-serif;
  --font-body: "Lato", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fire-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { height: 38px; width: auto; }

.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 3px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: .02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-fire, .nav a.btn-fire { background: var(--blood); color: var(--parchment); }
.btn-fire:hover, .nav a.btn-fire:hover { background: var(--fire-2); color: var(--ink); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--panel); }
.btn-ghost:hover { border-color: var(--fire); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn[aria-disabled="true"] { pointer-events: none; background: var(--panel); color: var(--muted); border-color: var(--line); box-shadow: none; }

.menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 15px;
}

.beta-banner {
  background: var(--blood);
  border-bottom: 0;
  color: var(--parchment);
  font-size: 14px;
  text-align: center;
  padding: 8px 16px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
  background:
    radial-gradient(900px 480px at 75% 20%, rgba(242, 106, 27, .22), transparent 60%),
    radial-gradient(700px 400px at 10% 90%, rgba(196, 54, 31, .18), transparent 60%),
    var(--ink);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(transparent, var(--ink));
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero-logo { width: min(520px, 100%); filter: drop-shadow(0 18px 40px rgba(242, 106, 27, .35)); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 54ch; margin: 18px 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.download-note { margin: 12px 0 0; color: var(--faint); font-size: 14px; }
.hero-meta { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.hero-meta div strong { display: block; font-family: var(--font-display); font-size: 30px; color: var(--text); }
.hero-meta div span { color: var(--faint); font-size: 14px; }

.squad {
  position: relative;
  height: 420px;
}
.squad img {
  position: absolute;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .6));
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }

section.block { padding: 84px 0; }
section.block.alt { background: var(--ink-2); border-block: 1px solid var(--line); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fire);
  margin-bottom: 10px;
}
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { font-size: 20px; }
.card p { color: var(--muted); margin: 0; }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(242, 106, 27, .12);
  color: var(--fire-2);
  margin-bottom: 14px;
}
.card .icon svg { width: 24px; height: 24px; }
a.card { color: inherit; transition: border-color .15s ease, transform .15s ease; }
a.card:hover { border-color: var(--fire); text-decoration: none; transform: translateY(-2px); }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.char-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.char-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(160px 120px at 50% 35%, var(--role-color, var(--fire)), transparent 70%);
  opacity: .16;
}
.char-card:hover { transform: translateY(-3px); border-color: var(--role-color, var(--fire)); text-decoration: none; }
.char-card .sprite { height: 130px; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.char-card .sprite img { max-height: 130px; image-rendering: pixelated; }
.char-card h3 { font-size: 20px; margin: 10px 0 4px; position: relative; }

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--role-color, var(--muted));
  background: color-mix(in srgb, var(--role-color, var(--muted)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--role-color, var(--muted)) 35%, transparent);
  position: relative;
}

[data-role="assassino"] { --role-color: var(--role-assassino); }
[data-role="atirador"] { --role-color: var(--role-atirador); }
[data-role="guardiao"] { --role-color: var(--role-guardiao); }
[data-role="suporte"] { --role-color: var(--role-suporte); }
[data-role="estrategista"] { --role-color: var(--role-estrategista); }

.roles-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.role-card { border-top: 3px solid var(--role-color); }
.role-card h3 { color: var(--role-color); }
.role-card .who { margin-top: 12px; font-size: 14px; color: var(--faint); }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { position: relative; padding-top: 54px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 18px;
  left: 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  color: var(--fire);
}

.cta {
  text-align: center;
  padding: 64px 24px;
  border-radius: 22px;
  border: 1px solid #5a2410;
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(242, 106, 27, .25), transparent 70%),
    var(--panel);
}
.cta h2 { font-size: clamp(28px, 4vw, 40px); }
.cta p { color: var(--muted); margin: 0 auto 26px; max-width: 56ch; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--faint);
  font-size: 14px;
}
footer.site .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.site a { color: var(--muted); }

details.faq {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
}
details.faq + details.faq { margin-top: 10px; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::after { content: "+"; color: var(--fire); font-size: 20px; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); margin: 12px 0 0; }

/* wiki */

.wiki-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; padding: 32px 0 80px; }

.wiki-side {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 6px;
}
.wiki-search {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  margin-bottom: 18px;
}
.wiki-search:focus { outline: 2px solid var(--fire); outline-offset: 1px; }
.side-group { margin-bottom: 18px; }
.side-group h4 {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
  font-family: var(--font-body);
  font-weight: 700;
}
.side-group a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
}
.side-group a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.side-group a.active { background: rgba(242, 106, 27, .12); color: var(--fire-2); font-weight: 600; }

.wiki-content { min-width: 0; }
.wiki-content h1 { font-size: clamp(32px, 4.5vw, 46px); }
.wiki-content h2 { font-size: 26px; margin-top: 2em; padding-top: .2em; }
.wiki-content h3 { font-size: 20px; margin-top: 1.6em; }
.wiki-content p, .wiki-content li { color: #ddd2c4; }
.wiki-content ul, .wiki-content ol { padding-left: 1.3em; }
.wiki-content li + li { margin-top: 4px; }
.wiki-content .lead { font-size: 18px; color: var(--muted); max-width: 70ch; }
.crumbs { font-size: 14px; color: var(--faint); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

.callout {
  border-left: 3px solid var(--fire);
  background: var(--panel);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 20px 0;
  color: var(--muted);
}
.callout strong { color: var(--text); }
.callout.info { border-color: var(--role-guardiao); }
.callout.warn { border-color: var(--role-atirador); }

.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel-2); font-family: var(--font-display); font-weight: 600; color: var(--text); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 6px;
}
.badge.planned { background: rgba(173, 130, 238, .15); color: var(--role-estrategista); }
.badge.new { background: rgba(92, 199, 127, .15); color: var(--role-suporte); }

.char-hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: center;
  padding: 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: radial-gradient(420px 220px at 10% 50%, color-mix(in srgb, var(--role-color, var(--fire)) 22%, transparent), transparent 70%), var(--panel);
  margin-bottom: 28px;
}
.char-hero .sprite { display: flex; justify-content: center; }
.char-hero .sprite img { max-height: 190px; image-rendering: pixelated; }
.char-hero h1 { margin-bottom: 8px; }
.char-hero p { margin: 10px 0 0; color: var(--muted); }

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.stat {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 110px;
}
.stat span { display: block; font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.stat strong { font-family: var(--font-display); font-size: 20px; }

.jutsu-list { display: grid; gap: 12px; }
.jutsu {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 18px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.jutsu.buff { border-color: #5a2410; background: linear-gradient(90deg, rgba(242, 106, 27, .10), transparent 60%), var(--panel); }
.jutsu h3 { margin: 0; font-size: 18px; }
.jutsu .meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; }
.jutsu .meta span {
  font-size: 12.5px;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.jutsu .meta span.lvl { color: var(--fire-2); border-color: #5a2410; }
.jutsu .desc { grid-column: 1 / -1; color: #d6cabb; font-size: 15px; }
.jutsu .desc .line { display: block; }
.jutsu .desc .line:first-child { color: var(--muted); font-style: italic; margin-bottom: 4px; }
.type-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-left: 8px; }

.t-info, .t-atk { color: #f1d9a8; font-weight: 600; }
.t-dmg, .t-dot { color: #ff7a5c; font-weight: 600; }
.t-stun { color: #ffd34d; font-weight: 600; }
.t-root { color: #c49a6c; font-weight: 600; }
.t-slow { color: #7fc6ff; font-weight: 600; }
.t-silence { color: #b9a3ff; font-weight: 600; }
.t-confuse { color: #ff9be0; font-weight: 600; }
.t-heal { color: #6fdc8c; font-weight: 600; }
.t-protect, .t-def { color: #8fd0ff; font-weight: 600; }
.t-pierce { color: #ffae6b; font-weight: 600; }
.t-chakra { color: #6fb7ff; font-weight: 600; }
.t-wounds { color: #e05555; font-weight: 600; }

.search-results a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); margin-bottom: 8px; }
.search-results a:hover { border-color: var(--fire); text-decoration: none; }
.search-results small { display: block; color: var(--faint); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; border-top: 1px solid var(--line); padding-top: 22px; }
.pager a { color: var(--muted); font-weight: 600; }
.pager a span { display: block; font-size: 12px; color: var(--faint); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; }

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .squad { height: 300px; }
  .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .roles-row { grid-template-columns: repeat(2, 1fr); }
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-side { position: static; max-height: none; display: none; }
  .wiki-side.open { display: block; }
  .wiki-menu-btn { display: inline-flex !important; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--ink-2);
    border-bottom: 1px solid var(--line);
  }
  .menu-toggle { display: block; }
  .grid-2, .grid-3, .grid-4, .steps, .roles-row { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 64px; }
  .squad { height: 220px; }
  section.block { padding: 60px 0; }
  .char-hero { grid-template-columns: 1fr; text-align: center; }
  .char-hero .stat-row { justify-content: center; }
  .jutsu { grid-template-columns: 1fr; }
  .jutsu .meta { justify-content: flex-start; }
}

.wiki-menu-btn { display: none !important; margin-bottom: 16px; }
