:root {
  --bg: #16131a;
  --bg-2: #1e1a23;
  --card: #231e29;
  --line: #352e3d;
  --text: #f3eef5;
  --muted: #a99fb2;
  --accent: #e23340;
  --accent-ink: #fff;
  --accent-soft: rgba(226, 51, 64, .14);
  --display: "Pixelify Sans", ui-monospace, monospace;
  --ui: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --max: 1160px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fbf7f4;
    --bg-2: #f3ece7;
    --card: #ffffff;
    --line: #e6dcd5;
    --text: #1d1820;
    --muted: #6b6070;
    --accent: #d02533;
    --accent-soft: rgba(208, 37, 51, .10);
    color-scheme: light;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
.dex, .hero-sprites img, .starter-grid img, .parade img { image-rendering: pixelated; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.4em;
  border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 16px/1 var(--ui); text-decoration: none;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 0 #8f1620;
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #8f1620; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #8f1620; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: 0 4px 0 var(--line); }
.btn-ghost:hover { box-shadow: 0 6px 0 var(--line); }
.btn-sm { padding: .6em 1em; font-size: 15px; box-shadow: 0 3px 0 #8f1620; }
.btn-disabled { background: var(--bg-2); color: var(--muted); border-color: var(--line); box-shadow: none; cursor: default; }
.btn-disabled:hover { transform: none; box-shadow: none; }

/* ---------- aviso de beta ---------- */
.beta-bar { background: var(--accent); color: var(--accent-ink); padding: 10px 16px; text-align: center; font-size: 15px; line-height: 1.45; }
.beta-bar b { font-weight: 600; }
.beta-bar a { color: inherit; font-weight: 600; text-underline-offset: 3px; }

/* ---------- navegação ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px max(16px, calc((100vw - var(--max)) / 2));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px/1 var(--display); }
.brand img { border-radius: 8px; }
.nav nav { display: flex; align-items: center; gap: 26px; }
.nav nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav nav a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 72px 16px 56px;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(42px, 6vw, 72px); margin: 22px 0 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; color: var(--muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-tags { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.hero-tags li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

.hero-device { position: relative; }
.device {
  background: #0c0a0e;
  border-radius: 34px;
  padding: 14px 16px;
  box-shadow: 0 0 0 2px #2c2631, 0 30px 60px -20px rgba(0,0,0,.6), 0 12px 0 -4px #2c2631;
  transform: rotate(-2.5deg);
}
.device-screen { border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.device-screen img { width: 100%; height: 100%; object-fit: cover; }
.hero-sprites { position: absolute; left: -26px; bottom: -34px; display: flex; gap: 0; }
.hero-sprites img { width: 88px; height: 88px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); }
.hero-sprites img:nth-child(2) { transform: translateY(-14px); }

/* ---------- desfile de sprites ---------- */
.parade {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden; padding: 10px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.parade-track { display: flex; gap: 18px; width: max-content; animation: parade 60s linear infinite; }
.parade img { width: 56px; height: 56px; flex: none; }
@keyframes parade { to { transform: translateX(-50%); } }

/* ---------- números ---------- */
.stats {
  max-width: var(--max); margin: 0 auto; padding: 48px 16px 8px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
}
.stat { padding: 18px 16px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 10px 10px 0; }
.stat b { display: block; font: 700 34px/1 var(--display); }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.3; }

/* ---------- seções ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 96px 16px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.eyebrow { font: 700 14px/1 var(--display); color: var(--accent); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); }
.section-head p:not(.eyebrow) { margin-top: 14px; color: var(--muted); font-size: 18px; }

/* ---------- recursos ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feat h3 { font-size: 24px; margin: 14px 0 10px; }
.feat p { color: var(--muted); font-size: 16px; }
.feat strong { color: var(--text); font-weight: 600; }
.feat-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); }
.feat-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feat-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; padding: 32px; }
.feat-wide h3 { font-size: 32px; margin-top: 0; }
.feat-wide p { font-size: 17px; }
.regions { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.regions li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px 6px; }
.regions span { display: block; font: 700 13px/1 var(--display); color: var(--muted); text-align: center; margin-bottom: 4px; white-space: nowrap; }
.regions div { display: grid; grid-template-columns: repeat(3, 1fr); }
.regions img { width: 100%; aspect-ratio: 1; image-rendering: pixelated; transition: transform .15s; }
.regions img:hover { transform: translateY(-4px) scale(1.15); }
.regions li:last-child { border-color: var(--accent); }
.regions li:last-child span { color: var(--accent); }

/* ---------- batalha ---------- */
.gimmicks { display: grid; grid-template-columns: 1fr 1.25fr; grid-template-rows: auto 1fr; gap: 20px 40px; }
.tabs { display: flex; gap: 6px; padding: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.tabs button {
  flex: 1; padding: 12px 8px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font: 700 17px/1 var(--display); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.panels { grid-column: 1; }
.panel h3 { font-size: 34px; margin-bottom: 14px; }
.panel p { color: var(--muted); }
.panel-num { font: 700 72px/1 var(--display); color: var(--accent); margin: 8px 0 12px; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts b { font-weight: 600; }
.facts li span, .facts li { color: var(--muted); }
.facts li b { color: var(--text); }
.types { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; margin-top: 20px; max-width: 360px; }
.types i {
  aspect-ratio: 1; display: block;
  background: url(/assets/types.png) 0 0 / 1800% 100% no-repeat;
  background-position-x: calc(var(--i) * 100% / 17);
  image-rendering: pixelated;
}
.battle-shot { grid-column: 2; grid-row: 1 / span 2; align-self: start; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.battle-shot figure { margin: 0; }
.battle-shot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.battle-shot figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }
.battle-shot .gear { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.battle-shot .gear img { width: 182px; aspect-ratio: auto; flex: none; border: 0; border-radius: 4px; image-rendering: pixelated; }
.battle-shot .gear figcaption { margin: 0; }

/* ---------- galeria ---------- */
.gallery { columns: 3; column-gap: 12px; }
.shot {
  position: relative; display: block; width: 100%; margin: 0 0 12px; break-inside: avoid;
  padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #000; cursor: zoom-in;
}
.shot img { width: 100%; transition: transform .35s; }
.shot:hover img { transform: scale(1.04); }
.shot span {
  position: absolute; left: 10px; bottom: 10px;
  padding: 4px 10px; border-radius: 6px; background: rgba(12,10,14,.82); color: #fff;
  font: 500 14px/1.4 var(--ui);
}
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); color: #fff; }
.lightbox::backdrop { background: rgba(8,6,10,.9); }
.lightbox img { border-radius: 10px; width: 100%; }
.lb-cap { margin-top: 10px; text-align: center; color: #cfc6d6; }
.lb-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(12,10,14,.8); color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- celular ---------- */
.phone { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.phone-copy h2 { font-size: clamp(32px, 4vw, 48px); }
.phone-copy p:not(.eyebrow) { margin-top: 14px; color: var(--muted); font-size: 18px; }
.perf { list-style: none; padding: 0; margin: 0; counter-reset: perf; }
.perf li { display: grid; grid-template-columns: 52px 1fr; padding: 18px 0; border-bottom: 1px solid var(--line); counter-increment: perf; }
.perf li:first-child { border-top: 1px solid var(--line); }
.perf li::before { content: counter(perf, decimal-leading-zero); grid-row: span 2; font: 700 22px/1.2 var(--display); color: var(--accent); }
.perf b { font-weight: 600; }
.perf span { color: var(--muted); font-size: 16px; }

/* ---------- instalar ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: #fff; font: 700 22px/1 var(--display); }
.steps h3 { font-size: 24px; margin: 16px 0 8px; }
.steps p { color: var(--muted); font-size: 16px; }
.download {
  margin-top: 16px; padding: 22px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border: 2px dashed var(--line); border-radius: var(--radius);
}
/* texto à esquerda, botão sempre à direita e da mesma largura em todas as versões */
.download > div { flex: 1 1 auto; min-width: 0; }
.download > .btn { flex: 0 0 auto; min-width: 230px; text-align: center; white-space: nowrap; }
@media (max-width: 640px) {
  .download { flex-direction: column; align-items: stretch; gap: 14px; }
  .download > .btn { min-width: 0; width: 100%; }
}
.download-title { font: 700 22px/1.2 var(--display); }
.download-meta { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- beta ---------- */
.todo { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.todo li { padding: 16px 18px 16px 48px; position: relative; background: var(--bg-2); border-radius: 10px; color: var(--muted); font-size: 16px; }
.todo li::before { content: ""; position: absolute; left: 18px; top: 21px; width: 14px; height: 14px; border: 2px solid var(--accent); border-radius: 4px; }

/* ---------- novidades ---------- */
.news {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  padding: 36px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid var(--accent);
}
.news-copy { max-width: 560px; }
.news-copy h2 { font-size: clamp(28px, 3.4vw, 40px); }
.news-copy p:not(.eyebrow) { margin-top: 12px; color: var(--muted); }
.news-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.discord-link[href=""] { display: none; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 22px/1 var(--display); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 22px 20px; color: var(--muted); }
.faq details a { color: var(--accent); }

/* ---------- créditos ---------- */
.credit-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.credit-list li { background: var(--bg); padding: 20px; }
.credit-list b { display: block; font-weight: 600; margin-bottom: 4px; }
.credit-list span { color: var(--muted); font-size: 15px; }

/* ---------- notas de atualização ---------- */
.nav nav a[aria-current="page"] { color: var(--text); }
.notes { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.notes-hero { padding: 72px 0 48px; max-width: 720px; }
.notes-hero h1 { font-size: clamp(38px, 5.4vw, 64px); margin: 4px 0 18px; }
.notes-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.versions { position: sticky; top: 92px; }
.versions-title { font: 700 14px/1 var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.versions ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.versions a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); }
.versions a[aria-current="true"] { border-color: var(--accent); color: var(--text); }
.versions b { font: 700 17px/1.2 var(--display); }
.versions span { font-size: 12px; font-weight: 600; color: var(--accent); }
.release { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.release + .release { margin-top: 24px; }
.release-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.release-tag { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--display); color: var(--accent); }
.release-tag span { font: 600 12px/1 var(--ui); padding: 5px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.release-head h2 { font-size: clamp(30px, 3.6vw, 42px); margin: 12px 0 8px; }
.release-date { color: var(--muted); font-size: 15px; }
.release-lead { margin-top: 22px; font-size: 18px; color: var(--muted); }
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 28px 0 8px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.numbers div { background: var(--bg-2); padding: 14px 16px; display: flex; flex-direction: column-reverse; gap: 4px; }
.numbers dt { color: var(--muted); font-size: 13px; line-height: 1.3; }
.numbers dd { margin: 0; font: 700 26px/1 var(--display); }
.group { margin-top: 34px; }
.group h3 { display: flex; align-items: center; gap: 12px; font-size: 24px; margin-bottom: 14px; }
.kind { font: 600 12px/1 var(--ui); padding: 6px 9px; border-radius: 6px; text-transform: uppercase; letter-spacing: .06em; border: 1px solid currentColor; }
.kind-new { color: var(--accent); }
.kind-perf, .kind-fix, .kind-known { color: var(--muted); }
.group ul { list-style: none; padding: 0; margin: 0; }
.group li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 16px; }
.group li:last-child { border-bottom: 0; }
.group li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 8px; height: 8px; background: var(--accent); }
.group li b { color: var(--text); font-weight: 600; }
@media (max-width: 960px) {
  .notes-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .versions { position: static; }
  .versions ol { display: flex; flex-wrap: wrap; gap: 8px; border: 0; }
  .versions a { margin: 0; border: 1px solid var(--line); border-radius: 8px; }
  .versions a[aria-current="true"] { border-color: var(--accent); }
}
@media (max-width: 760px) {
  .notes-hero { padding-top: 48px; }
  .release { padding: 22px 18px; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- créditos ---------- */
.credits-why, .credits-block { margin-top: 56px; }
.credits-why h2, .credits-block h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 18px; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.why-list li { background: var(--card); padding: 22px; color: var(--muted); font-size: 16px; }
.why-list b { display: block; color: var(--text); font-weight: 600; margin-bottom: 6px; }
.credits-note { color: var(--muted); max-width: 760px; margin-bottom: 18px; }
.credit-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.credit-cards li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.cc-name { font: 700 20px/1.2 var(--display); }
.cc-name a { color: var(--text); text-decoration: none; }
.cc-name a:hover { color: var(--accent); }
.cc-who { color: var(--text); font-size: 15px; font-weight: 500; }
.cc-what { color: var(--muted); font-size: 15px; }
.cc-lic { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.cc-lic a { color: var(--accent); font-weight: 600; }
.cc-epoca { display: block; margin-top: 4px; line-height: 1.45; }
.cc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.cc-tag { font-size: 12px; font-weight: 500; line-height: 1; padding: 6px 9px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.cc-tag-ok { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.credit-cards details { font-size: 14px; color: var(--muted); }
.credit-cards summary { cursor: pointer; color: var(--text); font-weight: 500; }
.credit-cards details p { margin-top: 8px; }
.credits-legal p { color: var(--muted); max-width: 820px; font-size: 15px; }
.section-head .credits-link { margin-top: 18px; }
@media (max-width: 760px) {
  .why-list, .credit-cards { grid-template-columns: 1fr; }
  .credit-cards li, .why-list li { padding: 18px; }
}

/* ---------- rodapé ---------- */
.footer {
  max-width: var(--max); margin: 96px auto 0; padding: 40px 16px 56px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { border-radius: 16px; }
.footer-name { font: 700 22px/1.2 var(--display); }
.footer-brand p:not(.footer-name) { color: var(--muted); font-size: 15px; }
.legal { color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ---------- responsivo ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; gap: 64px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .feat-wide { grid-template-columns: 1fr; }
  .gimmicks { grid-template-columns: 1fr; }
  .battle-shot { grid-column: 1; grid-row: auto; }
  .phone { grid-template-columns: 1fr; gap: 24px; }
  .credit-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle {
    display: grid; gap: 6px; width: 44px; height: 44px; place-content: center;
    background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle span { width: 20px; height: 2px; background: var(--text); transition: transform .2s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav nav.open { display: flex; }
  .nav nav a:not(.btn) { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav nav .btn { margin-top: 14px; }
  .section { padding-top: 72px; }
  .features, .steps, .todo, .credit-list { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .regions { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2; }
  .device { border-radius: 24px; padding: 9px 10px; }
  .device-screen { border-radius: 14px; }
  .hero-sprites { left: -6px; bottom: -40px; }
  .hero-sprites img { width: 64px; height: 64px; }
  .footer { grid-template-columns: 1fr; }
  .tabs button { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .parade-track { animation: none; }
  .btn, .shot img, .starter-grid img { transition: none; }
}

/* renders 3D dos modelos (pixel art ampliada sem borrar) */
img.render { image-rendering: pixelated; object-fit: contain; width: 100%; height: auto; background: radial-gradient(circle at 50% 60%, var(--card), var(--bg)); }
.device-screen img.render { width: auto; height: 100%; max-height: 360px; margin: 0 auto; display: block; aspect-ratio: 1; }
.device-screen:has(img.render) { display: grid; place-items: center; aspect-ratio: 16 / 9; background: radial-gradient(circle at 50% 60%, var(--card), var(--bg)); }
.battle-shot img.render { max-width: 260px; margin: 0 auto; display: block; }

/* ---------- wiki ---------- */
.wiki-table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; }
.wiki-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.wiki-table th, .wiki-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.wiki-table th { background: var(--bg-2); font-weight: 600; color: var(--text); }
.wiki-table td { color: var(--muted); }
.wiki-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.wiki-table tr:last-child td { border-bottom: 0; }
.wiki-grid { font-family: ui-monospace, Consolas, monospace; white-space: pre; line-height: 1.25; color: var(--text); }
.release p + p, .release .group + p { margin-top: 12px; }
.release > p { color: var(--muted); margin-top: 14px; }

/* ---------- wiki: seções, abas, busca ---------- */
.wiki-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: -20px 0 32px; }
.wiki-subnav a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
.wiki-subnav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wiki-tools { margin-bottom: 16px; }
.busca { width: 100%; max-width: 480px; padding: 12px 16px; font: 400 16px/1.2 var(--ui); color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.busca:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.busca-vazia { color: var(--muted); margin: 12px 0 0; }
.abas { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 24px; scrollbar-width: thin; }
.aba { flex: none; padding: 10px 14px; font: 600 15px/1 var(--ui); color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.aba span { font-weight: 400; opacity: .75; margin-left: 4px; }
.aba[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.aba.sem { opacity: .4; }
.painel[hidden], [data-busca][hidden] { display: none !important; }

/* ---------- receitas: grade de fabricação no estilo do Minecraft ---------- */
.receitas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.receita { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.receita h3 { font-size: 18px; margin-bottom: 10px; }
.receita .ingr, .receita .nota { margin: 10px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.receita .ingr b { color: var(--text); font-weight: 600; }
.crafting { display: inline-block; background: #c6c6c6; padding: 8px 10px 10px; border-radius: 4px;
  box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555; }
.crafting-title { margin: 0 0 6px; font: 500 14px/1 var(--display); color: #3f3f3f; }
.crafting-row { display: flex; align-items: center; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 36px); }
.grid-mt { display: grid; grid-template-columns: repeat(4, 36px); }
.slot { position: relative; width: 36px; height: 36px; display: grid; place-items: center; background: #8b8b8b;
  border: 2px solid; border-color: #373737 #fff #fff #373737; box-sizing: border-box; }
.slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.slot em { position: absolute; right: 1px; bottom: -1px; font: 700 13px/1 var(--display); font-style: normal; color: #fff; text-shadow: 1px 1px 0 #3f3f3f; }
.slot-mc b { font: 700 11px/1 var(--display); color: #f2f2f2; text-shadow: 1px 1px 0 #3f3f3f; letter-spacing: .02em; }
.slot-out { width: 52px; height: 52px; }
.slot-mt i { width: 30px; height: 30px; display: block; background: url(/assets/types.png) 0 0 / 1800% 100% no-repeat;
  background-position-x: calc(var(--i) * 100% / 17); image-rendering: pixelated; }
.seta { width: 30px; height: 22px; background: #8b8b8b; clip-path: polygon(0 32%, 58% 32%, 58% 0, 100% 50%, 58% 100%, 58% 68%, 0 68%); }
.fogo { width: 18px; height: 22px; background: #e8762d; clip-path: polygon(50% 0, 85% 45%, 75% 100%, 25% 100%, 15% 45%); }

/* ---------- Pokémon ---------- */
.pokes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.poke { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; }
.poke img { width: 96px; height: 96px; display: block; margin: 0 auto 6px; }
.poke h3 { font-size: 17px; }
.poke-num { margin: 0; font-size: 12.5px; color: var(--muted); }
.poke-tipos { display: flex; justify-content: center; gap: 4px; margin: 8px 0 6px; }
.poke-tipos i { width: 24px; height: 24px; display: block; background: url(/assets/types.png) 0 0 / 1800% 100% no-repeat;
  background-position-x: calc(var(--i) * 100% / 17); image-rendering: pixelated; }
.poke-fonte { margin: 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
/* cartão do Pokémon = link para a página dele */
.poke { position: relative; }
.poke-ver::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.poke:has(.poke-ver):hover { border-color: var(--accent); }
/* página de um Pokémon */
.poke-pag-tipos { justify-content: flex-start; }
.poke-pag-lista { padding-left: 20px; line-height: 1.65; margin: 8px 0 22px; }
.poke-pag-lista li + li { margin-top: 4px; }
@media (max-width: 640px) {
  .receitas { grid-template-columns: 1fr; }
  .pokes { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .wiki-subnav { margin-top: -12px; }
}

/* ---------- wiki: itens, formas, onde nascem, lendários ---------- */
.itens, .formas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.item, .forma { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; }
.item header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.item h3, .forma h3 { font-size: 18px; overflow-wrap: anywhere; }
.forma h3 small { font: 400 12.5px var(--ui); color: var(--muted); margin-left: 4px; }
.item-efeito { margin: 0 0 8px; font-size: 14.5px; line-height: 1.45; }
.item-fontes { margin: 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.item-fontes li { display: grid; grid-template-columns: 62px 1fr; gap: 8px; align-items: baseline; margin: 6px 0; overflow-wrap: anywhere; }
.fonte-tag { justify-self: start; padding: 2px 6px 2px 9px; font: 600 11px/1.3 var(--ui); letter-spacing: .02em; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; box-shadow: inset 3px 0 0 var(--fc, var(--line)); white-space: nowrap; }
.f-receita { --fc: #4f8fe8; } .f-drop { --fc: #e8574a; } .f-loja { --fc: #3fb36d; } .f-bau { --fc: #d9a233; }
.f-premio { --fc: #a46be8; } .f-pasto { --fc: #7fb83a; } .f-mundo { --fc: #2fb0b0; } .f-criativo { --fc: var(--accent); }
.item-fontes .f-criativo { color: var(--accent); }
.item-fontes details.mais summary { cursor: pointer; color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.item-fontes details.mais[open] summary { margin-bottom: 2px; }
.item h3 a { color: inherit; text-decoration: none; }
.item h3 a:hover { text-decoration: underline; }
.item:target { border-color: var(--accent); }
.item-colocar { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.filtros-rot { font-size: 13.5px; color: var(--muted); margin-right: 2px; }
.filtro { padding: 6px 10px; font: 600 13px/1 var(--ui); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.filtro span { font-weight: 400; opacity: .7; margin-left: 2px; }
.filtro:hover { color: var(--text); }
.filtro[aria-pressed="true"] { color: var(--text); background: var(--bg-2); border-color: var(--fc, var(--accent)); box-shadow: inset 0 0 0 1px var(--fc, var(--accent)); }
@media (min-width: 760px) { .abas-quebra { flex-wrap: wrap; overflow-x: visible; } }
.item-fontes b, .forma b { color: var(--text); font-weight: 600; }
.item .nota { color: var(--accent); }
.forma { display: flex; gap: 12px; align-items: flex-start; }
.forma > img { width: 64px; height: 64px; flex: none; }
.forma p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.forma .slot { vertical-align: middle; transform: scale(.75); margin: -6px -2px; }
.mec table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 14px 0; display: block; overflow-x: auto; }
.mec th, .mec td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mec th { background: var(--bg-2); }
.mec section { margin-bottom: 36px; }
.mec h3 { margin: 20px 0 8px; font-size: 20px; }
.download + .download { margin-top: 12px; }
.download-nota { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.forma .mini, .item .mini { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; image-rendering: pixelated; }

/* ---------- wiki: lendários (cartões com estrutura, Pokémon e a receita em ícones) ---------- */
.lend-intro { font-size: 17px; color: var(--muted); margin: 0 0 24px; }
.lend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.lend-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-top: 4px solid var(--lend, var(--accent)); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.lend-visual { position: relative; height: 210px; display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--lend, var(--accent)) 28%, transparent), var(--bg-2) 70%); }
.lend-estr { max-height: 196px; max-width: 70%; object-fit: contain; image-rendering: pixelated; margin-bottom: 8px; }
.lend-poke { position: absolute; right: 8px; bottom: 6px; width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.lend-visual.so-poke { align-items: center; }
.lend-visual.so-poke .lend-poke { position: static; width: 180px; height: 180px; }
.lend-body { padding: 16px 18px 18px; }
.lend-tag { margin: 0; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--lend, var(--accent)); font-weight: 700; }
.lend-body h3 { font: 700 24px/1.15 var(--display); margin: 2px 0 8px; }
.lend-lugar { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.lend-lugar b, .lend-fonte b { color: var(--text); }
.lend-receita { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; background: var(--bg-2); border-radius: 10px; margin-bottom: 10px; }
.lend-receita .ing { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; font-weight: 600; }
.lend-receita .ing img { width: 24px; height: 24px; image-rendering: pixelated; }
.lend-receita .ing.out { border-color: var(--lend, var(--accent)); color: var(--text); }
.lend-receita .op { color: var(--muted); font-weight: 700; }
.lend-fonte { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.lend-novo { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.lend-passos { counter-reset: passo; list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lend-passos li { counter-increment: passo; position: relative; background: var(--bg-2); border-radius: 10px; padding: 46px 14px 14px; font-size: 15px; line-height: 1.45; }
.lend-passos li::before { content: counter(passo); position: absolute; top: 12px; left: 14px; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; background: var(--lend, var(--accent)); color: #fff; font: 700 15px/1 var(--display); }
.lend-aves { flex-direction: row; align-items: center; }
.lend-aves-img { display: flex; padding: 12px; gap: 4px; }
.lend-aves-img img { width: 96px; height: 96px; object-fit: contain; }
.lend-cmds { padding-left: 18px; line-height: 1.7; }
/* cartão inteiro leva à página do lendário (passo a passo) */
.lend-link { display: inline-block; margin: 0 18px 16px; font-weight: 700; font-size: 14.5px; color: var(--lend, var(--accent)); text-decoration: none; }
.lend-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.lend-card:has(.lend-link):hover { border-color: var(--lend, var(--accent)); }
.lend-card a:not(.lend-link) { position: relative; z-index: 1; }
.lend-aves .lend-link { position: absolute; right: 0; bottom: 0; }
/* página de um lendário */
.lend-pag-topo { display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 18px; margin-bottom: 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; }
.lend-pag-topo .lend-estr { max-height: 300px; max-width: 72%; position: static; }
.lend-pag-topo .lend-poke { position: static; width: 150px; height: 150px; }
.lend-pag-topo.so-poke .lend-poke { width: 200px; height: 200px; }
.lend-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 22px; }
.lend-resumo div { background: var(--bg-2); border-radius: 10px; padding: 10px 12px; border-left: 3px solid var(--lend, var(--accent)); }
.lend-resumo dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.lend-resumo dd { margin: 2px 0 0; font-size: 15px; line-height: 1.4; }
.lend-guia { counter-reset: passo; list-style: none; padding: 0; margin: 12px 0 22px; display: grid; gap: 10px; }
.lend-guia li { counter-increment: passo; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px 14px 58px; font-size: 16px; line-height: 1.55; }
.lend-guia li::before { content: counter(passo); position: absolute; top: 14px; left: 16px; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; background: var(--lend, var(--accent)); color: #fff; font: 700 15px/1 var(--display); }
.lend-erros { padding-left: 20px; line-height: 1.65; }
.lend-cmds-p { line-height: 1.9; }
.lend-voltar { margin-top: 24px; }
@media (max-width: 640px) {
  .lend-pag-topo { flex-direction: column; align-items: center; }
  .lend-pag-topo .lend-estr { max-width: 100%; }
  .lend-guia li { padding-left: 52px; font-size: 15px; }
}
@media (max-width: 760px) {
  .lend-grid { grid-template-columns: 1fr; }
  .lend-aves { flex-direction: column; }
  .lend-aves-img img { width: 72px; height: 72px; }
}

/* Lendários em abas por região: respiro entre cartões, seções e textos dentro do painel */
.lend .painel > * + * { margin-top: 40px; }
.lend .painel section { margin-bottom: 0; }
.lend .painel section > h2 { margin-bottom: 8px; }
.lend .painel section > p { margin: 12px 0; }
.lend .painel .lend-grid + p, .lend .painel p + .lend-grid { margin-top: 24px; }
.lend .painel > h2 + .lend-grid { margin-top: 12px; }

/* Mochilas (complemento, /wiki/mochilas/) */
.mochila-galeria { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.mochila-ic { margin: 0; width: 56px; height: 56px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.mochila-ic img { width: 40px; height: 40px; image-rendering: pixelated; }
.mochila-ic figcaption { display: none; }
.mochila-nome { white-space: nowrap; }
.mochila-nome img { width: 24px; height: 24px; image-rendering: pixelated; vertical-align: middle; margin-right: 8px; }

/* Guia da wiki: "Ache qualquer coisa" */
.atalhos-lead { color: var(--muted); margin: 6px 0 16px; }
.atalhos { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .atalhos { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .atalhos { grid-template-columns: repeat(3, 1fr); } }
#atalhos { margin-bottom: 48px; }
.atalho { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; color: var(--text); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.atalho h3 { margin: 0; font-size: 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.atalho h3::after { content: "→"; font-family: var(--ui); color: var(--muted); }
.atalho p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); flex: 1; }
.atalho-dica { font-size: 12.5px; color: var(--muted); opacity: .85; }
.atalho:hover, .atalho:focus-visible { border-color: var(--accent); }
.atalho:hover h3::after, .atalho:focus-visible h3::after { color: var(--accent); }

/* ---------- nota em partes (2.2.0: Luz & Trevas = 5ª geração, Vida & Destruição = 6ª) ---------- */
.release-titulo-duplo .release-titulo-parte { display: block; }
.release-titulo-duplo .release-titulo-parte + .release-titulo-parte { margin-top: 2px; color: var(--muted); }
.release-parte { margin-top: 40px; padding-top: 26px; border-top: 3px solid var(--accent); }
.release-parte-rotulo { font: 600 12px/1 var(--ui); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.release-parte-nome { font-size: clamp(26px, 3vw, 34px); margin: 10px 0 6px; }
.release-parte-abre { color: var(--muted); font-size: 17px; }
.release-parte .group { margin-top: 28px; }
.group h4 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 22px; margin-bottom: 14px; }
.group li ul { list-style: none; padding: 6px 0 0; margin: 0; }
.group li li { border-bottom: 0; padding: 6px 0 6px 20px; font-size: 15px; }
.group li li::before { width: 6px; height: 6px; top: 13px; opacity: .6; }
@media (max-width: 760px) {
  .release-parte { margin-top: 30px; padding-top: 20px; }
  .group h4 { font-size: 19px; }
}
