/* ===================== Rádio Speranza — tema ===================== */
/* Fonte Jost (variável, pesos 400–800) servida pelo próprio site — licença em fonts/OFL.txt */
@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  /* Direção D: noite, tipografia geométrica e faixas de cor (retrofuturismo anos 70) */
  --bg: #0f1317;
  --bg-2: #151a20;
  --panel: #1a2028;
  --panel-2: #222a34;
  --panel-3: #2b3440;
  --text: #f2eee6;
  --muted: #9aa3ad;
  --line: #2a3340;
  --line-2: #3a4553;
  --accent: #f2c230;
  --accent-2: #f6d466;
  --accent-ink: #1b1608;
  --ok: #6db33f;
  --s1: #df5d4a; /* era #d9412b: clareado para 4,5:1 como texto sobre --panel */ --s2: #f08a24; --s3: #f2c230; --s4: #6db33f; --s5: #2a9d8f;
  --comum: #b8bcc4;
  --incomum: #6db33f;
  --rara: #3d8bd4;
  --epica: #ae70d9; /* era #a764d6: 4,5:1 sobre --panel e o fundo do loadout */
  --lendaria: #f2c230;
  --radius: 16px;
  --font: "Jost", system-ui, "Segoe UI", Roboto, sans-serif;
  --display: "Jost", system-ui, sans-serif;
  --shadow: 0 14px 30px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
/* O atributo hidden sempre esconde (regras como .btn{display:inline-flex} venceriam o padrão do navegador) */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  color: var(--text);
  font: 16px/1.55 var(--font);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.5px; }
h1 { margin: 0 0 6px; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -1.2px; }
h2 { margin: 30px 0 12px; font-size: 22px; font-weight: 800; letter-spacing: -.8px; }
h3 { font-weight: 700; }
.lead { color: var(--muted); margin: 0 0 18px; max-width: 70ch; font-size: 16px; }
.hint { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.meta { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.meta a { color: var(--accent-2); text-decoration: none; }
/* ---------- Trilha de navegação (breadcrumbs) ---------- */
.crumbs { max-width: 100%; padding: 10px clamp(16px, 2.5vw, 40px) 0; font-size: 14px; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; min-width: 0; overflow: hidden; white-space: nowrap; }
.crumbs li { display: flex; align-items: center; min-width: 0; flex: 0 1 auto; }
.crumbs li + li::before { content: "›"; padding: 0 6px; color: var(--muted); flex: none; }
.crumbs a, .crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current="page"] span { color: var(--text); font-weight: 600; }
.crumbs li:first-child { flex: none; }
/* no celular, só o nível de cima ("‹ Sucata"): a página atual já está no título logo abaixo */
@media (max-width: 640px) {
  .crumbs { padding: 6px 14px 0; font-size: 14px; }
  .crumbs li { display: none; }
  .crumbs li:nth-last-child(2) { display: flex; flex: 1 1 auto; }
  .crumbs li:nth-last-child(2)::before { content: "‹"; padding: 0 8px 0 0; font-size: 18px; line-height: 1; }
}
.back { display: inline-flex; gap: 6px; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--accent); }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 30px 0; }
/* "Pular para o conteúdo": fora da tela até receber o foco */
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: #111; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
/* capturas que abrem o visualizador: foco visível por dentro da moldura (a figura corta o que passa da borda) */
.shot img[role="button"]:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
/* filtro de quests sem resultado */
.empty-filter { padding: 24px 0; }
.empty-filter .empty { padding: 0 0 12px; }
.q-other { margin-top: 6px; }
/* celular: alvos de toque de pelo menos 40px no "← Seção" e nos links do rodapé */
@media (max-width: 700px) {
  .back { min-height: 40px; align-items: center; }
  footer a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; }
}
.credit { font-size: 12px; color: var(--muted); }
.credit a { color: var(--accent-2); }
.count { font-size: 12px; background: var(--panel-2); color: var(--muted); border-radius: 999px; padding: 1px 8px; vertical-align: middle; font-family: var(--font); font-weight: 600; }
.ico { width: 22px; height: 22px; }

/* ---------- Cabeçalho ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; gap: 16px; align-items: center;
  padding: 10px clamp(16px, 2.5vw, 40px);
  background: rgba(15, 19, 23, .92);
  backdrop-filter: blur(12px);
  border-bottom: 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font); font-weight: 800; font-size: 22px; letter-spacing: -.8px; white-space: nowrap; }
.brand-duck { width: 34px; height: 34px; object-fit: contain; transform: rotate(-12deg); transition: transform .3s; }
.brand:hover .brand-duck { transform: rotate(8deg) scale(1.1); }
.brand-name b { color: var(--s3); font-weight: 800; }
/* selo "no ar" com a luz piscando, como uma rádio transmitindo */
.brand-onair { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; padding: 2px 8px 2px 7px; border-radius: 999px;
  border: 1px solid rgba(217, 65, 43, .5); color: #f08a7a; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; vertical-align: 4px; }
.brand-onair::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--s1); box-shadow: 0 0 8px var(--s1); animation: onair 1.6s ease-in-out infinite; }
@keyframes onair { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .brand-onair::before { animation: none; } }
@media (max-width: 640px) { .brand-onair { display: none; } }
/* busca: o campo e a lista de sugestões ficam juntos (a lista se posiciona pelo .search-wrap) */
.search-wrap { position: relative; flex: 1; max-width: 420px; margin-left: auto; min-width: 0; }
#search {
  width: 100%;
  padding: 9px 14px 9px 36px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 14px;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0a9' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center / 16px;
}
#search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,194,48,.18); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.lang button { background: var(--panel); color: var(--muted); border: 0; padding: 7px 11px; cursor: pointer; font-weight: 700; font-size: 13px; letter-spacing: .5px; }
.lang button + button { border-left: 1px solid var(--line); }
.lang button.on { background: var(--text); color: var(--bg); }
.lang button:not(.on):hover { color: var(--text); }

.tabs {
  position: sticky; top: 57px; z-index: 40;
  display: flex; gap: 2px; padding: 0 clamp(10px, 2vw, 34px) 6px;
  background: rgba(15, 19, 23, .92); backdrop-filter: blur(10px);
  border-bottom: 0; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
/* faixa de cor embaixo das abas (assinatura do tema) */
.tabs::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--s1) 0 20%, var(--s2) 20% 40%, var(--s3) 40% 60%, var(--s4) 60% 80%, var(--s5) 80%); }
.tabs a {
  padding: 10px 12px; text-decoration: none; color: var(--muted); white-space: nowrap;
  font-family: var(--font); font-weight: 500; font-size: 15px; letter-spacing: 0;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--text); }
/* esmaece a borda onde há abas escondidas (a faixa colorida de baixo fica intacta) */
.tabs.fade-r, .tabs.fade-l { -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% calc(100% - 6px), 100% 6px; mask-size: 100% calc(100% - 6px), 100% 6px;
  -webkit-mask-position: top, bottom; mask-position: top, bottom; }
