/* Projeto Éden — Atlas UI (26/11/2026)
   O sistema da home "Atlas das Raízes" levado ao site inteiro: cada página é um lugar do atlas.
   Duas tintas na interface (mar e osso) + ouro para o que é do Éden. Sem script inline; sem sombras de cartão. */

@font-face { font-family: "EdenDisplay"; src: url("fontes/display.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DotGothic16"; src: url("fontes/dotgothic16-latin-ext.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "DotGothic16"; src: url("fontes/dotgothic16-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; 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; }
@font-face { font-family: "EdenUI"; src: url("fontes/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --mar-0: #061b1e;
  --mar-1: #0b2a2d;
  --mar-2: #113b3d;
  --mar-3: #17494a;
  --osso: #f1ead8;
  --osso-2: #cfc7b1;
  --osso-3: #a59e8a;
  --ouro: #f0c35a;
  --ouro-claro: #f8dc93;
  --ouro-2: #d49a2e;
  --ouro-tinta: #2a1b04;
  --vivo: #7bd88f;
  --erro: #f08a72;
  --alerta: #f0c35a;
  --linha: rgba(240, 195, 90, .26);
  --linha-fraca: rgba(240, 195, 90, .13);
  --linha-osso: rgba(241, 234, 216, .1);
  --painel: rgba(6, 27, 30, .86);
  --painel-cheio: rgba(6, 27, 30, .94);

  --f-titulo: "EdenDisplay", Georgia, serif;
  --f-texto: "EdenUI", "Segoe UI", system-ui, sans-serif;
  --f-mapa: "DotGothic16", "MS Gothic", monospace; /* só 16px ou 32px */

  --margem: clamp(16px, 4vw, 56px);
  --topo: 76px;
  --largura: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pulso: 3.2s;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topo) + 16px); scrollbar-color: rgba(240, 195, 90, .45) var(--mar-0); scrollbar-width: thin; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--mar-1); color: var(--osso-2); font: 400 16px/1.6 var(--f-texto); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: rgba(240, 195, 90, .38); color: #fff8e6; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--mar-0); }
::-webkit-scrollbar-thumb { background: rgba(240, 195, 90, .38); border: 3px solid var(--mar-0); border-radius: 6px; }
img { display: block; max-width: 100%; }
a { color: inherit; }
svg { display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visual-oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ouro); outline-offset: 3px; border-radius: 2px; }
.pular { position: fixed; left: 12px; top: -60px; z-index: 60; background: var(--ouro); color: var(--ouro-tinta); padding: 10px 14px; font-weight: 700; text-decoration: none; border-radius: 3px; transition: top .2s var(--ease); }
.pular:focus { top: 12px; }
.pixel { image-rendering: pixelated; }

