/* Mundos e Mapas: o visor do globo (3D/2D) e do mapa das cidades */
.mapa-v { position: relative; height: clamp(520px, 74vh, 780px); border-radius: 24px; overflow: hidden; isolation: isolate; color: var(--cream); outline: none;
  background: radial-gradient(120% 90% at 50% 40%, #12182a 0%, #07080f 55%, #030308 100%); box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.7); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.mapa-v.arrastando { cursor: grabbing; }
.mapa-v:focus-visible { box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--gold), 0 30px 60px -34px rgba(0, 0, 0, 0.7); }
@media (pointer: coarse) { .mapa-v { touch-action: pan-y; height: min(78svh, 620px); } }
.mapa-v::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;   /* estrelas */
  background-image: radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 86% 64%, #fff, transparent),
    radial-gradient(1px 1px at 30% 80%, #fff, transparent), radial-gradient(1px 1px at 52% 36%, #cfe6ff, transparent), radial-gradient(1px 1px at 6% 58%, #fff, transparent),
    radial-gradient(1px 1px at 92% 30%, #ffe9c4, transparent), radial-gradient(1px 1px at 40% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 62% 88%, #fff, transparent); }
.mapa-v canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity 0.45s ease; }
.mapa-v[data-vista="3d"] canvas.c2, .mapa-v[data-vista="2d"] canvas.gl, .mapa-v[data-vista="2d"] .halo { opacity: 0; pointer-events: none; }
.mapa-v[data-mundo] canvas, .mapa-v[data-mundo] .pinos-l { opacity: 0; }
.mapa-v.pronto[data-vista="3d"] canvas.gl, .mapa-v.pronto[data-vista="2d"] canvas.c2, .mapa-v.pronto .pinos-l { opacity: 1; }
.mapa-v .halo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: 0; transition: opacity 0.45s ease;
  background: radial-gradient(circle, rgba(130, 200, 255, 0.28) 38%, rgba(130, 200, 255, 0.08) 52%, transparent 70%); }
.mapa-v[data-mundo="moovar"] .halo { background: radial-gradient(circle, rgba(255, 170, 110, 0.26) 38%, rgba(255, 170, 110, 0.07) 52%, transparent 70%); }
.mapa-v .carrega { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(246, 241, 233, 0.5); transition: opacity 0.4s ease; }
.mapa-v.pronto .carrega { opacity: 0; }

/* alfinetes */
.pinos-l { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity 0.45s ease; }
.pino { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer;
  margin: -7px 0 0 -7px; transition: opacity 0.25s ease; white-space: nowrap; }
.pino i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(5, 5, 10, 0.55), 0 0 14px rgba(201, 162, 75, 0.8); transition: transform 0.25s ease; }
.pino.t-lugar i, .pino.t-cidade i { background: #f6f1e9; box-shadow: 0 0 0 3px rgba(5, 5, 10, 0.55), 0 0 12px rgba(255, 255, 255, 0.6); width: 11px; height: 11px; margin: 1.5px; }
/* lugares: o nome centralizado embaixo da bolinha (ou em cima, quando embaixo não cabe) */
.pino.t-lugar span, .pino.t-cidade span { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); text-align: center; }
.pino.recolhido { opacity: 0; pointer-events: none !important; }
/* a cidade em miniatura (a imagem se ajusta pela matriz do mapa.js: 100 px = o diâmetro) */
.mini-cid { position: absolute; left: 0; top: 0; width: 100px; height: 100px; transform-origin: 0 0; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)); }
.mini-cid.atras { opacity: 0; }
/* cidade com miniatura no planeta: de perto, a bolinha vira um círculo invisível do tamanho da miniatura e o nome desce para baixo dela */
.pino.com-mini.mini-grande i { width: calc(var(--rm) * 2); height: calc(var(--rm) * 2); margin: calc(1.5px - var(--rm) + 5.5px); background: transparent; box-shadow: none; transform: none !important; }
.pino.com-mini.mini-grande span { top: calc(var(--rm) + 8px); }
.pino.com-mini.mini-grande:hover span, .pino.com-mini.mini-grande.on span { color: var(--gold); }
/* nome de área (Antiga/Nova Agnor): sem bolinha, no centro da ilha, na mesma fonte dos lugares */
.pino[data-estilo="area"] { margin: 0; }
.pino[data-estilo="area"] i { display: none; }
.pino[data-estilo="area"] span { left: 0; top: 0; transform: translate(-50%, -50%); }
.pino[data-estilo="area"]:hover span, .pino[data-estilo="area"].on span { color: var(--gold); }