.tabs.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent), linear-gradient(#000, #000); mask-image: linear-gradient(90deg, #000 82%, transparent), linear-gradient(#000, #000); }
.tabs.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%), linear-gradient(#000, #000); mask-image: linear-gradient(90deg, transparent, #000 18%), linear-gradient(#000, #000); }
.tabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(#000, #000); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(#000, #000); }

main { width: 100%; padding: 26px clamp(16px, 2.5vw, 40px) 60px; overflow-x: clip; }
/* ---------- Planejador ---------- */
/* desktop: passos à esquerda, resumo + lista à direita; celular: resumo, passos, lista, backup (ver @media) */
.pl-root { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 20px 24px; align-items: start; }
.pl-col { display: grid; gap: 14px; min-width: 0; }
.pl-root h2 { margin: 0; font-family: var(--font); font-size: 17px; font-weight: 700; letter-spacing: 0; }
.pl-root button:focus-visible, .pl-root input:focus-visible, .pl-root summary:focus-visible, .pl-root a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-step, .pl-res, .pl-more { background: var(--panel); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.pl-step .hint { margin: 8px 0 10px; }
.pl-step-h { display: flex; align-items: center; gap: 10px; }
.pl-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--s4); color: var(--bg); font-size: 14px; font-weight: 800; flex: none; }
details.pl-step > summary { list-style: none; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 40px; }
details.pl-step > summary::-webkit-details-marker { display: none; }
details.pl-step > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
details.pl-step:not([open]) > summary::after { content: "▸"; }
.pl-meta { color: var(--muted); font-size: 13px; font-weight: 500; }
.pl-meta.warn { color: var(--s2); }
/* passo 1: fontes como botões grandes */
.pl-src { display: grid; gap: 8px; }
.pl-src-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pl-src-btn:hover { border-color: var(--muted); }
.pl-src-btn .tick { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-2); display: inline-grid; place-items: center; flex: none; font-size: 14px; font-weight: 800; }
.pl-src-btn[aria-pressed="true"] { border-color: var(--s4); background: rgba(109, 179, 63, .12); }
.pl-src-btn[aria-pressed="true"] .tick { background: var(--s4); border-color: var(--s4); color: var(--bg); }
.pl-src-btn b { display: block; font-size: 15px; }
.pl-src-btn small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.pl-seg { display: flex; gap: 6px; margin: -2px 0 2px 36px; padding: 0; border: 0; min-width: 0; }
.pl-seg label { flex: 1; min-height: 40px; display: grid; place-items: center; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 13.5px; cursor: pointer; text-align: center; }
.pl-seg label.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
/* botões − valor + */
.pl-stepper { display: inline-flex; align-items: center; flex: none; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); }
.pl-stepper button { width: 40px; height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--text); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; flex: none; }
.pl-stepper button:hover { background: var(--panel-3); }
.pl-stepper button[aria-disabled="true"] { color: var(--line-2); cursor: default; background: transparent; }
.pl-stepper input { width: 56px; height: 40px; padding: 0 4px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-weight: 700; font-size: 15px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.pl-stepper input::-webkit-outer-spin-button, .pl-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pl-stepper input::placeholder { color: var(--muted); }
.pl-val { min-width: 96px; padding: 0 4px; text-align: center; font-weight: 600; font-size: 14px; }
/* passo 2: bancadas */
.pl-bench { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.pl-bench:first-child { border-top: 0; padding-top: 0; }
.pl-bench-name { font-weight: 600; font-size: 14.5px; min-width: 0; }
.pl-bench-name small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.pl-bench.max .pl-bench-name small { color: var(--s4); }
/* passo 3: projetos */
.pl-proj { display: grid; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.pl-proj:first-child { border-top: 0; }
.pl-proj > label { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.pl-proj input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--s4); flex: none; }
.pl-proj:not(.on) > label { color: var(--muted); font-weight: 500; }
.pl-proj .pl-stepper { margin: 0 0 4px 30px; justify-self: start; }
/* resumo */
.pl-sum { position: relative; background: var(--panel); border-radius: 16px; padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: center; border-left: 6px solid var(--s2); }
.pl-sum.done { border-left-color: var(--s4); }
.pl-sum.none, .pl-sum.nothing { border-left-color: var(--line-2); }
.pl-big { font-family: var(--display); font-size: 52px; line-height: 1; font-weight: 800; color: var(--s2); }
.pl-sum.done .pl-big { color: var(--s4); }
.pl-sum.none .pl-big, .pl-sum.nothing .pl-big { color: var(--muted); }
.pl-sum-txt b { display: block; font-size: 19px; line-height: 1.2; }
.pl-sum-txt span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.pl-sum-bar { grid-column: 1 / -1; margin-top: 6px; }
.pl-sum-bar .pbar { margin: 0 0 6px; }
.pl-sum-bar > span { color: var(--muted); font-size: 13px; }
.pl-golist { display: none; }
/* lista */
.pl-res:focus { outline: none; }
.pl-res-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.pl-search { flex: 1 1 220px; min-width: 0; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; }
.pl-search::placeholder { color: var(--muted); }
.pl-tools .chip { min-height: 42px; display: inline-flex; align-items: center; cursor: pointer; }
.pl-list { list-style: none; margin: 0; padding: 0; }
.pl-head-row, .pl-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 140px 76px; gap: 12px; align-items: center; }
.pl-head-row { padding: 0 4px 8px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--line); }
.pl-head-row span:not(:first-child) { text-align: center; }
.pl-row { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.pl-row[hidden] { display: none; }
.pl-list .pl-row:last-child { border-bottom: 0; }
.pl-row-item { min-width: 0; }
.pl-cell { text-align: center; }
.pl-lbl { display: none; }
.pl-need b { font-size: 16px; }
.pl-miss b { font-size: 18px; color: var(--s2); }
.pl-row.ok .pl-miss b { color: var(--s4); }
.pl-row.ok .pl-name { color: var(--muted); }
.pl-item { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; text-decoration: none; font-weight: 600; color: var(--text); }
.pl-item:hover .pl-name { text-decoration: underline; }
.pl-img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: var(--bg-2); flex: none; }
.pl-img.ph { display: inline-grid; place-items: center; color: var(--muted); }
.pl-for { margin: 2px 0 0 52px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pl-for summary { cursor: pointer; }
.pl-for ul { margin: 4px 0 0; padding-left: 16px; }
.pl-empty { text-align: center; color: var(--muted); padding: 28px 12px; margin: 0; }
/* backup e estoque: discreto */
.pl-more { padding: 10px 16px; }
.pl-more > summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.pl-more[open] > summary { margin-bottom: 6px; }
.pl-more-btns { display: grid; gap: 8px; }
.pl-more .btn { width: 100%; justify-content: center; text-align: center; }
.pl-clear-h { margin: 14px 0 0; }
.pl-more .pl-clear { display: inline-flex; align-items: center; min-height: 40px; padding: 0; text-align: left; }
.pl-more .pl-wipe { color: var(--s2); }
.pl-import:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
/* escondido na tela, mas ainda alcançável pelo teclado e por leitores de tela */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
label:has(> .sr-only:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.filters label.chip { cursor: pointer; }
@media (max-width: 900px) {
  /* uma coluna: resumo primeiro, depois os passos, a lista e o backup no fim */
  .pl-root { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
  .pl-col { display: contents; }
  .pl-sum { order: 1; } .pl-step { order: 2; } .pl-res { order: 3; } .pl-more { order: 4; }
  .pl-golist { display: inline-block; grid-column: 1 / -1; justify-self: start; min-height: 40px; padding: 8px 0 0; font-size: 14px; }
  /* alvo de toque de 40px para "Para: … e mais N" */
  .pl-for summary { min-height: 40px; padding: 10px 0; box-sizing: border-box; }
}
@media (max-width: 640px) {
  .pl-step, .pl-res { padding: 14px 12px; }
  .pl-big { font-size: 44px; }
  .pl-head-row { display: none; }
  .pl-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "item item item" "need have miss"; gap: 8px; padding: 12px 2px; }
  .pl-row-item { grid-area: item; }
  .pl-need { grid-area: need; } .pl-have { grid-area: have; } .pl-miss { grid-area: miss; }
  .pl-lbl { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
  .pl-stepper input { width: 52px; }
  .pl-seg { margin-left: 0; }
  .pl-tools .chip { flex: 1 1 auto; justify-content: center; }
}
.badge.bonus { background: rgba(255, 200, 60, .14); color: #ffd36b; border-color: rgba(255, 200, 60, .35); }
.items.bonus .item { border-color: rgba(255, 200, 60, .35); }
.orig { color: var(--muted); font-size: 12px; margin: -2px 0 6px; font-style: italic; }
.orig.big { font-size: 14px; margin: -2px 0 10px; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px; border-top: 1px solid var(--line); background: var(--bg-2); }
footer a { color: var(--accent-2); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 2px solid var(--text);
  background: transparent; color: var(--text); text-decoration: none; cursor: pointer;
  font-weight: 700; font-size: 14px; transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--text); background: rgba(242, 238, 230, .08); transform: translateY(-1px); }
.btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.primary:hover { background: #fff; }
.btn.full { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 6px 0 0; text-decoration: underline; }
.linkbtn:hover { color: var(--text); }

/* ---------- Página inicial ---------- */
.kicker { display: inline-block; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.stats { font-size: 13px; color: var(--muted); }
.sec-title { display: flex; align-items: center; gap: 10px; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile {
  position: relative; overflow: hidden; display: block; align-items: center; gap: 14px; padding: 18px 18px 18px 22px; min-height: 136px; text-decoration: none;
  background: var(--panel); border: 0; border-radius: 16px; clip-path: none; transition: transform .2s;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c, var(--s3)); }
.tile:hover { transform: translateY(-3px); border: 0; }
.tile-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(242,194,48,.12); color: var(--accent); flex: none; }
.tile-ico .ico { width: 24px; height: 24px; }
.tile-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tile-text b { font-family: var(--display); font-size: 19px; font-weight: 700; }
.tile-text small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.tile-count { font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--accent); }

.page-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; padding-left: 16px; border-left: 6px solid var(--c, var(--s3)); }
.page-ico { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 0; background: none; color: var(--accent); flex: none; margin-top: 2px; }
.page-ico .ico { width: 28px; height: 28px; }
.page-ico:empty { display: none; }

/* ---------- Filtros ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.f-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-right: 4px; }
@media (max-width: 640px) { .f-label { flex-basis: 100%; margin: 4px 0 -2px; } }
.chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  padding: 6px 13px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--line-2); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip.on .count { background: rgba(15, 19, 23, .15); color: var(--bg); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  background: var(--panel); border: 0; border-radius: 16px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--line-2); z-index: 1; }
.card:hover { transform: translateY(-3px); border: 0; box-shadow: var(--shadow); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card h3 { margin: 2px 0 2px; font-size: 20px; line-height: 1.15; font-weight: 700; letter-spacing: -.4px; }
.card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0b0d10; transition: transform .35s; }
.card:hover .thumb { transform: scale(1.04); }
.card .thumb.contain { object-fit: contain; padding: 12px; background: radial-gradient(circle at 50% 60%, #26303b, #141a20 75%); }
.card:hover .thumb.contain { transform: scale(1.06); }
.card .avatar { display: block; width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin: 16px 16px 0; background: var(--panel-2); border: 2px solid var(--line-2); }
.r-comum::before { background: var(--comum); } .r-incomum::before { background: var(--incomum); }
.r-rara::before { background: var(--rara); } .r-epica::before { background: var(--epica); }
.r-lendaria::before { background: var(--lendaria); } .r-accent::before { background: var(--accent); }
.card.r-comum::before { background: var(--comum); } .card.r-incomum::before { background: var(--incomum); } .card.r-rara::before { background: var(--rara); }
.card.r-epica::before { background: var(--epica); } .card.r-lendaria::before { background: var(--lendaria); }
.card.r-accent::before { background: var(--s3); }
.qcard::before { background: var(--s5); }
.qcard.st-inprogress::before { background: var(--s3); }
.t-comum { color: var(--comum); } .t-incomum { color: var(--incomum); } .t-rara { color: var(--rara); }
.t-epica { color: var(--epica); } .t-lendaria { color: var(--lendaria); }
.threat { color: var(--accent); letter-spacing: 2px; }
.threat .off { color: var(--line-2); }

.qcard-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.qcard.st-done { opacity: .72; }
.qcard.st-done::before { background: var(--s4); }
.qcard.st-done:hover { opacity: 1; }
.qcard-done {
  position: absolute; top: 10px; right: 10px; z-index: 2; padding: 3px 9px; border-radius: 999px;
  background: var(--ok); color: #06240f; font-size: 12px; font-weight: 700;
}
.badge {
  display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 9px; border-radius: 999px; color: #1b1405; background: var(--lendaria); font-weight: 700;
}
.badge.ok { background: var(--ok); color: #06240f; }
.pbar { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; margin-top: 10px; }
.pbar span { display: block; height: 100%; background: var(--s3); border-radius: 99px; transition: width .3s; }
.pbar.big { height: 9px; margin: 6px 0 8px; }
.qcard.st-done .pbar span, .progress-block .pbar span { background: var(--s4); }

/* ---------- Artigos (armas, ARC, mapas, comerciantes, builds) ---------- */
.article { background: var(--panel); border: 0; border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.article > p, .article .bullets { max-width: 90ch; }
.hero { margin: -24px -24px 20px; border-radius: 16px 16px 0 0; overflow: hidden; background: #0b0d10; }
.hero img { display: block; width: 100%; max-height: 560px; object-fit: cover; cursor: zoom-in; aspect-ratio: auto 16 / 9; /* reserva a altura até carregar */ }
/* destaque com imagem pequena (ex.: 512×256): no máximo o tamanho real, centralizada (--nw vem do app.js) */
.hero img.hero-small { max-width: min(100%, var(--nw)); margin: 0 auto; }
.hero.contain img.hero-small { max-width: min(100%, calc(var(--nw) + 56px)); }
.hero.contain img { object-fit: contain; padding: 28px; background: radial-gradient(circle at 50% 60%, #26303b, #141a20 75%); }
/* imagens pequenas: mostradas no tamanho real (sem esticar e borrar), centralizadas */
.hero.natural img { width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }
.map-full img { width: 100%; max-height: 80vh; object-fit: contain; background: #0b0d10; }
.map-full + .map-full { margin-top: 16px; }
.hero.portrait { background: none; margin: 0 0 12px; border-radius: 0; }
.hero.portrait img { width: 132px; height: 132px; border-radius: 50%; border: 3px solid var(--accent); }
.hero figcaption, .hero .credit { padding: 6px 14px; }
.hero.portrait figcaption { padding: 6px 0 0; }
.infobox { width: 100%; border-collapse: collapse; margin-top: 14px; border-radius: 12px; }
.infobox th, .infobox td { text-align: left; padding: 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
.infobox th { color: var(--muted); font-weight: 500; width: 40%; }
.craft-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.bullets { margin: 0; padding-left: 20px; }
.bullets li { margin-bottom: 5px; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Quest: cabeçalho ---------- */
.q-hero {
  position: relative; margin: 0 0 22px; border-radius: 18px; overflow: hidden; border: 0;
  min-height: 260px; display: flex; align-items: flex-end; background: #0b0d10; box-shadow: var(--shadow);
}
.q-hero .q-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-height: none; cursor: zoom-in; }
.q-hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; z-index: 2;
  background: linear-gradient(90deg, var(--s1) 0 20%, var(--s2) 20% 40%, var(--s3) 40% 60%, var(--s4) 60% 80%, var(--s5) 80%); }
.q-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,12,15,.97) 0%, rgba(10,12,15,.6) 45%, rgba(10,12,15,.05) 100%); pointer-events: none; }
.q-hero-in { position: relative; z-index: 1; padding: 26px 30px; pointer-events: none; }
.q-hero-in a, .q-hero-in .badge { pointer-events: auto; }
.q-hero h1 { font-size: clamp(34px, 4vw, 54px); letter-spacing: -1.5px; margin: 4px 0 8px; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.q-badges { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Quest: layout em duas colunas ---------- */
.q-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.q-main { min-width: 0; }
.q-lead { font-size: 17px; color: #c9ccd2; }
.callout {
  margin: 0 0 18px; padding: 10px 14px; border-radius: 14px; font-size: 14px;
  background: rgba(255, 178, 46, .1); border: 1px solid rgba(255, 178, 46, .35); color: #ffd58a;
}
.q-side { position: sticky; top: 118px; display: flex; flex-direction: column; gap: 12px; }
.side-block { background: var(--panel); border: 0; border-radius: 16px; padding: 14px 16px; }
.side-block h3 { margin: 0 0 10px; font-family: var(--font); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.side-trader { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 16px; }
.side-trader:hover b { color: var(--accent); }
.avatar-sm { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-2); }

/* ---------- Quest: passos ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: none; }
.step {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 14px; background: var(--panel); border: 1px solid transparent; border-radius: 16px;
  transition: border-color .2s, background .2s, opacity .2s;
}
.step:hover { border-color: var(--line-2); }
.step-check {
  position: relative; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--accent); background: transparent; color: var(--accent);
  font-family: var(--font); font-weight: 800; font-size: 18px; display: grid; place-items: center;
  transition: background .15s, transform .15s;
}
.step-check:hover { transform: scale(1.06); background: rgba(242,194,48,.12); }
.step-check .ok { display: none; }
.step.done .step-check { background: var(--ok); border-color: var(--ok); color: #06240f; }
.step.done .step-check .n { display: none; }
.step.done .step-check .ok { display: inline; }
.step.done { background: rgba(109, 179, 63, .07); border-color: rgba(109, 179, 63, .35); }
.step.done .step-text { color: var(--muted); }
.step-text { margin: 8px 0 0; font-size: 15.5px; }
.step-body { min-width: 0; display: grid; gap: 12px; }
/* passo com imagem: texto à esquerda, imagem grande à direita */
@media (min-width: 1100px) {
  .step.has-img .step-body { grid-template-columns: minmax(200px, .8fr) minmax(0, 1.6fr); align-items: start; }
}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.qnavs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.qnav {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s;
}
.qnav:hover { border-color: var(--accent); }
.qnav small { color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; font-weight: 600; }
.qnav b { font-family: var(--display); font-size: 18px; }
.qnav.prev small::before { content: "← "; }
.qnav.next { text-align: right; }
.qnav.next small::after { content: " →"; }

/* ---------- Capturas ---------- */
.shot { position: relative; margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0b0d10; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: auto 16 / 9; cursor: zoom-in; transition: transform .3s, filter .3s; }
.shot:hover img { filter: brightness(1.08); }
.shot .placeholder { display: none; }
.shot.missing img { display: none; }
.shot.missing .placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  aspect-ratio: 16 / 9; color: var(--muted); font-size: 13px; text-align: center; padding: 12px;
  background: repeating-linear-gradient(45deg, var(--panel), var(--panel) 12px, var(--panel-2) 12px, var(--panel-2) 24px);
}
.shot .placeholder span { font-size: 26px; }
.shot code { color: var(--accent); word-break: break-all; }
.shot figcaption { padding: 8px 12px; font-size: 13px; color: #c9ccd2; border-top: 1px solid var(--line); background: var(--bg-2); }
.shot figcaption .credit { display: block; margin-top: 2px; opacity: .8; }
.shot:not(.missing)::after {
  content: attr(data-zoom); position: absolute; top: 10px; right: 10px; padding: 5px 10px; border-radius: 7px;
  font-size: 12px; font-weight: 700; background: rgba(0,0,0,.7); color: #fff; pointer-events: none;
  opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s;
}
.shot:hover::after { opacity: 1; transform: none; }

/* ---------- Itens (chips com ícone) ---------- */
.items { display: flex; flex-wrap: wrap; gap: 8px; }
.items.col { flex-direction: column; flex-wrap: nowrap; }
.item {
  display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; font-size: 14px; text-decoration: none;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s;
}
a.item:hover { border-color: var(--accent); }
.item-img { width: 38px; height: 38px; flex: none; object-fit: contain; background: #111317; border-radius: 8px; }
.item-img.ph { display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.ph { display: inline-grid; place-items: center; background: var(--panel-2); color: var(--muted); font-weight: 700; }

/* ---------- Loadout (builds) ---------- */
.loadout { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: linear-gradient(160deg, #20242b, #15171b); border: 1px solid var(--line); }
.loadout-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.loadout-row.quick { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.slot { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 9px; text-decoration: none; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-left: 4px solid var(--line-2); overflow: hidden; }
.slot.big { min-height: 128px; justify-content: flex-end; }
a.slot:hover { background: rgba(255,255,255,.07); }
.slot.aug { border-left-color: var(--accent); } .slot.shield { border-left-color: var(--rara); }
.slot.r-comum { border-left-color: var(--comum); } .slot.r-incomum { border-left-color: var(--incomum); }
.slot.r-rara { border-left-color: var(--rara); } .slot.r-epica { border-left-color: var(--epica); } .slot.r-lendaria { border-left-color: var(--lendaria); }
.slot::before { display: none; }
.slot-img { position: absolute; inset: 6px 6px 44px; width: calc(100% - 12px); height: calc(100% - 50px); object-fit: contain; opacity: .9; }
.slot-label { position: relative; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; }
.slot-name { position: relative; font-weight: 700; }
.slot-sub { position: relative; font-size: 12px; }
.slot.small .slot-name { font-weight: 500; font-size: 14px; }
.mini-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mini { position: relative; font-size: 12px; padding: 3px 8px 3px 10px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.mini::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-2); }

/* ===================== Explorador de materiais ===================== */
.picker { position: relative; max-width: 600px; margin: 0 0 18px; }
#mat-search {
  width: 100%; padding: 12px 14px; font-size: 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font-family: inherit;
}
#mat-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,194,48,.18); }
.suggest { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 420px; overflow-y: auto; }
.sug { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none; }
.sug:hover, .sug.on { background: var(--panel-2); }
.sug small { margin-left: auto; color: var(--muted); font-size: 12px; }
.sug.none { color: var(--muted); }
.sug-img { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; background: #111317; }

.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.mat {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; text-align: center;
  background: var(--panel); border: 0; border-radius: 14px; text-decoration: none; font-size: 13px;
  transition: transform .15s, border-color .15s;
}
.mat::before { content: ""; position: absolute; left: 0; right: auto; top: 0; bottom: 0; width: 5px; height: auto; border-radius: 0; background: var(--line-2); }
.mat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mat-img { width: 64px; height: 64px; object-fit: contain; }
.mat .mat-img.ph { border-radius: 10px; font-size: 22px; }
.mat.r-comum::before { background: var(--comum); } .mat.r-incomum::before { background: var(--incomum); }
.mat.r-rara::before { background: var(--rara); } .mat.r-epica::before { background: var(--epica); } .mat.r-lendaria::before { background: var(--lendaria); }

/* Família de variantes: card "empilhado" que abre uma árvore interna */
.mat.fam { font: inherit; font-size: 13px; color: var(--text); cursor: pointer; box-shadow: 4px 4px 0 -1px var(--bg), 4px 4px 0 0 var(--panel-2), 8px 8px 0 -1px var(--bg), 8px 8px 0 0 var(--panel-3); border: 0; margin: 0 8px 8px 0; }
.mat.fam.open { border-color: var(--accent); outline: 2px solid var(--s3); }
.fam-n { font-size: 11px; color: var(--s3); font-weight: 700; }
.mat.fam.open .fam-n::after { content: " ▴"; }
.mat.fam:not(.open) .fam-n::after { content: " ▾"; }
.fam-tree { grid-column: 1 / -1; position: relative; background: var(--bg-2); border: 0; outline: 2px solid var(--s3); border-radius: 16px; padding: 16px 18px; animation: famIn .18s ease-out; }
@keyframes famIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.fam-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; }
.fam-close:hover { color: var(--text); }
/* árvore com linhas de ligação */
.fam-tree ul { list-style: none; margin: 0; padding: 0; }
.fam-tree ul ul { position: relative; margin-left: 22px; padding-left: 22px; }
.fam-tree ul ul::before { content: ""; position: absolute; left: 0; top: 0; bottom: 18px; border-left: 2px solid var(--line-2); }
.fam-tree ul ul > li { position: relative; padding: 5px 0; }
.fam-tree ul ul > li::before { content: ""; position: absolute; left: -22px; top: 23px; width: 18px; border-top: 2px solid var(--line-2); }
.fam-root { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 20px; padding: 4px 0; }
.fam-branch { display: inline-block; margin-top: 4px; font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; padding: 8px 0 2px; }
.fam-tree li > ul > li > ul { display: flex; flex-wrap: wrap; gap: 8px; }
.fam-tree li > ul > li > ul > li { padding: 0; }
.fam-tree li > ul > li > ul > li::before { display: none; }
.fam-tree li > ul > li > ul::before { bottom: 0; }
.fam-leaf { display: inline-flex; align-items: center; gap: 10px; min-width: 220px; padding: 6px 12px 6px 6px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line-2); text-decoration: none; }
.fam-leaf:hover { border-color: var(--accent); }
.fam-leaf.r-comum { border-left-color: var(--comum); } .fam-leaf.r-incomum { border-left-color: var(--incomum); } .fam-leaf.r-rara { border-left-color: var(--rara); }
.fam-leaf.r-epica { border-left-color: var(--epica); } .fam-leaf.r-lendaria { border-left-color: var(--lendaria); }
/* barra de variantes na página do item */
.variants { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.variants-t { width: 100%; font-size: 12px; color: var(--muted); }
.vchip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; font-size: 13px; font-weight: 600; }
.vchip:hover { border-color: var(--line-2); }
.vchip.on { background: var(--text); border-color: var(--text); color: var(--bg); }

.graph { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) minmax(0, 1fr); gap: 0 72px; align-items: start; margin-top: 8px; }
.graph-lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 0; }
.graph-lines path { fill: none; stroke-width: 1.5; opacity: .5; }
.graph-lines .ln-left { stroke: var(--rara); }
.graph-lines .ln-right { stroke: var(--accent); }
.col { position: relative; z-index: 1; min-width: 0; }
.col-title { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.col-left .col-title, .col-left .hint, .col-left .empty-col { text-align: right; }
.col-center { position: sticky; top: 118px; }
.empty-col { color: var(--muted); font-size: 14px; padding: 20px 0; }
.center-card { background: var(--panel); border: 0; border-top: 6px solid var(--s3); border-radius: 18px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.center-card.r-comum { border-top-color: var(--comum); } .center-card.r-incomum { border-top-color: var(--incomum); }
.center-card.r-rara { border-top-color: var(--rara); } .center-card.r-epica { border-top-color: var(--epica); } .center-card.r-lendaria { border-top-color: var(--lendaria); }
.center-card::before { display: none; }
.center-img { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 6px; display: block; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.center-img.ph { border-radius: 12px; font-size: 40px; }
.center-card h1 { font-size: 28px; margin: 4px 0; }
.center-meta { display: flex; justify-content: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.center-card .infobox { margin-top: 10px; font-size: 14px; text-align: left; }
.wiki-link { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--accent-2); }
.tree-btn { display: block; margin-top: 12px; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: 14px; background: var(--accent); color: var(--accent-ink); }
.tree-btn:hover { background: var(--accent-2); }
.group { margin-bottom: 18px; }
.group h4 { margin: 0 0 2px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.col-left .group h4 { justify-content: flex-end; }
.nodes { display: flex; flex-direction: column; gap: 6px; }
.node { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; transition: background .15s, border-color .15s; }
a.node:hover { background: var(--panel-2); border-color: var(--accent); }
.col-left .node { flex-direction: row-reverse; padding: 6px 6px 6px 10px; text-align: right; }
.node-img { width: 38px; height: 38px; flex: none; object-fit: contain; border-radius: 8px; background: #111317; }
.node-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.node-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-qty { flex: none; font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.node.r-comum .node-img { box-shadow: inset 0 -3px 0 var(--comum); } .node.r-incomum .node-img { box-shadow: inset 0 -3px 0 var(--incomum); }
.node.r-rara .node-img { box-shadow: inset 0 -3px 0 var(--rara); } .node.r-epica .node-img { box-shadow: inset 0 -3px 0 var(--epica); }
.node.r-lendaria .node-img { box-shadow: inset 0 -3px 0 var(--lendaria); }
.node::before { display: none; }
.tagnode .node-img { font-size: 16px; color: var(--accent); }
.more { margin-top: 6px; background: none; border: 1px dashed var(--line); color: var(--muted); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; width: 100%; }
.more:hover { color: var(--text); border-color: var(--accent); }

/* ===================== Árvore ===================== */
.tree-head { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.tree-title { display: flex; align-items: center; gap: 14px; }
.tree-title h1 { margin: 0; }
.tree-title-img { width: 76px; height: 76px; object-fit: contain; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.tree-title .ph { font-size: 28px; }
.tree-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg-btn { background: var(--panel); color: var(--text); border: 1px solid var(--line); padding: 8px 12px; font-size: 14px; cursor: pointer; border-radius: 9px; }
.seg .seg-btn { border: 0; border-radius: 0; }
.seg-btn.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.seg-btn:disabled { opacity: .4; cursor: not-allowed; }
.qty-ctl { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.qty-ctl input { width: 76px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; }
.tree-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.tree-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 14px 6px; overflow-x: auto; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 26px; }
.tree li { position: relative; padding: 4px 0 4px 18px; }
.tree.root > li { padding-left: 8px; }
.tree ul > li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--line-2); }
.tree ul > li:last-child::before { bottom: auto; height: 27px; }
.tree ul > li::after { content: ""; position: absolute; left: 0; top: 27px; width: 16px; border-top: 2px solid var(--line-2); }
.tree details > summary { list-style: none; cursor: pointer; }
.tree details > summary::-webkit-details-marker { display: none; }
.tnode { position: relative; display: inline-flex; align-items: center; gap: 10px; min-width: 270px; max-width: 100%; padding: 6px 10px 6px 6px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--line-2); }
.tnode.has-kids::before { content: "▾"; position: absolute; left: -17px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
details:not([open]) > summary .tnode.has-kids::before { content: "▸"; }
details:not([open]) > summary .tnode { border-style: dashed; }
.tnode.r-comum { border-left-color: var(--comum); } .tnode.r-incomum { border-left-color: var(--incomum); }
.tnode.r-rara { border-left-color: var(--rara); } .tnode.r-epica { border-left-color: var(--epica); } .tnode.r-lendaria { border-left-color: var(--lendaria); }
.tnode.leaf { background: var(--panel-2); }
.tnode-img { width: 40px; height: 40px; flex: none; object-fit: contain; border-radius: 8px; background: #111317; }
.tnode-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tnode-name { font-weight: 600; font-size: 14px; text-decoration: none; }
.tnode-name:hover { color: var(--accent); text-decoration: underline; }
.tnode-sub { font-size: 12px; color: var(--muted); }
.tnode-qty { font-weight: 800; color: var(--accent); white-space: nowrap; font-size: 15px; }
.tnode-go { text-decoration: none; font-size: 15px; opacity: .7; }
.tnode-go:hover { opacity: 1; }
.alt-recipe { margin-top: 4px; max-width: 240px; font-size: 12px; padding: 3px 6px; border-radius: 6px; background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.totals { position: sticky; top: 118px; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 14px; padding: 16px; }
.totals h3 { margin: 0 0 2px; font-size: 18px; }
.totals-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.totals-list a { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 6px; border-radius: 8px; }
.totals-list a:hover { background: var(--panel-2); }
.totals-list span { flex: 1; font-size: 14px; }
.totals-list b { color: var(--accent); }
.tot-img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; background: #111317; }
.totals-value { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.totals-value b { color: var(--text); }

/* ===================== Visualizador de imagens ===================== */
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 1000; background: #060709; }
.lb[hidden] { display: none; }
.lb-stage {
  position: absolute; inset: 58px 0 150px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none; user-select: none; cursor: zoom-in;
}
.lb.no-thumbs .lb-stage { inset: 58px 0 72px; }
.lb-stage.zoomed { cursor: grab; }
.lb-stage.zoomed:active { cursor: grabbing; }
.lb-img {
  max-width: calc(100vw - 140px); max-height: 100%; object-fit: contain; transform-origin: center center;
  will-change: transform; box-shadow: 0 10px 50px rgba(0,0,0,.6); border-radius: 4px; transition: opacity .18s ease;
}
.lb-img.fading { opacity: 0; }
.lb-img.smooth { transition: opacity .18s ease, transform .2s ease; }
.lb-top { position: absolute; top: 0; left: 0; right: 0; height: 58px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #ddd; z-index: 4; background: linear-gradient(rgba(6,7,9,.96), rgba(6,7,9,.7)); }
.lb-counter { font-family: var(--display); font-weight: 700; font-size: 17px; color: #bbb; min-width: 60px; letter-spacing: 1px; }
.lb-tools { display: flex; align-items: center; gap: 6px; }
.lb-zoom { font-size: 13px; color: #bbb; min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.lb-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid #333; background: rgba(30,32,38,.92); color: #eee; font-size: 20px; line-height: 1; cursor: pointer; text-decoration: none; }
.lb-btn.lb-txt { font-size: 13px; font-weight: 700; }
.lb-btn:hover, .lb-btn.on { border-color: var(--s3); color: #fff; }
.lb-btn.on { background: rgba(242,194,48,.18); }
.lb-btn[hidden] { display: none; }
.lb-prev, .lb-next { position: absolute; top: calc(50% - 46px); width: 52px; height: 72px; font-size: 36px; z-index: 3; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 12px 8px; background: linear-gradient(rgba(6,7,9,0), rgba(6,7,9,.96) 30%); }
.lb-cap { text-align: center; color: #ddd; font-size: 14px; min-height: 20px; max-width: 900px; }
.lb-cap span { background: rgba(20,22,27,.85); padding: 4px 12px; border-radius: 7px; }
.lb-cap a { color: var(--accent-2); }
.lb-cap .credit { display: inline; margin-left: 8px; opacity: .7; }
.lb-strip { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; }
.lb.no-thumbs .lb-strip { display: none; }
.lb-strip button { flex: none; width: 104px; height: 60px; padding: 0; border-radius: 7px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: #15171b; opacity: .55; transition: opacity .15s, border-color .15s, transform .15s; }
.lb-strip button:hover { opacity: .9; }
.lb-strip button.on { border-color: var(--s3); opacity: 1; transform: translateY(-2px); }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-hint { color: #757b83; font-size: 11.5px; text-align: center; }
.lb-loading { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); z-index: 5; background: rgba(0,0,0,.75); color: #eee; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; }
.lb-loading[hidden] { display: none; }

/* ===================== Responsivo ===================== */
@media (max-width: 1100px) {
  .q-layout { grid-template-columns: 1fr; }
  .q-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 900px) {
  .graph { grid-template-columns: 1fr; gap: 18px; }
  .col-center { position: static; order: -1; }
  .col-left .node { flex-direction: row; text-align: left; padding: 6px 10px 6px 6px; }
  .col-left .col-title, .col-left .hint, .col-left .empty-col { text-align: left; }
  .col-left .group h4 { justify-content: flex-start; }
  .tree-layout { grid-template-columns: 1fr; }
  .totals { position: static; order: -1; }
  .tnode { min-width: 0; }
  .tree ul { margin-left: 14px; }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 10px; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .lang { margin-left: auto; }
  .tabs { top: 103px; }
  main { padding: 18px 14px 50px; }
  h1 { font-size: 28px; }
  .q-hero-in { padding: 18px; }
  .proscons, .loadout-row, .qnavs { grid-template-columns: 1fr; }
  .step { grid-template-columns: 36px minmax(0, 1fr); padding: 12px; gap: 10px; }
  .step-check { width: 34px; height: 34px; font-size: 16px; }
  .lb-hint, .lb-zoom { display: none; }
  .lb-img { max-width: calc(100vw - 16px); }
  .lb-prev, .lb-next { width: 38px; height: 56px; font-size: 28px; }
  .lb-strip button { width: 78px; height: 46px; }
  .lb-stage { inset: 58px 0 120px; }
}

/* ===================== Tema: faixas espaciais + bugigangas =====================
   (antes em theme-d.css; fica no fim para manter a mesma ordem da cascata) */

/* faixas de cor (assinatura do tema) */
.stripes { display: flex; height: 6px; }
.stripes i { flex: 1; }
.stripes i:nth-child(1) { background: var(--s1); } .stripes i:nth-child(2) { background: var(--s2); } .stripes i:nth-child(3) { background: var(--s3); }
.stripes i:nth-child(4) { background: var(--s4); } .stripes i:nth-child(5) { background: var(--s5); }
.stripes.v { flex-direction: column; width: 6px; height: auto; }

/* ---------- Cabeçalho de página com bugiganga ---------- */
.page-tk { width: 74px; height: 74px; object-fit: contain; transform: rotate(-8deg); filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); }
.page-head h1 { font-size: clamp(32px, 3.4vw, 46px); }

/* títulos de seção (página inicial) */
.sec { display: flex; align-items: center; gap: 14px; margin: 42px 0 16px; }
.sec-img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.sec h2 { margin: 0; font-size: 28px; }
.sec-rule { flex: 1; height: 2px; background: linear-gradient(90deg, var(--line-2), transparent); }
.sec-link { color: var(--muted); font-size: 14px; text-decoration: none; }
.sec-link:hover { color: var(--text); }


/* ---------- Página inicial ---------- */
.hero2 { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; align-items: center; padding: 34px 0 20px; isolation: isolate; }
.hero2 .kicker { font-family: var(--font); font-size: 13px; letter-spacing: 3px; color: var(--s3); font-weight: 600; }
.hero2 h1 { font-size: clamp(34px, 3.7vw, 68px); line-height: 1; letter-spacing: -2px; margin: 12px 0 18px; text-wrap: balance; }
.hero2 h1 em { font-style: normal; background: linear-gradient(90deg, var(--s1), var(--s2) 30%, var(--s3) 55%, var(--s4) 78%, var(--s5)); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* terceira batida do título: menor, como um aviso no rádio */
.hero2 h1 .t3 { display: block; margin-top: 10px; font-size: .42em; letter-spacing: -.3px; color: var(--muted); font-weight: 600; }
.hero2 h1 .t3::before { content: "— "; color: var(--s1); }
.hero2 p { color: var(--muted); max-width: 54ch; font-size: 18px; margin: 0 0 24px; }
.stats2 { display: flex; gap: 30px; margin-top: 28px; flex-wrap: wrap; }
.stats2 b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.stats2 span { color: var(--muted); font-size: 13px; }

.tk-shelf { position: relative; height: 430px; }
.tk-shelf::before { content: ""; position: absolute; inset: 8% 6%; border-radius: 50%; background: radial-gradient(circle, rgba(242,194,48,.16), transparent 62%); }
.orbit { position: absolute; inset: 12% 10%; border: 1px dashed rgba(242,238,230,.14); border-radius: 50%; }
.orbit.o2 { inset: 26% 24%; }
/* bugigangas paradas (só o fundo se move); inclinam um pouco ao passar o mouse */
.tk { position: absolute; width: 120px; filter: drop-shadow(0 14px 18px rgba(0,0,0,.55)); text-decoration: none; transform: rotate(var(--r, 0deg)); transition: transform .25s; }
.tk:hover { transform: rotate(0deg) scale(1.08); }
.tk img { width: 100%; display: block; }
.tk small { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); white-space: nowrap; font-size: 11px; color: var(--muted); background: var(--bg-2); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); opacity: 0; transition: opacity .2s; }
.tk:hover small { opacity: 1; }


.tile b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.6px; }
.tile span { color: var(--muted); font-size: 14px; display: block; max-width: 62%; line-height: 1.35; }
.tile em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--c, var(--s3)); display: inline-block; margin-top: 10px; }
.tile-img { position: absolute; right: -8px; bottom: -12px; width: 118px; transform: rotate(-10deg); transition: transform .3s; filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); }
.tile:hover .tile-img { transform: rotate(0) scale(1.08); }

.arcband { margin-top: 42px; display: grid; grid-template-columns: 6px 1fr; gap: 0 22px; background: var(--bg-2); border-radius: 18px; overflow: hidden; text-decoration: none; }
.arcband-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: 20px; padding: 22px 22px 22px 0; }
.arcband b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -1px; margin: 4px 0 6px; }
.arcband .kicker { font-family: var(--font); font-size: 13px; letter-spacing: 3px; color: var(--s3); font-weight: 600; }
.arcs { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.arcfig { text-align: center; font-size: 12px; color: var(--muted); }
.arcfig img { width: 130px; height: 90px; object-fit: contain; display: block; filter: drop-shadow(0 8px 12px rgba(0,0,0,.6)); transition: transform .25s; }
.arcband:hover .arcfig img { transform: translateY(-4px); }

.shelf-row { margin-top: 46px; background: var(--bg-2); border-radius: 18px; padding: 18px 22px 0; }
.shelf-t { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.shelf-t a { color: var(--muted); text-decoration: none; } .shelf-t a:hover { color: var(--text); }
.shelf-items { display: flex; gap: 8px; align-items: flex-end; overflow: hidden; padding-top: 12px; border-bottom: 8px solid #3a2f25; }
.shelf-items img { height: 70px; width: 70px; object-fit: contain; display: block; transition: transform .2s; }
.shelf-items img.big { height: 94px; width: 94px; }
.shelf-items a:hover img { transform: translateY(-8px) rotate(-4deg); }


/* ---------- Social (streamers) ---------- */
.so-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.so-sec { margin-top: 6px; }
.streamers { display: grid; gap: 8px; }
.streamer { position: relative; display: grid; grid-template-columns: 30px 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 10px 16px 10px 18px; background: var(--panel); border-radius: 14px; text-decoration: none; overflow: hidden; transition: transform .15s, background .15s; }
.streamer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.streamer:hover { transform: translateX(4px); background: var(--panel-2); }
.st-rank { font-weight: 800; font-size: 20px; color: var(--muted); text-align: center; }
.streamer.top .st-rank { color: var(--c); font-size: 24px; }
.st-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--bg); background: var(--c); }
.st-main { min-width: 0; display: grid; gap: 2px; }
.st-name { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.st-name:hover { color: #bf94ff; }
.st-socs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.st-soc { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-2); color: var(--nc); transition: transform .15s, background .15s; }
.st-soc svg { width: 16px; height: 16px; }
.st-soc:hover { transform: translateY(-2px); background: var(--panel-3); }
.st-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-bar { height: 4px; background: var(--panel-3); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.st-bar i { display: block; height: 100%; background: var(--c); }
.st-num { text-align: right; line-height: 1.1; }
.st-num b { display: block; font-size: 18px; font-weight: 800; }
.st-num small { font-size: 11px; color: var(--muted); }
.st-go { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: #9146ff; color: #fff; white-space: nowrap; text-decoration: none; }
.st-go:hover { background: #a970ff; }
.so-note { margin-top: 10px; }
@media (max-width: 1100px) { .so-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .streamer { grid-template-columns: 24px 38px minmax(0, 1fr) auto; } .st-go { display: none; } .st-av { width: 38px; height: 38px; } }

/* ---------- Mapa interativo ---------- */
.mv { margin: 6px 0 26px; }
.mv-credit { margin: 6px 2px 0; }
.mv-regions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.mv-reg { border: 2px solid var(--line-2); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 14px; font-weight: 600; cursor: pointer; }
.mv-reg:hover { border-color: var(--text); }
.mv-reg.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.mv-stage { position: relative; height: min(76vh, 820px); background: #0a0d10; border-radius: 18px; overflow: hidden; display: grid; place-items: center; cursor: grab; outline: none;
  touch-action: pan-y; /* sem zoom, um dedo rola a página normalmente; com zoom (.zoomed), o dedo move o mapa */ }
.mv.compact .mv-stage { height: min(68vh, 700px); }
.mv-stage:focus-visible { box-shadow: 0 0 0 2px var(--s3); }
.mv-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; pointer-events: none;
  background: linear-gradient(90deg, var(--s1) 0 20%, var(--s2) 20% 40%, var(--s3) 40% 60%, var(--s4) 60% 80%, var(--s5) 80%); }
.mv-stage.zoomed { cursor: grab; touch-action: none; } .mv-stage.zoomed:active { cursor: grabbing; }
.mv-img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; user-select: none; will-change: transform; }
.mv-img.smooth { transition: transform .2s ease; }
.mv-tools { position: absolute; top: 12px; right: 12px; display: grid; gap: 6px; }
.mv-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(15,19,23,.85); color: var(--text); font-size: 20px; cursor: pointer; }
.mv-btn:hover { background: var(--panel-3); }
.mv-zoom { position: absolute; top: 12px; left: 12px; background: rgba(15,19,23,.85); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mv-layers { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.mv-lay { border: 0; border-radius: 999px; padding: 7px 14px; background: rgba(15,19,23,.88); color: var(--text); font-weight: 600; cursor: pointer; }
.mv-lay.on { background: var(--s3); color: var(--accent-ink); }
.mv-hint { position: absolute; bottom: 18px; right: 14px; font-size: 11px; color: var(--muted); background: rgba(15,19,23,.75); padding: 3px 8px; border-radius: 999px; }
.mv-loading { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75); color: #eee; font-size: 12px; padding: 4px 12px; border-radius: 999px; }
.mv-loading[hidden] { display: none; }
/* No celular a área tem a proporção do mapa (4:3), em vez de ocupar quase a tela toda. */
@media (max-width: 640px) {
  .mv-hint { display: none; } .mv-layers { bottom: 14px; }
  .mv-stage, .mv.compact .mv-stage { height: auto; aspect-ratio: 4 / 3; }
}

/* ---------- Alvos de toque no celular (mínimo ~40px) ---------- */
@media (max-width: 640px) {
  .st-socs { gap: 8px; }
  .st-soc { width: 38px; height: 38px; border-radius: 10px; }
  .st-soc svg { width: 18px; height: 18px; }
  .vchip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; }
  .lang button { padding: 10px 14px; }
}

/* mini-mapa na quest */
.mini-map { margin: 0 0 8px; }
.mini-map img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.mini-map figcaption { display: none; }
.mini-map-link { font-size: 13px; color: var(--s3); text-decoration: none; font-weight: 600; }
.mini-map-link:hover { text-decoration: underline; }

/* mapa como textura no fundo da capa da página inicial */
.hero2::before { content: ""; position: absolute; inset: -10px -40px 0 -40px; z-index: -1; pointer-events: none;
  background: var(--map) center 40% / cover no-repeat; opacity: .16; filter: grayscale(.4) contrast(1.1);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 60% 45%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 60% 45%, #000 30%, transparent 75%); }

/* ---------- Capa com Speranza em movimento ---------- */
/* a capa sai da margem do conteúdo e ocupa a largura toda */
.hero2.speranza { --gut: clamp(16px, 2.5vw, 40px); margin: -26px calc(-1 * var(--gut)) 0; padding: 56px var(--gut) 40px; min-height: min(78vh, 720px); }
.hero2.speranza::before { content: none; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #07090b; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%;
  transform-origin: 60% 55%; animation: kenburns 38s ease-in-out infinite alternate; }
@keyframes kenburns {
  0% { transform: scale(1.06) translate3d(0, 0, 0); }
  50% { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
  100% { transform: scale(1.1) translate3d(1.5%, -2%, 0); }
}
/* escurece à esquerda (texto) e embaixo (passagem para o resto da página) */
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(15,19,23,.94) 0%, rgba(15,19,23,.78) 34%, rgba(15,19,23,.25) 62%, rgba(15,19,23,.35) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(15,19,23,0) 30%),
    linear-gradient(180deg, rgba(15,19,23,.6) 0%, rgba(15,19,23,0) 18%); }
/* poeira no ar, subindo devagar */
.hero-dust { position: absolute; inset: -20% 0 0; z-index: 1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 30%, rgba(255,230,180,.9), transparent 60%),
    radial-gradient(1px 1px at 28% 70%, rgba(255,230,180,.8), transparent 60%),
    radial-gradient(2px 2px at 46% 20%, rgba(255,210,150,.7), transparent 60%),
    radial-gradient(1px 1px at 63% 55%, rgba(255,240,200,.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 35%, rgba(255,220,170,.8), transparent 60%),
    radial-gradient(1px 1px at 90% 80%, rgba(255,240,200,.8), transparent 60%);
  background-size: 420px 420px; animation: dust 26s linear infinite; }
.hero-dust.d2 { background-size: 640px 640px; opacity: .35; animation-duration: 40s; animation-direction: reverse; }
@keyframes dust { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-60px, -420px, 0); } }
@media (prefers-reduced-motion: reduce) { .hero-bg img, .hero-dust { animation: none; } }
.hero2.speranza .tk-shelf::before { background: radial-gradient(circle, rgba(242,194,48,.12), transparent 62%); }

/* ---------- Faixa com fundo do jogo nos cabeçalhos de seção ---------- */
.page-head.has-bg { --gut: clamp(16px, 2.5vw, 40px); position: relative; isolation: isolate; overflow: hidden;
  margin: -26px calc(-1 * var(--gut)) 22px; padding: 46px var(--gut) 40px calc(var(--gut) + 16px);
  min-height: 230px; border-left: 0; }
.page-head.has-bg::before { content: ""; position: absolute; left: var(--gut); top: 46px; bottom: 40px; width: 6px; background: var(--c, var(--s3)); border-radius: 3px; }
.ph-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #07090b; }
.ph-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  animation: phdrift 50s ease-in-out infinite alternate; transform-origin: 70% 50%; }
@keyframes phdrift { from { transform: scale(1.08) translate3d(0, 0, 0); } to { transform: scale(1.2) translate3d(-3%, -4%, 0); } }
/* mapas: textura tática, mais apagada e levemente colorida pela cor da seção */
.page-head.is-map .ph-bg img { opacity: .75; filter: grayscale(.35) contrast(1.2) brightness(1); }
.ph-bg::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(15,19,23,.94) 0%, rgba(15,19,23,.72) 36%, rgba(15,19,23,.12) 72%, rgba(15,19,23,.25) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(15,19,23,0) 45%); }
.page-head.is-map .ph-bg::before { content: ""; position: absolute; inset: 0; z-index: 1; mix-blend-mode: color; background: var(--c, var(--s3)); opacity: .18; }
/* linhas de varredura bem sutis, como numa tela de rádio */
.page-head.has-bg::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); }
.page-head.has-bg h1 { text-shadow: 0 2px 16px rgba(0,0,0,.6); }
.page-head.has-bg .lead { color: #c4cbd3; }
@media (prefers-reduced-motion: reduce) { .ph-bg img { animation: none; } }
@media (max-width: 640px) { .page-head.has-bg { min-height: 0; padding-top: 30px; padding-bottom: 26px; } .page-head.has-bg::before { top: 30px; bottom: 26px; } }

/* ---------- Codex ---------- */
.cx-spoiler { margin: 0 0 14px; }
.cx-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; position: sticky; top: 108px; z-index: 5; padding: 8px 0; background: rgba(15,19,23,.9); backdrop-filter: blur(8px); }
.cx-toc a { padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.cx-toc a:hover { border-color: var(--text); }
.cx-sec { scroll-margin-top: 130px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 4px; border-radius: 2px;
  background: linear-gradient(180deg, var(--s1), var(--s2), var(--s3), var(--s4), var(--s5)); }
.tl-item { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 18px; margin-bottom: 16px; }
.tl-dot { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--bg); font-weight: 800; font-size: 18px; box-shadow: 0 0 0 5px var(--bg); }
.tl-card { background: var(--panel); border-radius: 16px; overflow: hidden; display: grid; }
.tl-card.has-img { grid-template-columns: minmax(0, 1.6fr) minmax(180px, 1fr); }
.tl-img { order: 2; position: relative; min-height: 150px; background: var(--bg-2); }
.tl-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tl-body { padding: 16px 20px; border-left: 5px solid var(--c); }
.tl-era { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--c); }
.tl-body h3 { margin: 2px 0 6px; font-size: 22px; }
.tl-body p { margin: 0; color: #c9cfd6; }
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cx-card { background: var(--panel); border-radius: 16px; overflow: hidden; }
.cx-card h3 { margin: 0 0 4px; font-size: 19px; }
.cx-card p { margin: 0; color: #c9cfd6; font-size: 15px; }
.cx-card.person, .cx-card.arcc { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 16px; align-items: start; }
.cx-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--s3); }
.cx-ph { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); font-weight: 800; font-size: 24px; color: var(--s3); }
.cx-arcimg { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; background: var(--bg-2); }
.cx-card.arcc:not(:has(img)) { grid-template-columns: 1fr; }
.cx-pic { aspect-ratio: 16 / 7; overflow: hidden; background: var(--bg-2); }
.cx-pic img { width: 100%; height: 100%; object-fit: cover; }
.cx-pad { padding: 14px 16px 16px; }
.cx-myst { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cx-myst li { position: relative; background: var(--panel); border-radius: 14px; padding: 14px 16px 14px 52px; font-size: 16px; }
.cx-myst li::before { content: "?"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--s1); color: #fff; font-weight: 800; }
.tl-img.contain img { object-fit: contain; padding: 18px; }
.cx-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--s3); margin-bottom: 2px; }
.cx-intro { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 8px; }
.cx-intro .cx-card { border-left: 5px solid var(--s1); }
.cx-group { margin: 22px 0 10px; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.cx-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cx-grid.best { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cx-card h4 { margin: 0 0 4px; font-size: 17px; }
.cx-card h4 a { text-decoration: none; } .cx-card h4 a:hover { color: var(--s3); }
.cx-ph.arcph { border-radius: 12px; font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.cx-fact { margin-top: 8px !important; font-size: 13.5px !important; color: var(--s3) !important; }
.cx-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.cx-facts li { position: relative; background: var(--panel); border-radius: 14px; padding: 14px 16px 14px 46px; color: #c9cfd6; }
.cx-facts li::before { content: "★"; position: absolute; left: 16px; top: 14px; color: var(--s3); }
@media (max-width: 760px) { .tl-card.has-img { grid-template-columns: 1fr; } .tl-img { order: 0; min-height: 140px; } .cx-grid { grid-template-columns: 1fr; } }

/* botão do vídeo */
.hero-play { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 6px 16px 6px 6px; border-radius: 999px;
  border: 1px solid rgba(242,238,230,.25); background: rgba(15,19,23,.55); backdrop-filter: blur(6px); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.hero-play:hover { border-color: var(--text); }
.hp-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--s1); color: #fff; font-size: 11px; padding-left: 2px; }
.vid-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(4,6,8,.92); display: grid; place-items: center; padding: 20px; }
.vid-in { position: relative; width: min(1200px, 100%); }
.vid-in video { width: 100%; max-height: 80vh; border-radius: 14px; background: #000; display: block; }
.vid-in .credit { text-align: center; margin-top: 10px; }
.vid-close { position: absolute; top: -46px; right: 0; width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--panel-2); color: var(--text); font-size: 18px; cursor: pointer; }

@media (max-width: 900px) { .hero2.speranza { min-height: 0; padding-top: 30px; } .hero-bg::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(15,19,23,.55) 45%, rgba(15,19,23,.75) 100%); } }

/* seletor de regiões na página inicial */
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.region { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--bg-2); text-decoration: none; }
.region img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; filter: saturate(.9); }
.region:hover img { transform: scale(1.08); }
.region::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,13,16,.92), rgba(10,13,16,.1) 60%); }
.region::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); z-index: 2; }
.region-name { position: absolute; left: 18px; bottom: 12px; z-index: 2; font-weight: 800; font-size: 19px; letter-spacing: -.4px; }

@media (max-width: 900px) {
  .hero2 { grid-template-columns: 1fr; padding-top: 16px; }
  .tk-shelf { height: 300px; }
  .arcband-in { grid-template-columns: 1fr; }
  .arcs { justify-content: flex-start; }
  .page-ico, .page-tk { width: 56px; height: 56px; }
}
@media (max-width: 640px) {
  .tk-shelf { height: 240px; }
  .tk { width: 80px; }
  .tile-img { width: 90px; }
}

/* ---------- Anúncio do fim da página (ads.js) ---------- */
/* Altura reservada antes de o anúncio chegar: o conteúdo não pula quando ele aparece. */
.ad-slot { display: block; max-width: 1100px; margin: 10px auto 24px; padding: 0 clamp(16px, 2.5vw, 40px); min-height: 280px; }
.ad-slot[hidden] { display: none; }
@media (max-width: 640px) { .ad-slot { min-height: 250px; padding: 0 14px; } }

/* ---------- Rodapé e páginas legais ---------- */
footer a { color: inherit; }
.legal { max-width: 760px; }
.legal h2 { margin-top: 26px; }
.legal p { line-height: 1.65; }

/* ---------- Eventos (/eventos) ---------- */
.ev-live { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 6px 0 22px; }
.ev-live .hint { margin: 0; }
.ev-how { max-width: 820px; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; margin-bottom: 26px; }
.ev-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.ev-card.ev-off { opacity: .78; }
.ev-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-2); }
.ev-boss .ev-img { object-fit: contain; }
.ev-body { padding: 14px 16px 16px; display: grid; gap: 8px; }
.ev-body h3 { margin: 0; font-size: 20px; }
.ev-body p { margin: 0; }
.ev-tag { display: inline-block; justify-self: start; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; }
.ev-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 4px 0 0; font-size: 14px; }
.ev-dl dt { color: var(--muted); }
.ev-dl dd { margin: 0; }
.ev-maps { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-foot { font-size: 12.5px; }
.ev-conf { font-weight: 700; }
.ev-hi { color: #5fd38a; } .ev-mid { color: var(--accent); } .ev-lo { color: #f08a7a; }

/* ---------- Montador de builds ---------- */
/* /montador (builder.js). A cor de cada ramo fica em --bc (skills-data.js); textos usam --text/--muted por contraste. */
.bld-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; padding: 14px 16px; background: var(--panel); border-radius: 14px; border-left: 6px solid var(--accent); }
.bld-cta .hint { margin: 0; }
.bld-top { background: var(--panel); border-radius: 16px; padding: 16px; display: grid; gap: 12px; margin-bottom: 12px; }
.bld-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; align-items: center; }
.bld-count { font-family: var(--display); font-weight: 800; line-height: 1; white-space: nowrap; }
.bld-count b { font-size: 48px; color: var(--accent); }
.bld-count span { font-size: 22px; color: var(--muted); margin-left: 4px; }
.bld-count.over b { color: var(--s1); }
.bld-count-txt { display: grid; gap: 1px; font-size: 13.5px; min-width: 0; }
.bld-count-txt b { font-size: 17px; }
.bld-count.over + .bld-count-txt > span:nth-child(2) { color: var(--s1); font-weight: 600; }
.bld-fields { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.bld-flabel { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.bld-flabel small { font-weight: 500; }
.bld-mini { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.bld-mini i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--bc); margin-right: 6px; }
.bld-mini b { color: var(--text); }
.bld-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bld-actions .btn { min-height: 44px; }
.bld-msg { margin: 0; font-size: 14px; color: var(--accent-2); }
.bld-msg:empty { display: none; }
.bld-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; padding: 12px 16px; background: var(--panel); border-radius: 14px; border-left: 6px solid var(--s4); }
.bld-notice.warn { border-left-color: var(--s2); }
.bld-notice.bad { border-left-color: var(--s1); }
.bld-notice p { margin: 0; flex: 1 1 260px; }
.bld-notice .linkbtn { padding: 0; min-height: 40px; }
.bld-rules { background: var(--panel); border-radius: 14px; padding: 4px 16px; margin-bottom: 10px; }
.bld-rules summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.bld-rules p { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.bld-endnote { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--s2); font-size: 13.5px; color: var(--muted); background: var(--bg-2); border-radius: 0 10px 10px 0; }
.bld-hint-mouse { display: none; }
@media (hover: hover) and (pointer: fine) { .bld-hint-mouse { display: inline; } .bld-hint-touch { display: none; } }