/* ---------- tipografia ---------- */
h1, h2, h3 { font-family: var(--f-titulo); font-weight: 700; color: var(--osso); margin: 0; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 4.8vw, 4.4rem); line-height: .98; }
h2 { font-size: clamp(1.7rem, 2.3vw, 2.3rem); line-height: 1.06; }
h3 { font-size: 1.32rem; line-height: 1.15; letter-spacing: -.005em; }
h4 { margin: 0; font: 700 15px/1.3 var(--f-texto); color: var(--osso); }
p { margin: 0; }
b, strong { color: var(--osso); font-weight: 700; }
small { font-size: 13px; }
.texto a, a.link { color: var(--ouro-claro); text-decoration: underline; text-decoration-color: rgba(240, 195, 90, .45); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.texto a:hover, a.link:hover { color: #fff3cf; text-decoration-color: var(--ouro); }
.dado { font: 16px/1.1 var(--f-mapa); color: var(--ouro-claro); letter-spacing: 0; }
.dado-g { font: 32px/1 var(--f-mapa); color: var(--ouro-claro); letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.apagado { color: var(--osso-3); }
.texto { max-width: 68ch; }
.texto > * + * { margin-top: 14px; }
.texto h2 { margin-top: 44px; }
.texto h3 { margin-top: 32px; }
.texto ul, .texto ol { padding-left: 0; list-style: none; }
.texto li { position: relative; padding-left: 22px; }
.texto li + li { margin-top: 8px; }
.texto ul > li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 7px; height: 7px; background: var(--ouro); transform: rotate(45deg); opacity: .85; }
.texto ol { counter-reset: n; }
.texto ol > li { counter-increment: n; padding-left: 34px; }
.texto ol > li::before { content: counter(n); position: absolute; left: 0; top: .1em; font: 16px/1.3 var(--f-mapa); color: var(--ouro-claro); }
.texto code, kbd { font: 16px/1 var(--f-mapa); color: var(--ouro-claro); background: rgba(240, 195, 90, .08); border: 1px solid var(--linha-fraca); padding: 2px 6px; border-radius: 2px; }

/* ---------- botões ---------- */
.botao { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; font: 700 15px/1 var(--f-texto); letter-spacing: .01em; text-decoration: none; border-radius: 3px; border: 1px solid transparent; cursor: pointer; transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease); }
.botao svg { width: 16px; height: 16px; flex: none; }
.botao-ouro { background: var(--ouro); color: var(--ouro-tinta); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .75); }
.botao-ouro:hover { background: var(--ouro-claro); transform: translateY(-1px); }
.botao-ouro:active { transform: translateY(0); }
.botao-linha { color: var(--osso); border-color: rgba(241, 234, 216, .42); background: rgba(6, 27, 30, .35); }
.botao-linha:hover { border-color: var(--ouro); color: var(--ouro-claro); }
.botao-texto { color: var(--osso-2); padding: 0 6px; background: none; }
.botao-texto:hover { color: var(--ouro-claro); }
.botao-perigo { color: #ffd9cf; border-color: rgba(240, 138, 114, .55); background: rgba(240, 138, 114, .08); }
.botao-perigo:hover { border-color: var(--erro); background: rgba(240, 138, 114, .16); }
.botao-p { min-height: 38px; padding: 0 14px; font-size: 14px; }
.botao[disabled], .botao[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.botao-largo { width: 100%; }
.link-seta { display: inline-flex; align-items: center; gap: 8px; color: var(--ouro); font-weight: 700; font-size: 15px; text-decoration: none; }
.link-seta svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link-seta:hover { color: var(--ouro-claro); }
.link-seta:hover svg { transform: translateX(4px); }
.acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- topo: cartucho + legenda ---------- */
.topo { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; gap: 24px; height: var(--topo); padding: 0 var(--margem); border-bottom: 1px solid transparent; transition: background-color .35s var(--ease), border-color .35s var(--ease); }
/* sombra suave no topo: o menu fica legível mesmo sobre o mapa claro, sem caixa nem borda */
.topo::before { content: ""; position: absolute; inset: 0 0 -36px 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(6, 27, 30, .78) 0%, rgba(6, 27, 30, .42) 55%, rgba(6, 27, 30, 0) 100%); transition: opacity .35s var(--ease); }
.topo.solido::before { opacity: 0; }
.topo.solido, .topo:focus-within { background: rgba(6, 27, 30, .8); backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15); border-bottom-color: var(--linha-fraca); }
.cartucho { position: relative; display: inline-flex; align-items: center; flex: none; text-decoration: none; padding: 6px 14px; background: rgba(6, 27, 30, .62); border: 1px solid var(--linha); box-shadow: inset 0 0 0 3px rgba(6, 27, 30, .62), inset 0 0 0 4px var(--linha-fraca); }
.cartucho::before, .cartucho::after { content: ""; position: absolute; width: 6px; height: 6px; background: var(--ouro); transform: rotate(45deg); top: 50%; margin-top: -3px; }
.cartucho::before { left: -4px; }
.cartucho::after { right: -4px; }
.cartucho img { width: auto; height: 40px; }
.legenda { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.legenda-itens { list-style: none; display: flex; align-items: center; gap: 20px; margin: 0; padding: 0; }
.legenda-itens > li { position: relative; }
.legenda-itens > li > a, .legenda-itens > li > button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; background: none; border: 0; cursor: pointer; font: 600 14px/1 var(--f-texto); color: var(--osso-2); text-decoration: none; transition: color .2s var(--ease); }
.legenda-itens svg.s { width: 10px; height: 10px; fill: var(--ouro); shape-rendering: crispEdges; opacity: .75; transition: opacity .2s; }
.legenda-itens svg.abre { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .7; transition: transform .25s var(--ease); }
.legenda-itens > li > a:hover, .legenda-itens > li > button:hover, .legenda-itens > li > button[aria-expanded="true"] { color: var(--osso); }
.legenda-itens > li > a:hover svg.s, .legenda-itens > li > button:hover svg.s { opacity: 1; }
.legenda-itens > li > button[aria-expanded="true"] svg.abre { transform: rotate(180deg); }
.legenda-itens a[aria-current="page"], .legenda-itens button.atual { color: var(--osso); }
.legenda-itens a[aria-current="page"]::after, .legenda-itens button.atual::after { content: ""; position: absolute; left: 18px; right: 0; bottom: 2px; height: 1px; background: var(--ouro); }
.ponto-vivo { width: 6px; height: 6px; background: var(--ouro); transform: rotate(45deg); animation: brilho 2.4s var(--ease) infinite; }
@keyframes brilho { 50% { opacity: .35; } }