/* Plataforma ligada: Nova Agnor; desligada: Antiga Agnor e os vulcões que ficam embaixo dela */
.mapa-v:not(.sem-plataforma):not([data-mundo-atual="antigo"]) .pino[data-plat="sob"], .mapa-v.sem-plataforma .pino[data-plat="sobre"] { display: none; }
/* os lugares de cada mundo (o novo e o antigo) */
.mapa-v[data-mundo-atual="antigo"] .pino:not([data-mundo="antigo"]):not([data-mundo="ambos"]), .mapa-v:not([data-mundo-atual="antigo"]) .pino[data-mundo="antigo"] { display: none; }
.pino span { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.7); }
.pino:hover i, .pino:focus-visible i, .pino.on i { transform: scale(1.35); }
.pino:focus-visible { outline: none; } .pino:focus-visible span { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.pino.atras { opacity: 0; pointer-events: none; }
.pino.t-regiao, .pino.t-distrito { pointer-events: none; cursor: default; margin: 0; }
.pino.t-regiao[data-nacao] { pointer-events: auto; cursor: pointer; }
.pino.t-regiao[data-nacao]:hover span, .pino.t-regiao.on span { opacity: 1; }
.pino.t-regiao.on span { color: #ffd2cc; }
.sem-nomes .pino.t-regiao, .mapa-v[data-mundo-atual="antigo"] .pino.t-regiao { display: none; }
.pino.t-regiao i, .pino.t-distrito i { display: none; }
.pino.t-regiao span { transform: translate(-50%, -50%); font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(22px, 2.2vw, 32px); letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.85; }
.pino.t-distrito span { transform: translate(-50%, -50%); font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; opacity: 0.9; }
.mapa-v[data-cidade] .pino.t-ponto i { background: #fff; box-shadow: 0 0 0 3px rgba(5, 5, 10, 0.75), 0 0 0 5px var(--gold); }
/* legendas que ligam e desligam */
.sem-plataforma .pino.t-plataforma, .sem-lugares .pino.t-lugar, .sem-lugares .pino.t-cidade, .sem-pontos .pino.t-ponto, .sem-distritos .pino.t-distrito { display: none; }
.sem-nomes .pino span { opacity: 0; }
.sem-nomes .pino:hover span, .sem-nomes .pino:focus-visible span, .sem-nomes .pino.on span { opacity: 1; }

/* controles */
.mapa-v .ctl { position: absolute; z-index: 4; display: flex; gap: 8px; align-items: flex-start; cursor: default; }
.mapa-v .tl { left: 18px; top: 18px; } .mapa-v .tr { right: 18px; top: 18px; flex-direction: column; align-items: flex-end; }
.mapa-v .bl { left: 18px; bottom: 18px; } .mapa-v .br { right: 18px; bottom: 18px; flex-direction: column; }
.mapa-v .seg { display: flex; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(8, 8, 14, 0.72); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mapa-v .seg button, .mapa-v .leg-bt, .mapa-v .br button { font: inherit; font-size: 13px; font-weight: 500; color: rgba(246, 241, 233, 0.85); background: transparent; border: 0; cursor: pointer; border-radius: 999px; transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.mapa-v .seg button { padding: 8px 15px; }
.mapa-v .seg button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.mapa-v .seg button:hover, .mapa-v .seg button:focus-visible, .mapa-v .leg-bt:hover, .mapa-v .leg-bt:focus-visible, .mapa-v .br button:hover, .mapa-v .br button:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(8, 8, 14, 0.9), 0 0 0 3.5px var(--gold); }
.mapa-v .leg-bt { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: rgba(8, 8, 14, 0.72); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mapa-v .leg-bt svg { width: 16px; height: 16px; }
.mapa-v .leg-bt[aria-expanded="true"] { background: var(--cream); color: var(--ink); }
.mapa-v .leg { min-width: 230px; padding: 14px 16px; border-radius: 18px; background: rgba(8, 8, 14, 0.86); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.mapa-v .leg h4 { margin: 0 0 8px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.mapa-v .leg h4:not(:first-child) { margin-top: 14px; }
.mapa-v .leg label { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 7px 0; font-size: 14px; cursor: pointer; }
.mapa-v .leg label span { display: inline-flex; align-items: center; gap: 10px; }
.mapa-v .leg label em { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mapa-v .leg input { appearance: none; -webkit-appearance: none; flex: none; width: 36px; height: 20px; margin: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.18); position: relative; cursor: pointer; transition: background 0.2s ease; }
.mapa-v .leg input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; }
.mapa-v .leg input:checked { background: var(--gold); }
.mapa-v .leg input:checked::after { transform: translateX(16px); }
.mapa-v .leg input:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(8, 8, 14, 0.9), 0 0 0 3.5px var(--gold); }
.mapa-v .br .zs { -webkit-appearance: none; appearance: none; writing-mode: vertical-lr; direction: rtl; width: 42px; height: 120px; margin: 0; padding: 12px 0; border-radius: 999px; cursor: pointer;
  background: rgba(8, 8, 14, 0.72) linear-gradient(rgba(246, 241, 233, 0.35), rgba(246, 241, 233, 0.35)) center / 2px calc(100% - 24px) no-repeat; border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mapa-v .br .zs::-webkit-slider-runnable-track { background: transparent; border: 0; }
.mapa-v .br .zs::-moz-range-track { background: transparent; border: 0; }
.mapa-v .br .zs::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 2px solid rgba(8, 8, 14, 0.9); }
.mapa-v .br .zs::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 2px solid rgba(8, 8, 14, 0.9); }
.mapa-v .br .zs:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(8, 8, 14, 0.9), 0 0 0 3.5px var(--gold); }
.mapa-v .br button { width: 42px; height: 42px; display: grid; place-items: center; font-size: 20px; line-height: 1; background: rgba(8, 8, 14, 0.72); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.mapa-v .br button svg { width: 18px; height: 18px; }
.mapa-v .dica, .mapa-v .aviso-rolar { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(8, 8, 14, 0.6);
  font-size: 12.5px; letter-spacing: 0.04em; color: rgba(246, 241, 233, 0.8); pointer-events: none; white-space: nowrap; transition: opacity 0.6s ease; }
.mapa-v .dica.some { opacity: 0; }
.mapa-v .aviso-rolar { bottom: auto; top: 50%; transform: translate(-50%, -50%); opacity: 0; background: rgba(8, 8, 14, 0.82); font-size: 14px; padding: 12px 20px; }
.mapa-v.avisa-rolar .aviso-rolar { opacity: 1; }
.mapa-v .bl .seg.estacao button { padding: 8px 13px; }

/* cartão do alfinete */
.mapa-v .cartao { position: absolute; z-index: 5; right: 18px; top: 50%; transform: translateY(-50%); width: min(340px, calc(100% - 36px)); padding: 26px 26px 24px; border-radius: 20px; cursor: default;
  background: rgba(10, 10, 16, 0.9); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); animation: ct-entra 0.45s cubic-bezier(0.22, 0.7, 0.25, 1); }
@keyframes ct-entra { from { opacity: 0; transform: translateY(-46%); } to { opacity: 1; transform: translateY(-50%); } }
.mapa-v .cartao[hidden] { display: none; }
.mapa-v .ct-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.mapa-v .ct-x:hover, .mapa-v .ct-x:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(8, 8, 14, 0.9), 0 0 0 3.5px var(--gold); }
.mapa-v .ct-k { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.mapa-v .cartao h3 { margin: 10px 0 0; font-family: var(--serif); font-weight: 500; font-size: 36px; line-height: 1.05; color: #fff; }
.mapa-v .cartao p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: rgba(246, 241, 233, 0.78); }
.mapa-v .cartao .btn { margin-top: 20px; --gap: #0a0a10; height: 48px; font-size: 14px; }
.mapa-v .cartao .btn.breve { background: transparent; color: rgba(246, 241, 233, 0.7); box-shadow: inset 0 0 0 1px rgba(246, 241, 233, 0.35); cursor: default; }
/* ilustração do lugar no topo do cartão (encosta nas bordas) e miniaturas quando há mais de uma */
.mapa-v .cartao.com-foto { width: min(380px, calc(100% - 36px)); padding-top: 0; top: 76px; right: 76px; transform: none; max-height: calc(100% - 152px); overflow: hidden auto; scrollbar-width: thin; animation-name: ct-entra-f; }
@keyframes ct-entra-f { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.mapa-v .ct-fotos { margin: 0 -26px 20px; }
.mapa-v .ct-fotos[hidden] { display: none; }
.mapa-v .ct-foto { position: relative; display: block; width: 100%; aspect-ratio: 16 / 7.5; padding: 0; border: 0; background: #14141c; cursor: zoom-in; overflow: hidden; }
.mapa-v .ct-foto img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.22, 0.7, 0.25, 1); }
.mapa-v .ct-foto:hover img, .mapa-v .ct-foto:focus-visible img { transform: scale(1.04); }
.mapa-v .ct-foto:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--gold); }
.mapa-v .ct-foto::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgba(10, 10, 16, 0.75)); pointer-events: none; }
.mapa-v .ct-amp { position: absolute; z-index: 1; right: 12px; bottom: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(10, 10, 16, 0.6); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background 0.25s, color 0.25s; }
.mapa-v .ct-amp svg { width: 13px; height: 13px; }
.mapa-v .ct-foto:hover .ct-amp, .mapa-v .ct-foto:focus-visible .ct-amp { background: #fff; color: #0a0a10; }
.mapa-v .ct-mini { display: flex; gap: 8px; padding: 12px 26px 0; }
.mapa-v .ct-mini:empty { display: none; }
.mapa-v .ct-mini button { width: 58px; height: 38px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #14141c; cursor: pointer; opacity: 0.55; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); transition: opacity 0.25s, box-shadow 0.25s; }
.mapa-v .ct-mini button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mapa-v .ct-mini button[aria-pressed="true"], .mapa-v .ct-mini button:hover, .mapa-v .ct-mini button:focus-visible { outline: none; opacity: 1; box-shadow: 0 0 0 1.5px var(--gold); }
.mapa-v .cartao.com-foto .ct-x { z-index: 2; background: rgba(10, 10, 16, 0.55); border-color: rgba(255, 255, 255, 0.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* tela cheia da ilustração (fica no body, fora do visor) */
html.sem-rolar { overflow: hidden; }
.foto-v { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: clamp(16px, 4vw, 56px); background: rgba(6, 6, 10, 0.97); cursor: zoom-out; animation: fv-entra 0.35s ease; }
.foto-v[hidden] { display: none; }
@keyframes fv-entra { from { opacity: 0; } to { opacity: 1; } }
.foto-v img { max-width: 100%; max-height: calc(100vh - 2 * clamp(16px, 4vw, 56px)); max-height: calc(100dvh - 2 * clamp(16px, 4vw, 56px)); width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9); cursor: default; }
.foto-v button { position: absolute; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(10, 10, 16, 0.55); color: #fff; line-height: 1; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: box-shadow 0.25s; }
.foto-v button:hover, .foto-v button:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(8, 8, 14, 0.9), 0 0 0 3.5px var(--gold); }
.foto-v .fv-x { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 22px; }
.foto-v .fv-s { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 30px; padding-bottom: 4px; }
.foto-v .fv-ant { left: 18px; } .foto-v .fv-pro { right: 18px; }
.foto-v.so-uma .fv-s { display: none; }
.foto-v .fv-n { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 12px; letter-spacing: 0.22em; color: rgba(246, 241, 233, 0.7); }
@media (max-width: 700px) {
  .mapa-v .cartao { top: auto; bottom: 12px; right: 12px; left: 12px; width: auto; transform: none; padding: 20px; animation: none; }
  .mapa-v .cartao h3 { font-size: 28px; }
  .mapa-v .cartao.com-foto { width: auto; top: auto; right: 12px; max-height: calc(100% - 84px); animation: none; } .mapa-v .ct-fotos { margin: 0 -20px 16px; } .mapa-v .ct-mini { padding: 10px 20px 0; } .mapa-v .ct-foto { aspect-ratio: 16 / 6.5; }
  .mapa-v.com-cartao .br, .mapa-v.com-cartao .bl, .mapa-v.com-cartao .dica { opacity: 0; pointer-events: none; }
  .mapa-v .tl { left: 12px; top: 12px; } .mapa-v .tr { right: 12px; top: 12px; } .mapa-v .bl { left: 12px; bottom: 12px; } .mapa-v .br { right: 12px; bottom: 12px; }
  .mapa-v .seg button { padding: 7px 11px; font-size: 12px; } .mapa-v .bl .seg.estacao button { padding: 7px 8px; font-size: 11px; }
  .mapa-v .leg-bt { padding: 9px 13px; font-size: 12px; }
  .mapa-v .br button { width: 38px; height: 38px; } .mapa-v .br .zs { width: 38px; height: 96px; }
  .mapa-v .bl { right: 62px; } .mapa-v .bl .seg { flex-wrap: wrap; border-radius: 18px; }
  .mapa-v .dica { bottom: auto; top: 64px; white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 40px); }
}
/* no mapa das cidades os nomes ganham um fundo, para ler em qualquer cor de bairro */
.mapa-v[data-cidade] .pino span { padding: 3px 9px; border-radius: 999px; background: rgba(8, 8, 14, 0.66); text-shadow: none; }
.mapa-v[data-cidade] .pino.t-distrito span { background: rgba(8, 8, 14, 0.5); }

/* arquivo selado (mundo antigo) e maré */
.mapa-v .selo-bt { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  color: var(--gold); background: rgba(8, 8, 14, 0.72); border: 1px solid rgba(201, 162, 75, 0.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: box-shadow 0.2s ease; }
.mapa-v .selo-bt svg { width: 14px; height: 14px; }
.mapa-v .selo-bt:hover, .mapa-v .selo-bt:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(8, 8, 14, 0.9), 0 0 0 3.5px var(--gold); }
.mapa-v .selo-bt[hidden], .mapa-v .mundo-c[hidden], .mapa-v .selo-p[hidden] { display: none; }
/* Leerah: eras; o cadeado ao lado libera as eras seladas */
.mapa-v .eras { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mapa-v .eras-bt, .mapa-v .eras-rs { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; cursor: pointer; color: var(--gold);
  background: rgba(8, 8, 14, 0.72); border: 1px solid rgba(201, 162, 75, 0.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: box-shadow 0.2s ease; }
.mapa-v .eras-rs { color: rgba(246, 241, 233, 0.7); border-color: rgba(255, 255, 255, 0.18); }
.mapa-v .eras-bt svg, .mapa-v .eras-rs svg { width: 14px; height: 14px; }
.mapa-v .eras-bt:hover, .mapa-v .eras-bt:focus-visible, .mapa-v .eras-rs:hover, .mapa-v .eras-rs:focus-visible { outline: none; color: var(--gold); box-shadow: 0 0 0 2px rgba(8, 8, 14, 0.9), 0 0 0 3.5px var(--gold); }
.mapa-v .eras-bt[hidden], .mapa-v .eras-rs[hidden] { display: none; }
.mapa-v .mundo-c { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.mapa-v .mare { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 999px; font-size: 12.5px; color: rgba(246, 241, 233, 0.85);
  background: rgba(8, 8, 14, 0.72); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity 0.3s ease; }
.mapa-v .mare .m-t { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-right: 4px; }
.mapa-v .mare input { width: 140px; accent-color: var(--gold); cursor: pointer; }
.mapa-v:not([data-mundo-atual="antigo"]) .mare { display: none; }
.mapa-v .selo-p { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(400px, calc(100% - 36px)); padding: 28px 28px 24px; border-radius: 20px; text-align: left; cursor: default;
  background: rgba(10, 10, 16, 0.92); border: 1px solid rgba(201, 162, 75, 0.35); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); }
.mapa-v .selo-p .ct-k { display: inline-flex; align-items: center; gap: 8px; }
.mapa-v .selo-p .ct-k svg { width: 13px; height: 13px; }
.mapa-v .selo-p h3 { margin: 12px 0 0; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; color: #fff; }
.mapa-v .selo-p p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: rgba(246, 241, 233, 0.78); }
.mapa-v .selo-p form { display: flex; gap: 10px; margin-top: 18px; }
.mapa-v .selo-p input { flex: 1; min-width: 0; height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(246, 241, 233, 0.3); background: rgba(5, 5, 10, 0.6); color: #fff; font: inherit; font-size: 15px; outline: none; }
.mapa-v .selo-p input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.22); }
.mapa-v .selo-p .btn { height: 48px; --gap: #0a0a10; flex: none; }
.mapa-v .selo-p .btn[disabled] { opacity: 0.6; cursor: wait; }
.mapa-v .selo-p .selo-av { min-height: 1.4em; margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 17px; color: #e7a08f; }
.mapa-v .selo-p.treme { animation: selo-treme 0.45s ease; }
@keyframes selo-treme { 0%, 100% { transform: translate(-50%, -50%); } 20%, 60% { transform: translate(calc(-50% - 7px), -50%); } 40%, 80% { transform: translate(calc(-50% + 7px), -50%); } }
.mapa-v .nome-mundo .sub-mundo { display: block; margin-top: 2px; text-align: center; font-family: var(--sans, inherit); font-style: normal; font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.mapa-v .nome-mundo .sub-mundo:empty, .mapa-v:not([data-mundo-atual="antigo"]) .nome-mundo .sub-mundo { display: none; }
@media (max-width: 700px) { .mapa-v .mare input { width: 100px; } .mapa-v .selo-p form { flex-direction: column; } .mapa-v .selo-p h3 { font-size: 24px; } }

/* depois de uns segundos parado, os controles somem e o mapa fica limpo; qualquer movimento traz de volta */
.mapa-v .ctl, .mapa-v .dica { transition: opacity 0.6s ease; }
.mapa-v.quieto .ctl, .mapa-v.quieto .dica, .mapa-v.quieto .aviso-rolar { opacity: 0 !important; pointer-events: none !important; }
/* mundo antigo aberto: o cadeado ao lado do seletor fecha de novo */
.mapa-v .mundo-l { display: flex; align-items: center; gap: 8px; }
.mapa-v .resela { display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; border-radius: 50%; cursor: pointer; color: var(--gold);
  background: rgba(8, 8, 14, 0.72); border: 1px solid rgba(201, 162, 75, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: box-shadow 0.25s ease; }
.mapa-v .resela svg { width: 15px; height: 15px; }
.mapa-v .resela:hover, .mapa-v .resela:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(8, 8, 14, 0.9), 0 0 0 3.5px var(--gold), 0 0 18px rgba(201, 162, 75, 0.5); }

/* Nova Agnor: cada tipo de lugar tem a sua cor e a sua legenda; os mais importantes se destacam */
.mapa-v[data-cidade] .pino[data-cat] i { width: 11px; height: 11px; margin: 1.5px; background: var(--pc); box-shadow: 0 0 0 3px rgba(5, 5, 10, 0.7), 0 0 12px var(--pc); }
.mapa-v[data-cidade] .pino[data-cat] span { position: absolute; left: 50%; top: 15px; transform: translateX(-50%); text-align: center; font-size: 12px; }
.mapa-v[data-cidade] .pino[data-destaque] { margin: -10px 0 0 -10px; }
.mapa-v[data-cidade] .pino[data-destaque] i { width: 18px; height: 18px; margin: 1px; box-shadow: 0 0 0 3px rgba(5, 5, 10, 0.75), 0 0 0 5px var(--gold), 0 0 18px var(--pc); }
.mapa-v[data-cidade] .pino[data-destaque] span { top: 24px; font-size: 14px; font-weight: 700; letter-spacing: 0.05em; }
.pino[data-cat="locais"] { --pc: #f6f1e9; } .pino[data-cat="personagens"] { --pc: #35e0ff; } .pino[data-cat="vulcoes"] { --pc: #ff7a3c; }
.pino[data-cat="antiga"] { --pc: #e2c27a; } .pino[data-cat="festas"] { --pc: #ff3fd2; }
/* de longe só os nomes dos mais importantes; os outros aparecem ao aproximar (ou passando o mouse) */
.mapa-v[data-cidade]:not(.perto) .pino[data-cat]:not([data-destaque]) span { opacity: 0; }
.mapa-v[data-cidade] .pino[data-cat]:hover span, .mapa-v[data-cidade] .pino[data-cat].on span, .mapa-v[data-cidade] .pino[data-cat]:focus-visible span { opacity: 1; z-index: 2; }
.sem-locais .pino[data-cat="locais"], .sem-personagens .pino[data-cat="personagens"], .sem-vulcoes .pino[data-cat="vulcoes"],
.sem-antiga .pino[data-cat="antiga"], .sem-festas .pino[data-cat="festas"] { display: none; }
/* nomes em várias linhas; o que só aparece de longe ou só de perto; o nome que aparece sempre */
.pino span.linhas span, .mapa-v[data-cidade] .pino[data-cat] span.linhas span { display: block; position: static; transform: none; top: auto; left: auto; }
.mapa-v[data-cidade] .pino[data-grande] span.linhas span:first-child { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: 0.04em; line-height: 1.05; }
.mapa-v[data-cidade] .pino[data-sub] span.linhas span + span { font-size: 11px; font-weight: 500; font-style: italic; letter-spacing: 0.06em; opacity: 0.85; }
.mapa-v[data-cidade] .pino.fz { display: none; }
.mapa-v[data-cidade] .pino[data-lado="acima"] span:not(.linhas span) { top: auto; bottom: 15px; }
.mapa-v[data-cidade] .pino[data-destaque][data-lado="acima"] span:not(.linhas span) { bottom: 24px; }
.mapa-v[data-cidade] .pino[data-lado="esquerda"] span:not(.linhas span) { left: auto; right: 22px; top: 50%; transform: translateY(-50%); text-align: right; }
.mapa-v[data-cidade] .pino[data-lado="direita"] span:not(.linhas span) { left: 22px; top: 50%; transform: translateY(-50%); text-align: left; }
.mapa-v[data-cidade]:not(.perto) .pino[data-cat][data-sempre] span { opacity: 1; }
/* Nomes desligados na legenda: some tudo, inclusive os que aparecem sempre (só o lugar escolhido ou com o mouse em cima) */
.mapa-v[data-cidade].sem-nomes .pino[data-cat] span { opacity: 0 !important; }
.mapa-v[data-cidade].sem-nomes .pino[data-cat]:hover span, .mapa-v[data-cidade].sem-nomes .pino[data-cat].on span, .mapa-v[data-cidade].sem-nomes .pino[data-cat]:focus-visible span { opacity: 1 !important; }
.mapa-v[data-cidade].sem-nomes .pino[data-cat] span.linhas span { opacity: 1 !important; }
/* nome curto de longe e inteiro de perto (Torre); as linhas sempre centralizadas */
.pino span.linhas { text-align: center; white-space: nowrap; }
.mapa-v[data-cidade] .pino span.linhas span { padding: 0; border-radius: 0; background: none; }   /* um balão só para as duas linhas */
.mapa-v[data-cidade]:not(.perto) .pino[data-curto] span.linhas, .mapa-v[data-cidade].perto .pino[data-curto] span.curto { display: none; }
/* no planeta: o nome em cima da bolinha (Saída Túnel Colhedores) */
.pino.t-lugar[data-lado="acima"] span { top: auto; bottom: 16px; }
.mapa-v[data-cidade] .pino.nome-oculto span { opacity: 0; }
.mapa-v[data-cidade] .pino.nome-oculto:hover span, .mapa-v[data-cidade] .pino.nome-oculto.on span { opacity: 1; }

/* ---------- Índice: os lugares em ordem alfabética, com busca; clicar leva ao lugar no mapa ---------- */
.mapa-v .ind-bt { margin-top: 2px; }
.mapa-v .ctl.tr:has(.ind:not([hidden])) { z-index: 6; }   /* o índice aberto fica por cima dos botões de zoom */
.mapa-v .ind { display: flex; flex-direction: column; width: min(300px, calc(100vw - 60px)); max-height: 420px; padding: 12px; border-radius: 18px; background: rgba(8, 8, 14, 0.86); border: 1px solid rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.mapa-v .ind[hidden] { display: none; }
.mapa-v .ind input { flex: none; width: 100%; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); color: #fff; font: inherit; font-size: 14px; }
.mapa-v .ind input::placeholder { color: rgba(246, 241, 233, 0.5); }
.mapa-v .ind input:focus-visible { outline: none; border-color: transparent; box-shadow: 0 0 0 2px rgba(8, 8, 14, 0.9), 0 0 0 3.5px var(--gold); }
.mapa-v .ind-l { flex: 1 1 auto; min-height: 0; margin: 10px 0 0; padding: 0 4px 0 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
.mapa-v .ind-l .letra { padding: 10px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2em; color: var(--gold); }
.mapa-v .ind-l button { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: rgba(246, 241, 233, 0.9); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.mapa-v .ind-l button small { flex: none; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(246, 241, 233, 0.45); }
.mapa-v .ind-l button:hover, .mapa-v .ind-l button:focus-visible { outline: none; background: rgba(255, 255, 255, 0.09); color: #fff; }
.mapa-v .ind-l mark { background: none; color: var(--gold); }
.mapa-v .ind-v { margin: 14px 10px 6px; font-size: 13px; color: rgba(246, 241, 233, 0.55); }

/* cartão do lugar sempre no mesmo lugar (computador): no canto superior esquerdo, abaixo do nome do planeta.
   Ferramentas (Legendas, Índice) ficam à direita: os dois podem ficar abertos ao mesmo tempo. Medidas do mapa.js (--ct-t, --ct-l, --ct-h). */
@media (min-width: 701px) {
  .mapa-v .cartao.ancorado, .mapa-v .cartao.ancorado.com-foto { top: var(--ct-t) !important; left: var(--ct-l) !important; right: auto !important; bottom: auto !important;
    transform: translateY(-50%) !important; max-height: var(--ct-h) !important; overflow: hidden auto; scrollbar-width: thin; animation: ct-entra-a 0.4s cubic-bezier(0.22, 0.7, 0.25, 1); }
  @keyframes ct-entra-a { from { opacity: 0; translate: -10px 0; } to { opacity: 1; translate: 0 0; } }
}
/* celular: com Legendas ou Índice abertos o cartão sai da frente e volta quando o painel fecha */
@media (max-width: 700px) {
  .mapa-v:has(.leg:not([hidden])) .cartao, .mapa-v:has(.ind:not([hidden])) .cartao { display: none !important; }
}

/* Legendas e Índice lado a lado no topo; os painéis abrem embaixo, alinhados à direita */
.mapa-v .tr-bts { display: flex; gap: 8px; }
.mapa-v .ind-bt { margin-top: 0 !important; }
.mapa-v .tr { z-index: 6; }   /* os painéis ficam por cima dos controles de zoom quando se encostam */
@media (max-width: 560px) {   /* celular: os dois botões só com o ícone, para caberem ao lado do nome do planeta */
  .mapa-v .tr-bts .leg-bt { font-size: 0; gap: 0; padding: 10px; }
  .mapa-v .tr-bts .leg-bt svg { width: 17px; height: 17px; }
}

/* cadeado e centralizar lado a lado, embaixo da coluna do zoom */
.mapa-v .br { align-items: flex-end; }   /* a coluna do zoom fica em cima do botão da direita (centralizar) */
.mapa-v .br-l { display: flex; gap: 8px; }
/* explicação dos controles ao passar o mouse: um balão pequeno à esquerda do botão */
.mapa-v .br [data-dica], .mapa-v .br .trava { position: relative; }
.mapa-v .br [data-dica]::after, .mapa-v .br .trava::after { position: absolute; right: calc(100% + 10px); top: 50%; translate: 4px -50%; z-index: 7; white-space: nowrap;
  padding: 7px 11px; border-radius: 9px; background: rgba(8, 8, 14, 0.94); border: 1px solid rgba(255, 255, 255, 0.16); color: #f6f1e9;
  font: 500 12.5px/1.2 var(--sans, sans-serif); letter-spacing: 0; opacity: 0; pointer-events: none; transition: opacity 0.18s ease, translate 0.18s ease; }
.mapa-v .br [data-dica]::after { content: attr(data-dica); }
.mapa-v .br .trava[aria-pressed="true"]::after { content: attr(data-dica-on); }
.mapa-v .br .trava[aria-pressed="false"]::after { content: attr(data-dica-off); }
.mapa-v .br-l .rc::after { top: auto; bottom: calc(100% + 8px); right: calc(100% - 6px); translate: 0 4px; }   /* o centralizar: o balão sai por cima e para a esquerda, sem cobrir o zoom */
@media (hover: hover) {
  .mapa-v .br [data-dica]:hover::after, .mapa-v .br .trava:hover::after { opacity: 1; translate: 0 -50%; transition-delay: 0.35s; }
  .mapa-v .br-l .rc:hover::after { translate: 0 0; }
}

/* Sessões de Moraville: o rótulo que acompanha o mouse */
.ses-rot { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; padding: 9px 13px; border-radius: 12px; background: rgba(8, 8, 14, 0.82); color: #fff; box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.7); max-width: 280px; }
.ses-rot b { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.ses-rot small { display: block; margin-top: 3px; font-size: 11px; color: var(--gold); letter-spacing: 0.04em; }
@media (hover: none) { .ses-rot small { display: none; } }

/* celular e tablet: o Safari do iPhone põe um recuo lateral padrão nos botões; nos botões redondos de tamanho fixo
   isso empurrava o ícone para a direita e esticava o botão. Sem o recuo, o ícone fica no centro. */
@media (hover: none), (max-width: 860px) {
  .mapa-v .br button, .mapa-v .ct-x, .mapa-v .ct-amp, .foto-v .fv-x { padding: 0; }
  .foto-v .fv-s { padding: 0 0 4px; }
  .mapa-v .ct-x { display: grid; place-items: center; }
}

/* régua de escala (cidade selada): embaixo, no centro; de longe, o diâmetro inteiro da cidade */
.mapa-v .regua { position: absolute; left: 50%; bottom: 16px; z-index: 3; transform: translateX(-50%); pointer-events: none; }
.mapa-v .regua span { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 7px; padding: 6px 11px; border-radius: 999px; white-space: nowrap; background: rgba(18, 20, 24, 0.84);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); font: 600 12px/1 Inter, system-ui, sans-serif; letter-spacing: 0.08em; color: #fff; }
.mapa-v .regua i { display: block; height: 10px; border: 3px solid #1d2024; border-top: 0; border-radius: 0 0 2px 2px; transition: width 0.15s linear;
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)); }