/* Abas dos ramos (só no celular) */
.bld-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.bld-tabs button { flex: 1 1 0; min-width: 0; min-height: 52px; padding: 6px 3px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.2; cursor: pointer;
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center; align-items: center; gap: 2px 5px; }
/* nome inteiro na 1ª linha (quebra com hífen se não couber), bolinha do ramo e pontos na 2ª */
.bld-tabs .bld-tn { order: -1; flex: 1 0 100%; text-align: center; overflow-wrap: anywhere; hyphens: auto; }
.bld-tabs button::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bc); }
.bld-tabs button small { color: inherit; font-weight: 700; font-size: 12px; }
.bld-tabs button[aria-selected="true"] { color: var(--text); border-color: var(--bc); box-shadow: inset 0 -3px 0 var(--bc); background: var(--panel); }

/* Árvore */
.bld-trees { display: grid; gap: 16px; }
.bld-branch { background: var(--panel); border-radius: 16px; padding: 12px 12px 22px; border-top: 4px solid var(--bc); min-width: 0; }
.bld-branch:not(.on) { display: none; }
.bld-bh-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bld-bh-top h3 { margin: 0; font-size: 18px; }
.bld-bpts { color: var(--muted); font-weight: 700; font-size: 14px; }
.bld-bh-top .linkbtn { margin-left: auto; padding: 0 4px; min-height: 40px; }
.linkbtn:disabled { opacity: .45; cursor: default; text-decoration: none; }
.bld-bar { position: relative; height: 10px; margin: 6px 0 22px; background: var(--bg-2); border-radius: 999px; }
.bld-bar .fill { position: absolute; inset: 0 auto 0 0; background: var(--bc); border-radius: 999px; transition: width .2s; }
.bld-bar i { position: absolute; top: -3px; width: 2px; height: 16px; margin-left: -1px; background: var(--line-2); }
.bld-bar i.ok { background: var(--text); }
.bld-bar i b { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); font-size: 11px; font-style: normal; color: var(--muted); }
.bld-bar i.ok b { color: var(--text); }
.bld-next { margin: 0 0 6px; font-size: 13px; color: var(--muted); min-height: 2.6em; }
.bld-tree { position: relative; height: 520px; }
.bld-tree svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bld-tree line { stroke: var(--line-2); stroke-width: 3; }
.bld-tree line.open { stroke: var(--muted); stroke-dasharray: 5 5; }
.bld-tree line.lit { stroke: var(--bc); stroke-width: 4; }
.bld-node {
  position: absolute; width: 52px; height: 52px; transform: translate(-50%, -50%); padding: 4px; border: 0; border-radius: 50%; cursor: pointer;
  background: conic-gradient(var(--bc) calc(var(--p) * 360deg), var(--line-2) 0); color: var(--text); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.bld-node.key { width: 58px; height: 58px; border-radius: 16px; }
.bld-ico { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; background: var(--bg-2); overflow: hidden; }
.bld-node.key .bld-ico { border-radius: 12px; }
.bld-ico img { width: 72%; height: 72%; object-fit: contain; }
.bld-cnt { position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%); padding: 0 6px; border-radius: 999px; background: var(--panel-3); color: var(--text); font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.bld-node.st-avail { box-shadow: 0 0 0 2px var(--bc); }
.bld-node.st-taken .bld-cnt, .bld-node.st-full .bld-cnt { background: var(--text); color: var(--bg); }
.bld-node.st-full { box-shadow: 0 0 14px -2px var(--bc); }
.bld-node.st-locked .bld-ico img, .bld-node.st-excl .bld-ico img { opacity: .35; filter: grayscale(1); }
.bld-node.st-excl .bld-cnt { text-decoration: line-through; color: var(--muted); }
.bld-node.sel { outline: 3px solid var(--text); outline-offset: 3px; }
.bld-node:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.bld-node:hover .bld-ico { background: var(--panel-3); }

/* Painel da habilidade: folha embaixo no celular, caixa flutuante no computador */
.bld-sheet {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; max-height: 64vh; overflow: auto; overscroll-behavior: contain;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--panel); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 18px 18px 0 0; box-shadow: 0 -12px 30px rgba(0, 0, 0, .5);
}
.bld-sheet[hidden] { display: none; }
.bld-sh-head { display: flex; gap: 12px; align-items: flex-start; }
.bld-sh-ico { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--bg-2); border: 2px solid var(--bc); display: grid; place-items: center; }
.bld-sh-ico img { width: 72%; height: 72%; object-fit: contain; }
.bld-sh-t { flex: 1; min-width: 0; }
.bld-sh-t h3 { margin: 0; font-size: 19px; line-height: 1.2; }
.bld-sh-br { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.bld-sh-br::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bc); margin-right: 6px; }
.bld-orig { display: block; font-size: 12.5px; color: var(--muted); font-style: italic; }
.bld-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--panel-3); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }
.bld-sh-body { font-size: 14.5px; }
.bld-sh-body h4 { margin: 12px 0 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.bld-desc { margin: 10px 0 0; }
.bld-tag { display: inline-block; font-size: 11.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--s2); border: 1px solid currentColor; border-radius: 999px; padding: 0 7px; vertical-align: 1px; }
.bld-ranks { margin: 0; padding-left: 22px; color: var(--muted); }
.bld-ranks li.on { color: var(--text); }
.bld-ranks li.cur { font-weight: 700; }
.bld-req { margin: 0; padding-left: 18px; }
.bld-sh-foot { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }
.bld-pm { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--bc); background: transparent; color: var(--text); font-size: 30px; font-weight: 700; line-height: 1; cursor: pointer; }
.bld-pm.plus { background: var(--bc); color: var(--bg); }
.bld-pm[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.bld-sh-rank { display: grid; text-align: center; min-width: 84px; }
.bld-sh-rank b { font-size: 24px; font-family: var(--display); }
.bld-sh-rank span { font-size: 12.5px; color: var(--muted); }
.bld-why { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.bld-why b { color: var(--text); }
.bld-flash { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--s2); }
.bld-flash:empty { display: none; }

/* Equipamento e Minhas builds */
.bld-sec h2 { margin-top: 26px; }
.bld-gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.bld-slot { background: var(--panel); border-radius: 14px; padding: 12px; min-width: 0; }
.bld-slot.wide { grid-column: 1 / -1; }
.bld-slot-row { display: flex; align-items: center; gap: 10px; }
.bld-slot-row select { flex: 1; min-width: 0; }
.bld-gimg { flex: none; width: 56px; height: 56px; object-fit: contain; background: var(--bg-2); border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.bld-input, .bld-slot select { width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; }
.bld-input::placeholder { color: var(--muted); }
textarea.bld-input { resize: vertical; min-height: 80px; }
.bld-tiers { display: flex; gap: 6px; margin-top: 8px; }
.bld-tiers button { min-width: 48px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font-weight: 700; cursor: pointer; }
.bld-tiers button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.bld-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.bld-quick:empty { display: none; }
.bld-qi { display: inline-flex; align-items: center; gap: 6px; padding: 2px 2px 2px 6px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; max-width: 100%; }
.bld-qi > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bld-qi button { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; }
.bld-qi button:hover { background: var(--panel-3); }
.bld-qimg { width: 32px; height: 32px; object-fit: contain; flex: none; }
.bld-qres { display: grid; gap: 6px; margin-top: 6px; }
.bld-qres .hint { margin: 4px 0 0; }
.bld-qopt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bld-qopt:hover { border-color: var(--muted); }
.bld-save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.bld-save-row .hint { margin: 0; }
.bld-saved { list-style: none; margin: 0; padding: 0; }
.bld-saved li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel); border-radius: 12px; border-left: 4px solid transparent; }
.bld-saved li.cur { border-left-color: var(--accent); }
.bld-sv-t { flex: 1 1 200px; min-width: 0; }
.bld-sv-t b { display: block; overflow-wrap: anywhere; }
.bld-sv-t small { color: var(--muted); }
.bld-saved .btn { min-height: 44px; padding: 8px 16px; }
.bld-del { border-color: var(--line-2); color: var(--muted); }