/* menus suspensos: folha pequena do atlas */
.sub { position: absolute; top: calc(100% + 10px); left: -18px; z-index: 5; min-width: 280px; padding: 8px; background: var(--painel-cheio); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--linha); box-shadow: inset 0 0 0 4px rgba(6, 27, 30, 0), inset 0 0 0 5px var(--linha-fraca), 0 18px 40px -22px rgba(0, 0, 0, .9); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s; }
.sub.aberto { opacity: 1; visibility: visible; transform: none; transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s; }
.sub::before { content: ""; position: absolute; left: 30px; top: -5px; width: 8px; height: 8px; background: var(--mar-0); border-left: 1px solid var(--linha); border-top: 1px solid var(--linha); transform: rotate(45deg); }
.sub-dir { left: auto; right: -8px; }
.sub-dir::before { left: auto; right: 24px; }
.sub a, .sub .sub-off { display: grid; grid-template-columns: 24px 1fr; gap: 2px 10px; align-items: center; padding: 10px 12px; text-decoration: none; border-radius: 2px; color: var(--osso); }
.sub a:hover, .sub a:focus-visible { background: rgba(240, 195, 90, .08); }
.sub a img, .sub a .s-g, .sub .sub-off .s-g { grid-row: span 2; width: 24px; height: 24px; image-rendering: pixelated; fill: var(--ouro); }
.sub b { font: 700 14px/1.2 var(--f-texto); }
.sub small { grid-column: 2; font: 500 12.5px/1.3 var(--f-texto); color: var(--osso-3); }
.sub .sub-off { opacity: .55; cursor: default; }
.sub hr { border: 0; border-top: 1px solid var(--linha-fraca); margin: 6px 4px; }
.sub .sub-titulo { padding: 8px 12px 4px; font: 600 12.5px/1 var(--f-texto); color: var(--osso-3); }
.sub-simples a { grid-template-columns: 18px 1fr; padding: 9px 12px; }
.sub-simples a svg { width: 16px; height: 16px; fill: none; stroke: var(--ouro); stroke-width: 1.6; }
.sub-simples b { font-weight: 600; }

/* conta: visitante x logado */
.legenda-conta { display: flex; align-items: center; gap: 14px; padding-left: 22px; border-left: 1px solid var(--linha-fraca); }
.legenda-conta[data-se="logado"] { display: none; }
:root[data-sessao="logado"] .legenda-conta[data-se="logado"] { display: flex; }
:root[data-sessao="logado"] .legenda-conta[data-se="visitante"] { display: none; }
.link-entrar { font: 600 14px/1 var(--f-texto); color: var(--osso); text-decoration: none; }
.link-entrar:hover { color: var(--ouro-claro); }
.saldo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 6px 10px; border: 1px solid var(--linha-fraca); background: rgba(6, 27, 30, .5); border-radius: 2px; }
.saldo span { font: 600 12.5px/1 var(--f-texto); color: var(--osso-3); }
.saldo b { font: 16px/1 var(--f-mapa); color: var(--ouro-claro); font-weight: 400; }
.saldo:hover { border-color: var(--linha); }
.sino { position: relative; display: grid; place-items: center; width: 38px; height: 38px; background: none; border: 1px solid transparent; border-radius: 2px; cursor: pointer; color: var(--osso-2); }
.sino:hover { color: var(--osso); border-color: var(--linha-fraca); }
.sino svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.bolha { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--ouro); color: var(--ouro-tinta); font: 800 10.5px/16px var(--f-texto); text-align: center; border-radius: 8px; }
.conta-botao { display: inline-flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; background: none; border: 1px solid transparent; border-radius: 2px; cursor: pointer; }
.conta-botao:hover, .conta-botao[aria-expanded="true"] { border-color: var(--linha-fraca); }
.conta-botao .avatar { width: 30px; height: 30px; display: grid; place-items: center; background: var(--mar-2); border: 1px solid var(--linha); font: 16px/1 var(--f-mapa); color: var(--ouro-claro); }
.conta-botao span { font: 600 14px/1 var(--f-texto); color: var(--osso); }
.menu-botao { display: none; }