@media (min-width: 860px) {
  .bld-tabs { display: none; }
  .bld-trees { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bld-branch:not(.on) { display: block; }
  .bld-tree { height: 560px; }
  .bld-sheet { left: auto; right: 20px; bottom: 20px; width: 380px; max-height: calc(100vh - 120px); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); }
  .bld-sheet.left { right: auto; left: 20px; }
}
@media (max-width: 859px) {
  .bld-root.sheet-open { padding-bottom: 62vh; }
}
@media (max-width: 420px) {
  .bld-top, .bld-branch { padding-left: 10px; padding-right: 10px; }
  .bld-count b { font-size: 40px; }
  .bld-node { width: 48px; height: 48px; }
  .bld-node.key { width: 54px; height: 54px; }
}
@media (prefers-reduced-motion: reduce) { .bld-bar .fill { transition: none; } }

/* ---------- Builds de criadores ---------- */
/* Vitrine /builds/criadores e painel "Enviar para a vitrine" do montador (creators.js). --bc: cor do ramo principal. */
.bld-cta .btn { min-height: 44px; }
.cb-root .back { min-height: 40px; align-items: center; margin-bottom: 6px; }
.cb-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.cb-search { flex: 1 1 240px; max-width: 420px; }
.cb-filters .chip { min-height: 40px; }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.cb-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow: hidden; padding: 16px 16px 16px 22px; background: var(--panel); border-radius: 16px; }
.cb-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--bc); }
.cb-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cb-av { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.cb-av.ph { display: grid; place-items: center; font-weight: 800; font-size: 19px; color: var(--bg); background: var(--c, var(--s3)); }
.cb-who { display: grid; gap: 2px; min-width: 0; }
.cb-name { font-size: 18px; overflow-wrap: anywhere; }
.cb-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: #7fd67f; }
.cb-badge svg { flex: none; width: 15px; height: 15px; }
.cb-card h3 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.3px; overflow-wrap: anywhere; }
.cb-socs { margin: 0; gap: 8px; }
.cb-socs .st-soc { width: 40px; height: 40px; border-radius: 10px; }
.cb-socs .st-soc svg { width: 18px; height: 18px; }
.cb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-tag { font-size: 12px; font-weight: 700; color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; }
.cb-desc { margin: 0; color: var(--muted); font-size: 14.5px; overflow-wrap: anywhere; }
.cb-sum { display: grid; gap: 8px; padding: 10px 12px; background: var(--bg-2); border-radius: 12px; }
.cb-pts { font-size: 13px; font-weight: 700; color: var(--muted); }
.cb-brs { display: grid; gap: 5px; }
.cb-br { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 2em; gap: 8px; align-items: center; font-size: 13px; }
.cb-brn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-bar { height: 8px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.cb-bar i { display: block; height: 100%; border-radius: inherit; background: var(--bc); }
.cb-br b { text-align: right; }
.cb-gear { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-gi { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 3px 10px 3px 3px; font-size: 13px; line-height: 1.2; background: var(--panel); border-radius: 10px; border-bottom: 2px solid var(--rc, var(--line-2)); }
.cb-gi > span { min-width: 0; overflow-wrap: anywhere; }
.cb-gi small { display: block; font-size: 11.5px; color: var(--muted); }
.cb-gimg { flex: none; width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.cb-gimg.ph { display: grid; place-items: center; color: var(--muted); }
.cb-old { margin: 0; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: #f6b36b; background: rgba(240, 138, 36, .12); }
.cb-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
.cb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.cb-actions .btn { min-height: 44px; }
.cb-empty { display: grid; justify-items: start; gap: 12px; padding: 20px; background: var(--panel); border-radius: 16px; }
.cb-empty p { margin: 0; }
.cb-empty .btn { min-height: 44px; }
/* painel de envio no montador */
.cb-sub, .cb-out h3 { scroll-margin-top: 140px; }
.cb-sub { margin: 0 0 12px; padding: 16px; background: var(--panel); border-radius: 16px; border-left: 6px solid var(--accent); }
.cb-sub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cb-sub-head h2 { margin: 0; }
.cb-sub-lead { margin: 6px 0 12px; color: var(--muted); }
.cb-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px 16px; }
.cb-fld { min-width: 0; }
.cb-fld.wide, .cb-links { grid-column: 1 / -1; }
.cb-links { margin: 0; padding: 0; border: 0; min-width: 0; }
.cb-links legend { padding: 0; }
.cb-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px 16px; margin-top: 8px; }
.cb-help { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.cb-ferr { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: #ff9a8a; }
.cb-ferr:empty { display: none; }
.cb-build-err { margin: 0 0 10px; }
.cb-sum-err { margin: 12px 0 0; }
.bld-input[aria-invalid="true"] { border-color: #ff9a8a; }
.cb-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; cursor: pointer; }
.cb-check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.cb-sub .bld-actions { margin-top: 12px; }
.cb-privacy { margin: 10px 0 0; }
.cb-out:not(:empty) { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.cb-out h3 { margin: 0 0 4px; }
.cb-out h3:focus { outline: none; }
.cb-out .bld-msg { margin: 8px 0; }
.cb-msgbox { min-height: 220px; font: 12.5px/1.45 ui-monospace, Consolas, "Courier New", monospace; }

/* ---------- Busca rápida (sugestões do campo do topo) ---------- */
.qs-list {
  position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; width: max(100%, min(460px, calc(100vw - 32px)));
  max-height: min(70vh, 480px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
}
.qs-opt { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; color: var(--text); text-decoration: none; min-width: 0; }
.qs-opt:hover, .qs-opt[aria-selected="true"], .qs-alt:hover, .qs-alt[aria-selected="true"] { background: var(--panel-2); }
.qs-opt[aria-selected="true"], .qs-alt[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--accent); }
.qs-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--bg-2); color: var(--muted); font-size: 15px; overflow: hidden; }
.qs-img { width: 32px; height: 32px; object-fit: contain; }
.qs-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.qs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.qs-txt small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-pair { display: flex; align-items: stretch; }
.qs-pair .qs-opt { flex: 1; }
.qs-alt { flex: none; display: flex; align-items: center; padding: 0 12px; min-height: 48px; border-left: 1px solid var(--line); color: var(--accent-2); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.qs-all { border-top: 1px solid var(--line); }
.qs-all .qs-name { font-weight: 500; color: var(--accent-2); }
.qs-none { margin: 0; padding: 12px 14px; color: var(--muted); font-size: 14px; }
.qs-tools { margin-bottom: 18px; }
.qs-kind { color: var(--muted); font-size: 12px; }

/* ---------- Atalhos de tarefa ---------- */
/* início: "Continuar <quest>" e atalhos para as ferramentas, acima da dobra no celular */
.cta-resume { flex-direction: column; align-items: flex-start; gap: 0; max-width: 100%; border-radius: 18px; padding: 7px 18px; text-align: left; }
.cta-k { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .7; }
.cta-q { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.hq { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(15, 19, 23, .6); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.hq:hover { border-color: var(--accent); color: var(--accent-2); }
/* lista de uma seção: volta para a última página aberta nela */
.resume { margin: 0 0 14px; }
.resume-link { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-link:hover { border-color: var(--accent); }
/* quest: item pedido + atalho "usos" (Onde é usado?) */
.item-row { display: flex; gap: 6px; align-items: stretch; }
.item-row > .item { flex: 1; min-width: 0; }
.item-wu { flex: none; display: grid; place-items: center; min-width: 52px; min-height: 40px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--accent-2); font-size: 13px; font-weight: 600; text-decoration: none; }
.item-wu:hover { border-color: var(--accent); }
/* quest feita: próxima quest */
.q-nextup { flex-direction: column; gap: 0; margin-bottom: 8px; border-radius: 16px; }
.q-nextup span { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .7; }
.q-nextup b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ARC e mapa: eventos ligados */
.ev-row { margin: 0 0 12px; }
.ev-inline { margin-bottom: 14px; }