/* ---------- atlas (o mesmo da home) ---------- */
.atlas { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--mar-1); contain: strict; }
.plano { position: absolute; inset: 0; will-change: transform; }
.mundo { position: absolute; left: 0; top: 0; width: 1600px; height: 1000px; transform-origin: 0 0; will-change: transform; }
.terreno, .subsolo, .raizes, .pulsos { position: absolute; left: 0; top: 0; width: 1600px; height: 1000px; }
.mar-sem-fim { position: absolute; left: -1600px; top: -1600px; width: 4800px; height: 4200px; image-rendering: pixelated; }
.terreno, .subsolo, .detalhe { image-rendering: pixelated; image-rendering: crisp-edges; }
.detalhe { position: absolute; left: 820px; top: 350px; width: 360px; height: 320px; opacity: var(--detalhe, 0); -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent 100%); mask-image: radial-gradient(closest-side, #000 60%, transparent 100%); }
.subsolo-grupo { position: absolute; left: 0; top: 0; width: 1600px; height: 1000px; opacity: var(--subsolo, 0); }
.subsolo-sem-fim { position: absolute; left: -1600px; top: -1600px; width: 4800px; height: 4200px; image-rendering: pixelated; }
.raizes, .pulsos { pointer-events: none; }
.pulsos { overflow: visible; }
.pulso { fill: none; stroke: #fff6d6; stroke-linecap: round; stroke-dasharray: .07 .93; animation: pulso var(--pulso) linear infinite; }
@keyframes pulso { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.veu { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 60% 50%, transparent 40%, rgba(6, 27, 30, .55) 100%); }
.veu::before, .veu::after { content: ""; position: absolute; inset: 0; background: var(--mar-0); }
.veu::before { opacity: 0; transition: opacity 1.2s var(--ease); }
:root[data-periodo="noite"] .veu::before { opacity: .26; }
:root[data-periodo="aurora"] .veu::before { opacity: .12; }
.veu::after { opacity: var(--veu, 0); }
.marcas { position: absolute; inset: 0; pointer-events: none; }
.marca { position: absolute; left: 0; top: 0; transform-origin: 0 0; white-space: nowrap; pointer-events: none; will-change: transform; }
.marca-cidade { text-align: center; opacity: .82; transition: opacity .5s; }
.marca-cidade b { display: block; font: 700 15px/1 var(--f-titulo); color: var(--osso); letter-spacing: .01em; text-shadow: 0 1px 0 rgba(6, 27, 30, .9), 0 0 6px rgba(6, 27, 30, .85), 0 0 2px rgba(6, 27, 30, .9); }
.marca-cidade.capital b { font-size: 19px; color: var(--ouro-claro); }
.marca-cidade.atual { opacity: 1; }
.marca-cidade.atual b { color: var(--ouro-claro); font-size: 19px; }
.marca-sprite img { image-rendering: pixelated; height: var(--h, 40px); width: auto; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .45)); }
.marca-sprite .etiqueta { opacity: 0; transition: opacity .4s var(--ease); }
.marca-sprite.ativo .etiqueta, .marca-sprite.rotulo .etiqueta { opacity: 1; }
.marca-ponto { width: 0; height: 0; }
.marca-ponto::before { content: ""; position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; background: var(--ouro); transform: rotate(45deg); box-shadow: 0 0 0 2px rgba(6, 27, 30, .8); }
.marca-ponto.ativo::before { background: var(--ouro-claro); animation: alvo 1.6s var(--ease) infinite; }
@keyframes alvo { 50% { box-shadow: 0 0 0 2px rgba(6, 27, 30, .8), 0 0 0 7px rgba(240, 195, 90, .25); } }
.etiqueta { position: absolute; font: 600 12.5px/1.25 var(--f-texto); color: var(--osso); white-space: nowrap; background: rgba(6, 27, 30, .86); border: 1px solid var(--linha); padding: 5px 8px; border-radius: 2px; }
.etiqueta i { font-style: normal; color: var(--ouro-claro); font-weight: 500; }
.lado-baixo .etiqueta { left: 50%; top: 100%; transform: translate(-50%, 6px); }
.lado-cima .etiqueta { left: 50%; bottom: 100%; transform: translate(-50%, -8px); }
.lado-esq .etiqueta { right: 100%; top: 50%; transform: translate(-10px, -50%); }
.lado-dir .etiqueta { left: 100%; top: 50%; transform: translate(10px, -50%); }
.marca-ponto.lado-cima .etiqueta { transform: translate(-50%, -14px); }
.marca-sprite.anda img { animation: ocioso 1.1s steps(2) infinite; }
@keyframes ocioso { 50% { transform: translateY(-1px); } }

/* ---------- localizador: você está aqui ---------- */
.localizador { position: fixed; right: var(--margem); bottom: 20px; z-index: 20; width: 212px; background: rgba(6, 27, 30, .8); border: 1px solid var(--linha); padding: 6px 6px 8px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.localizador-mapa { position: relative; width: 200px; height: 125px; overflow: hidden; }
.localizador canvas { width: 200px; height: 125px; image-rendering: pixelated; display: block; }
.localizador-vista { position: absolute; left: 0; top: 0; border: 1px solid var(--ouro-claro); box-shadow: 0 0 0 9999px rgba(6, 27, 30, .35); }
.localizador-nome { margin-top: 7px; padding: 0 2px; font: 600 12.5px/1.2 var(--f-texto); color: var(--osso-3); }
.localizador-nome b { color: var(--osso); font-weight: 700; }
.localizador-codigo { font: 16px/1.1 var(--f-mapa); color: var(--ouro-claro); margin-top: 4px; padding: 0 2px; }
.localizador-hora { font: 500 12px/1.2 var(--f-texto); color: var(--osso-3); margin-top: 3px; padding: 0 2px; }
body.cheio .localizador { opacity: 0; transform: translateY(8px); pointer-events: none; }

/* ---------- página ---------- */
main { position: relative; z-index: 10; }
.pagina { width: min(100% - var(--margem) * 2, var(--largura)); margin: 0 auto; padding-bottom: 120px; }
/* abertura da página: o lugar aparece primeiro, como uma tomada de estabelecimento */
.chegada { min-height: min(62vh, 620px); display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--topo) + 48px) 0 44px; position: relative; }
/* sombra de leitura atrás do título: sem bordas (some nas laterais e embaixo) */
.chegada::before { content: ""; position: absolute; top: 0; bottom: -80px; left: -100vw; width: calc(100vw + min(1000px, 78vw)); pointer-events: none; z-index: -1;
  /* parte da borda esquerda da TELA, onde quer que o título esteja (coluna, grade ou página centrada) */
  background: linear-gradient(90deg, rgba(6, 27, 30, .84) 0, rgba(6, 27, 30, .84) 100vw, rgba(6, 27, 30, .58) calc(100vw + 520px), rgba(6, 27, 30, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 60%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, #000 60%, transparent 100%); }
.chegada h1 { max-width: 15ch; }
.chegada .resumo { margin-top: 18px; max-width: 54ch; font-size: clamp(16px, 1.2vw, 18px); color: var(--osso-2); }
.chegada .acoes { margin-top: 26px; }
.chegada-curta { min-height: 0; padding-bottom: 32px; }
/* trilha: Rune-Midgard › Juno › Wiki (o caminho é uma estrada do mapa) */
.trilha-local { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 22px; padding: 0; list-style: none; font: 600 13px/1.2 var(--f-texto); color: var(--osso-3); }
.trilha-local li { display: inline-flex; align-items: center; gap: 10px; }
.trilha-local li + li::before { content: ""; width: 5px; height: 5px; background: var(--ouro); transform: rotate(45deg); opacity: .7; }
.trilha-local a { text-decoration: none; color: var(--osso-2); }
.trilha-local a:hover { color: var(--ouro-claro); }
.trilha-local [aria-current] { color: var(--osso); }

/* folha do atlas: painel com filete interno e marcas de canto */
.placa { position: relative; padding: 30px 32px 28px; background: var(--painel); backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1); border: 1px solid var(--linha); box-shadow: inset 0 0 0 5px rgba(6, 27, 30, 0), inset 0 0 0 6px var(--linha-fraca); border-radius: 2px; }
.placa::before, .placa::after { content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--ouro); pointer-events: none; }
.placa::before { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; }
.placa::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.placa-cheia { background: var(--painel-cheio); }
.placa-p { padding: 20px 22px; }
.placa > h2 + p, .placa > h3 + p { margin-top: 10px; }
.folha { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--linha-fraca); font: 16px/1 var(--f-mapa); color: rgba(248, 220, 147, .78); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.secao + .secao { margin-top: 28px; }
.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grade-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cabeca-secao { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cabeca-secao p { color: var(--osso-3); font-size: 14.5px; }

/* ---------- formulários ---------- */
.campo { display: grid; gap: 7px; }
.campo + .campo { margin-top: 18px; }
.campo > label, .campo > .rotulo { font: 600 14px/1.2 var(--f-texto); color: var(--osso); }
.campo .ajuda { font-size: 13px; color: var(--osso-3); }
.campo .erro-campo { font: 600 13px/1.35 var(--f-texto); color: #ffc2b3; display: flex; gap: 8px; align-items: baseline; }
.campo .erro-campo::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--erro); transform: rotate(45deg) translateY(-1px); }
.entrada, input.entrada, select.entrada, textarea.entrada{
  width: 100%; min-height: 46px; padding: 11px 14px; font: 500 15px/1.3 var(--f-texto); color: var(--osso); background: rgba(6, 27, 30, .7); border: 1px solid rgba(241, 234, 216, .2); border-radius: 3px; transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
textarea.entrada { min-height: 120px; resize: vertical; }
.entrada::placeholder { color: rgba(207, 199, 177, .5); }
.entrada:hover { border-color: rgba(241, 234, 216, .34); }
.entrada:focus { outline: none; border-color: var(--ouro); background: rgba(6, 27, 30, .9); box-shadow: 0 0 0 3px rgba(240, 195, 90, .14); }
.entrada[aria-invalid="true"] { border-color: var(--erro); }
select.entrada { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ouro) 50%), linear-gradient(135deg, var(--ouro) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.entrada-icone { position: relative; }
.entrada-icone svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--osso-3); stroke-width: 1.6; pointer-events: none; }
.entrada-icone .entrada { padding-left: 42px; }
.marcar { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 14.5px; }
.marcar input { appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border: 1px solid rgba(241, 234, 216, .4); background: rgba(6, 27, 30, .7); border-radius: 2px; display: grid; place-items: center; cursor: pointer; }
.marcar input[type="radio"] { transform: rotate(45deg); border-radius: 1px; width: 15px; height: 15px; margin: 4px 2px 0; }
.marcar input:checked { border-color: var(--ouro); background: rgba(240, 195, 90, .16); }
.marcar input:checked::after { content: ""; width: 8px; height: 8px; background: var(--ouro); }
.marcar input[type="radio"]:checked::after { width: 7px; height: 7px; }
.form-linha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-linha .campo + .campo { margin-top: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font: 600 14px/1.2 var(--f-texto); color: var(--osso); margin-bottom: 10px; }

/* ---------- abas: bandeirolas ---------- */
.abas { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--linha-fraca); margin-bottom: 26px; }
.abas a, .abas button { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 12px 16px 13px; background: none; border: 0; cursor: pointer; font: 600 14.5px/1 var(--f-texto); color: var(--osso-3); text-decoration: none; transition: color .2s var(--ease); }
.abas a::before, .abas button::before { content: ""; width: 6px; height: 6px; border: 1px solid currentColor; transform: rotate(45deg); opacity: .7; }
.abas a:hover, .abas button:hover { color: var(--osso); }
.abas [aria-selected="true"], .abas [aria-current="page"] { color: var(--osso); }
.abas [aria-selected="true"]::before, .abas [aria-current="page"]::before { background: var(--ouro); border-color: var(--ouro); opacity: 1; }
.abas [aria-selected="true"]::after, .abas [aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--ouro); }
.abas .conta { font: 16px/1 var(--f-mapa); color: var(--ouro-claro); }

/* ---------- livro-razão (tabelas) ---------- */
.livro-rolo { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.livro{ width: 100%; border-collapse: collapse; font-size: 14.5px; }
.livro th{ text-align: left; padding: 10px 12px; font: 600 12.5px/1.2 var(--f-texto); color: var(--osso-3); border-bottom: 1px solid var(--linha); white-space: nowrap; background: none; }
.livro td{ padding: 12px; border-bottom: 1px solid var(--linha-osso); vertical-align: middle; color: var(--osso-2); background: none; }
.livro tbody tr { transition: background-color .15s; }
.livro tbody tr:hover{ background: rgba(240, 195, 90, .045); }
.livro td.n, .livro th.n { text-align: right; font-variant-numeric: tabular-nums; }
.livro .pos { width: 52px; font: 16px/1 var(--f-mapa); color: var(--osso-3); }
.livro .nome { color: var(--osso); font-weight: 600; }
.livro a { text-decoration: none; color: var(--osso); }
.livro a:hover { color: var(--ouro-claro); }
.livro .icone { width: 24px; height: 24px; image-rendering: pixelated; display: inline-block; vertical-align: middle; margin-right: 10px; }
.livro caption { caption-side: bottom; text-align: left; padding-top: 12px; font-size: 13px; color: var(--osso-3); }

/* ---------- selos, chips, avisos ---------- */
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; font: 600 12.5px/1.3 var(--f-texto); color: var(--osso-2); border: 1px solid var(--linha-osso); border-radius: 2px; white-space: nowrap; }
.selo-ouro { color: var(--ouro-claro); border-color: var(--linha); background: rgba(240, 195, 90, .07); }
.selo-vivo { color: #c9f2d2; border-color: rgba(123, 216, 143, .35); }
.selo-vivo::before { content: ""; width: 6px; height: 6px; background: var(--vivo); transform: rotate(45deg); }
.selo-erro { color: #ffc9bb; border-color: rgba(240, 138, 114, .4); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 13px; background: rgba(6, 27, 30, .6); border: 1px solid rgba(241, 234, 216, .18); border-radius: 2px; cursor: pointer; font: 600 13.5px/1 var(--f-texto); color: var(--osso-2); text-decoration: none; transition: border-color .2s, color .2s, background-color .2s; }
.chip:hover { border-color: var(--linha); color: var(--osso); }
.chip[aria-pressed="true"], .chip.ativo { border-color: var(--ouro); color: var(--ouro-claro); background: rgba(240, 195, 90, .1); }
.chip img { width: 20px; height: 20px; image-rendering: pixelated; }
.aviso { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--linha-osso); border-left: 2px solid var(--osso-3); background: rgba(6, 27, 30, .7); font-size: 14.5px; }
.aviso::before { content: ""; width: 8px; height: 8px; margin: 6px 0 0 4px; background: var(--osso-3); transform: rotate(45deg); }
.aviso b { display: block; margin-bottom: 2px; }
.aviso-ok { border-left-color: var(--vivo); } .aviso-ok::before { background: var(--vivo); }
.aviso-erro { border-left-color: var(--erro); } .aviso-erro::before { background: var(--erro); }
.aviso-ouro { border-left-color: var(--ouro); } .aviso-ouro::before { background: var(--ouro); }
.vazio { padding: 48px 24px; text-align: center; color: var(--osso-3); }
.vazio img { margin: 0 auto 14px; height: 56px; width: auto; image-rendering: pixelated; opacity: .85; }
.vazio b { display: block; font: 700 1.2rem/1.2 var(--f-titulo); color: var(--osso); margin-bottom: 6px; }
.esqueleto { display: block; height: 14px; border-radius: 2px; background: linear-gradient(90deg, rgba(241, 234, 216, .05), rgba(241, 234, 216, .12), rgba(241, 234, 216, .05)); background-size: 200% 100%; animation: esq 1.4s linear infinite; }
@keyframes esq { to { background-position: -200% 0; } }

/* barras de dado: degraus de 8px, como um medidor do jogo */
.barras { display: grid; gap: 10px; }
.barra { display: grid; grid-template-columns: 54px 1fr 44px; align-items: center; gap: 12px; }
.barra > span:first-child { font: 600 13px/1 var(--f-texto); color: var(--osso-3); }
.barra .trilho { display: block; height: 10px; background: repeating-linear-gradient(90deg, rgba(241, 234, 216, .08) 0 6px, transparent 6px 8px); }
.barra .cheio { display: block; height: 100%; width: var(--v, 0%); background: repeating-linear-gradient(90deg, var(--ouro) 0 6px, transparent 6px 8px); transition: width .8s var(--ease); }
.barra > span:last-child { font: 16px/1 var(--f-mapa); color: var(--osso); text-align: right; }

/* paginação */
.paginas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 22px; }
.paginas a, .paginas span { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px; font: 16px/1 var(--f-mapa); color: var(--osso-2); text-decoration: none; border: 1px solid var(--linha-osso); border-radius: 2px; }
.paginas a:hover { border-color: var(--linha); color: var(--osso); }
.paginas [aria-current="page"] { border-color: var(--ouro); color: var(--ouro-claro); background: rgba(240, 195, 90, .08); }

/* janela (diálogo) */
.janela { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; background: transparent; color: inherit; }
.janela::backdrop { background: rgba(2, 10, 11, .66); backdrop-filter: blur(3px); }
.janela .placa { padding: 28px; }
.fechar { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 1px solid transparent; cursor: pointer; color: var(--osso-2); border-radius: 2px; }
.fechar:hover { border-color: var(--linha-fraca); color: var(--osso); }
.fechar svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; fill: none; }

/* ficha de item (ícone + nome) */
.item { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.item img { width: 24px; height: 24px; image-rendering: pixelated; flex: none; }
.item span { color: var(--osso); font-weight: 600; }
a.item:hover span { color: var(--ouro-claro); }

/* ---------- rodapé ---------- */
.rodape { position: relative; z-index: 10; background: var(--mar-0); border-top: 1px solid var(--linha-fraca); padding: 34px var(--margem) 28px; }
.rodape-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; }
.rodape .cartucho img { height: 34px; }
.rodape-copy { font-size: 13.5px; color: var(--osso-3); }
.rodape-links, .rodape-redes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.rodape-links { margin-left: auto; }
.rodape a { font-size: 14px; color: var(--osso-2); text-decoration: underline; text-decoration-color: rgba(240, 195, 90, .35); text-underline-offset: 4px; }
.rodape a:hover { color: var(--osso); text-decoration-color: var(--ouro); }
.rodape .cartucho { text-decoration: none; }
.rodape-redes a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.rodape-redes svg { width: 18px; height: 18px; fill: currentColor; }
.rodape-notas { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; font-size: 12.5px; color: var(--osso-3); }
.rodape-notas p { max-width: 90ch; }
.pausar { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; background: none; border: 1px solid var(--linha-osso); border-radius: 2px; cursor: pointer; font: 600 12.5px/1 var(--f-texto); color: var(--osso-2); }
.pausar:hover { border-color: var(--linha); color: var(--osso); }
.pausar::before { content: ""; width: 6px; height: 6px; background: var(--ouro); transform: rotate(45deg); }
.pausar[aria-pressed="true"]::before { background: none; border: 1px solid var(--ouro); }
.estado-servidor { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--f-texto); color: var(--osso-2); }
.estado-servidor::before { content: ""; width: 7px; height: 7px; background: var(--osso-3); transform: rotate(45deg); }
.estado-servidor:not(.pendente):not(.fora)::before { background: var(--vivo); }
.estado-servidor.fora::before { background: var(--erro); }

/* ---------- movimento ---------- */
:root.motion-paused *, :root.motion-paused *::before, :root.motion-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- telas médias e celular ---------- */
@media (max-width: 1100px) {
  .legenda { gap: 18px; }
  .legenda-itens { gap: 14px; }
  .localizador { display: none; }
  .grade-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  :root { --topo: 64px; }
  .cartucho img { height: 34px; }
  .menu-botao { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 42px; padding: 0 14px; background: rgba(6, 27, 30, .6); border: 1px solid var(--linha); border-radius: 2px; cursor: pointer; font: 600 14px/1 var(--f-texto); color: var(--osso); }
  .menu-botao svg { width: 16px; height: 16px; }
  .legenda { position: fixed; inset: var(--topo) 0 0 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--margem) 40px; overflow-y: auto; background: var(--painel-cheio); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--linha-fraca); }
  .legenda.aberta { display: flex; }
  .legenda-itens { flex-direction: column; align-items: stretch; gap: 0; }
  .legenda-itens > li { border-bottom: 1px solid var(--linha-osso); }
  .legenda-itens > li > a, .legenda-itens > li > button { width: 100%; min-height: 52px; font-size: 16px; }
  .legenda-itens > li > button svg.abre { margin-left: auto; }
  .legenda-itens a[aria-current="page"]::after, .legenda-itens button.atual::after { display: none; }
  .sub, .sub-dir { position: static; display: none; min-width: 0; margin: 0 0 12px; padding: 4px; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: rgba(11, 42, 45, .6); }
  .sub.aberto { display: block; }
  .sub::before { display: none; }
  .legenda-conta { padding: 18px 0 0; border-left: 0; flex-wrap: wrap; }
  .legenda-conta .botao { flex: 1; }
  .chegada { min-height: 0; padding-top: calc(var(--topo) + 38vh); padding-bottom: 28px; }
  .chegada::before { inset: auto calc(var(--margem) * -1) 0; width: auto; height: 100%; -webkit-mask-image: none; mask-image: none; background: linear-gradient(180deg, transparent 0%, rgba(6, 27, 30, .55) 40%, rgba(6, 27, 30, .85) 100%); }
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .placa { padding: 22px 18px 20px; }
  .grade-2, .grade-3, .form-linha { grid-template-columns: minmax(0, 1fr); }
  .form-linha .campo + .campo { margin-top: 18px; }
  .rodape-links { margin-left: 0; }
  .pausar { margin-left: 0; }
  .livro th, .livro td { padding: 10px 8px; }
  .abas { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .abas a, .abas button { white-space: nowrap; }
}
.conta-menu { position: relative; }
.marca-cidade.atual b { font-size: 21px; color: var(--ouro-claro); }
.marca-cidade.atual::after { content: ""; display: block; width: 8px; height: 8px; margin: 7px auto 0; background: var(--ouro); transform: rotate(45deg); box-shadow: 0 0 0 2px rgba(6, 27, 30, .8); }

/* confirmação MFA (janela do Atlas, injetada pelo servidor nas páginas novas) */
.fechar svg path { fill: none; stroke: currentColor; stroke-width: 1.8; }
.janela-mfa .placa { padding: 30px 30px 22px; }
.janela-mfa h2 { margin-right: 40px; }
.janela-mfa .mfa-texto { margin: 10px 0 20px; color: var(--osso-2); }
/* seis casas: um campo só por baixo (preenchimento automático e colar continuam funcionando) */
.janela-mfa .codigo-casas { position: relative; margin-top: 4px; cursor: text; }
.janela-mfa .codigo-casas .entrada { position: absolute; inset: 0; z-index: 1; min-height: 64px; padding: 0 14px; opacity: .01; font: 16px/1 var(--f-mapa); letter-spacing: 0; caret-color: transparent; cursor: text; }
.janela-mfa .casas { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.janela-mfa .casas i { display: grid; place-items: center; height: 64px; font: normal 32px/1 var(--f-mapa); color: var(--ouro-claro); background: rgba(6, 27, 30, .7); border: 1px solid rgba(241, 234, 216, .2); border-radius: 3px; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.janela-mfa .casas i:nth-child(3) { margin-right: 10px; }
.janela-mfa .casas i.cheia { border-color: var(--linha); }
.janela-mfa .codigo-casas.foco .casas i.atual { border-color: var(--ouro); background: rgba(6, 27, 30, .92); box-shadow: 0 0 0 3px rgba(240, 195, 90, .14); }
.janela-mfa .codigo-casas.foco .casas i.atual:empty::after { content: ""; width: 2px; height: 30px; background: var(--ouro); animation: piscar 1s steps(1) infinite; }
@keyframes piscar { 50% { opacity: 0; } }
.janela-mfa .codigo-casas.invalido .casas i { border-color: var(--erro); }
.janela-mfa.modo-recuperacao .casas { display: none; }
.janela-mfa.modo-recuperacao .codigo-casas .entrada { position: static; opacity: 1; min-height: 52px; caret-color: auto; letter-spacing: .06em; text-align: left; }
@media (max-width: 420px) { .janela-mfa .casas { gap: 5px; } .janela-mfa .casas i { height: 54px; font-size: 32px; } .janela-mfa .casas i:nth-child(3) { margin-right: 6px; } }
.janela-mfa .acoes { margin-top: 18px; }
.janela-mfa .mfa-estado:empty { display: none; }
.janela-mfa .mfa-rodape { align-items: center; justify-content: space-between; font: 600 13px/1.3 var(--f-texto); color: var(--osso-3); }
.janela-mfa .mfa-rodape form { margin: 0; }
