/* ==========================================================================
   Viagens — índice com mapa e estante de álbuns; página da viagem em fotobook.
   Prefixo .vg-. Cores só pelos tokens de base.css (exceto véus sobre fotos).
   ========================================================================== */

.vg {
  --vg-manuscrito: "Caveat", "Fraunces", Georgia, serif;
  --vg-papel: color-mix(in srgb, var(--surface) 92%, var(--accent-soft));
  --vg-veu: rgba(12, 9, 6, .82);
}
.vg-bandeira { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; line-height: 1; }
.vg h2 { text-wrap: balance; }

/* ---------- Índice: hero ---------- */
.vg-hero-indice {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 56px);
  background:
    radial-gradient(60% 80% at 85% 20%, var(--accent-soft), transparent 70%),
    radial-gradient(40% 60% at 0% 100%, var(--bg-alt), transparent 70%);
  overflow: hidden;
}
.vg-hero-grade { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.vg-hero-texto h1 { font-size: clamp(2.8rem, 8vw, 5.4rem); letter-spacing: -.03em; margin-bottom: .2em; }
.vg-hero-texto .lead { margin-bottom: 1.6em; }

.vg-numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; max-width: 560px; }
.vg-numeros > div {
  display: flex; flex-direction: column-reverse; gap: 2px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  border: 1px solid var(--border);
}
.vg-numeros dd { margin: 0; font: 650 clamp(1.6rem, 3.6vw, 2.2rem)/1 var(--font-display); color: var(--accent); font-variant-numeric: lining-nums; }
.vg-numeros dt { font-size: .78rem; color: var(--muted); line-height: 1.25; }

.vg-paises { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.vg-paises li {
  display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 500;
  padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
}
.vg-paises .vg-bandeira { font-size: 1.15rem; }

/* Colagem de polaroids */
.vg-colagem { position: relative; height: clamp(300px, 34vw, 420px); }
.vg-polaroid {
  position: absolute; margin: 0; width: 64%;
  background: var(--surface); padding: 10px 10px 0; border-radius: 3px;
  box-shadow: var(--shadow-lg);
  transition: transform .4s ease;
}
.vg-polaroid img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: 2px; }
.vg-polaroid figcaption {
  font: 600 1.25rem/1.1 var(--vg-manuscrito); color: var(--muted);
  padding: 10px 4px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vg-polaroid-1 { right: 0; top: 4%; transform: rotate(4deg); z-index: 3; }
.vg-polaroid-2 { left: 0; top: 18%; transform: rotate(-6deg); z-index: 2; }
.vg-polaroid-3 { right: 16%; top: 40%; transform: rotate(-1.5deg); z-index: 1; opacity: .96; }
.vg-colagem:hover .vg-polaroid-1 { transform: rotate(6deg) translate(10px, -6px); }
.vg-colagem:hover .vg-polaroid-2 { transform: rotate(-9deg) translate(-10px, 0); }

/* ---------- Índice: mapa ---------- */
.vg-secao-mapa { margin-top: clamp(16px, 3vw, 32px); }
.vg-mapa-topo, .vg-estante-topo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 18px; }
.vg-mapa-topo h2, .vg-estante-topo h2 { margin: 0; }

.vg-alternador {
  display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--border);
}
.vg-alternador button {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .92rem;
  transition: background .2s, color .2s, box-shadow .2s;
}
.vg-alternador button:hover:not(:disabled) { color: var(--text); }
.vg-alternador button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.vg-alternador button:disabled { opacity: .5; cursor: not-allowed; }
.vg-contador {
  font-size: .72rem; min-width: 22px; padding: 1px 6px; border-radius: 999px; text-align: center;
  background: var(--accent-soft); color: var(--link);
}

.vg-mapa-moldura { position: relative; }
.vg-mapa-grande { height: clamp(380px, 64vh, 640px); box-shadow: var(--shadow); }
.vg-mapa-legenda { font-size: .88rem; color: var(--muted); margin: 10px 2px 0; }

/* Marcador de viagem: foto redonda com ponta */
.vg-pin { background: none; border: 0; }
.vg-pin-foto {
  position: relative; display: block; width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--surface); background: var(--accent) center / cover no-repeat;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  transition: transform .2s ease;
}
.vg-pin-foto::after {
  content: ""; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
  border: 8px solid transparent; border-top: 9px solid var(--surface); border-bottom: 0;
}
.vg-pin-bandeira {
  position: absolute; right: -6px; top: -4px; font-size: 16px; line-height: 1;
  background: var(--surface); border-radius: 50%; padding: 3px; box-shadow: var(--shadow);
}
.vg-pin:hover .vg-pin-foto, .vg-pin:focus .vg-pin-foto { transform: translateY(-3px) scale(1.08); }
.vg-pin:focus { outline: none; }
.vg-pin:focus-visible .vg-pin-foto { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Miniaturas de foto no mapa e clusters */
.vg-fotomarca { background: none; border: 0; }
.vg-fotomarca-img, .vg-cluster-img {
  display: block; width: 100%; height: 100%; border-radius: 10px;
  border: 3px solid var(--surface); background: var(--bg-alt) center / cover no-repeat;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35); transition: transform .2s ease;
}
.vg-fotomarca:hover .vg-fotomarca-img, .vg-cluster:hover .vg-cluster-img { transform: scale(1.08); }
.vg-fotomarca:focus { outline: none; }
.vg-fotomarca:focus-visible .vg-fotomarca-img, .vg-cluster:focus-visible .vg-cluster-img { outline: 3px solid var(--accent); outline-offset: 2px; }
.vg-cluster { background: none; border: 0; }
.vg-cluster-img { position: relative; }
.vg-cluster-img::before {
  content: ""; position: absolute; inset: -3px; border-radius: 10px; z-index: -1;
  transform: rotate(8deg) translate(4px, 2px); background: var(--surface); box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
.vg-cluster-n {
  position: absolute; right: -9px; top: -9px; min-width: 26px; height: 26px; padding: 0 7px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); font: 700 .78rem/1 var(--font-body);
  border: 2px solid var(--surface); box-shadow: var(--shadow);
}

/* Popup das viagens */
.vg-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); color: var(--text); }
.vg-popup .leaflet-popup-content { margin: 0; width: 240px !important; }
.vg-popup .leaflet-popup-tip { background: var(--surface); }
.vg-popup a.leaflet-popup-close-button { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); top: 6px; right: 6px; }
.vg-popup-capa { display: block; aspect-ratio: 3 / 2; background: var(--bg-alt) center / cover no-repeat; }
.vg-popup-corpo { padding: 12px 14px 14px; }
.vg-popup-corpo p { margin: 0 0 2px; font-size: .8rem; color: var(--muted); }
.vg-popup-corpo h3 { font-size: 1.08rem; margin: 2px 0 8px; }
.vg-popup-corpo a { font-weight: 600; font-size: .88rem; text-decoration: none; }
.leaflet-container a.vg-popup-link { color: var(--link); }
.vg-popup-acoes { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.leaflet-container a.vg-popup-gmaps { color: var(--muted); font-weight: 500; font-size: .82rem; }
.leaflet-container a.vg-popup-gmaps:hover { color: var(--link); text-decoration: underline; }

/* Controles do Leaflet seguindo o tema */
.vg .leaflet-bar a { background: var(--surface); color: var(--text); border-bottom-color: var(--border); }
.vg .leaflet-bar a:hover { background: var(--bg-alt); }
.vg .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); }
.vg .leaflet-control-attribution a { color: var(--link); }

/* ---------- Índice: estante de álbuns ---------- */
.vg-estante { margin-top: clamp(48px, 8vw, 96px); }
.vg-filtros { margin: 0; }
.vg-filtros .filtro { display: inline-flex; align-items: center; gap: 6px; }

.vg-ano { margin-top: clamp(28px, 5vw, 56px); }
.vg-ano-titulo {
  display: flex; align-items: center; gap: 18px; margin: 0 0 24px;
  font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--muted); font-weight: 500; font-style: italic;
}
.vg-ano-titulo::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.vg-livros { display: grid; gap: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 36px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.vg-livro-link { display: block; color: var(--text); text-decoration: none; }
.vg-livro-link:hover { color: var(--text); }
.vg-livro-capa {
  position: relative; aspect-ratio: 4 / 3; border-radius: 4px 14px 14px 4px; overflow: hidden;
  /* Efeito de livro: borda de páginas à direita e sombra */
  box-shadow:
    1px 1px 0 var(--border),
    5px 5px 0 -1px var(--surface), 5px 5px 0 0 var(--border),
    9px 9px 0 -1px var(--surface), 9px 9px 0 0 var(--border),
    var(--shadow-lg);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
  margin-right: 10px;
}
.vg-livro-capa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.vg-livro-lombada {
  position: absolute; left: 0; top: 0; bottom: 0; width: 22px; z-index: 2;
  background: linear-gradient(90deg, rgba(0, 0, 0, .45), rgba(255, 255, 255, .22) 35%, rgba(0, 0, 0, .18) 65%, rgba(0, 0, 0, 0));
}
.vg-livro-rotulo {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 48px 20px 18px 36px; color: #fff;
  background: linear-gradient(to top, var(--vg-veu), rgba(12, 9, 6, .45) 55%, transparent);
}
.vg-livro-lugar { margin: 0 0 4px; font-size: .82rem; font-weight: 500; letter-spacing: .02em; opacity: .92; display: flex; gap: 6px; align-items: center; }
.vg-livro-lugar .vg-bandeira { font-size: 1.05rem; }
.vg-livro-titulo { margin: 0; color: #fff; font-size: clamp(1.35rem, 2.4vw, 1.7rem); line-height: 1.12; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.vg-livro-info { padding: 18px 12px 0 4px; }
.vg-livro-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 8px; font-size: .82rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.vg-livro-meta span + span::before { content: "·"; margin-right: 14px; color: var(--muted); }
.vg-livro-resumo { color: var(--muted); margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vg-livro-abrir { font-weight: 600; font-size: .92rem; color: var(--link); }
.vg-livro-abrir span { display: inline-block; transition: transform .2s; }
.vg-livro-link:hover .vg-livro-capa, .vg-livro-link:focus-visible .vg-livro-capa { transform: translateY(-6px) rotate(-.6deg); }
.vg-livro-link:hover .vg-livro-capa img { transform: scale(1.04); }
.vg-livro-link:hover .vg-livro-abrir span { transform: translateX(4px); }
.vg-livro-link:focus-visible { outline: none; }
.vg-livro-link:focus-visible .vg-livro-capa { outline: 3px solid var(--accent); outline-offset: 4px; }
.vg-livro[hidden], .vg-ano[hidden] { display: none; }

/* Ano com um único álbum: capa grande e texto ao lado, como um livro aberto */
.vg-livros-1 { grid-template-columns: 1fr; }
.vg-livros-1 .vg-livro-link { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.vg-livros-1 .vg-livro-info { padding: 0; }
.vg-livros-1 .vg-livro-titulo { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.vg-livro-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 16px; max-width: 420px; }
.vg-livro-mini img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); }
.vg-livro-mini img:nth-child(odd) { transform: rotate(-2deg); }
.vg-livro-mini img:nth-child(even) { transform: rotate(2deg); }
.vg-livros-1 .vg-livro-resumo { font-size: 1.08rem; -webkit-line-clamp: 5; }
.vg-ano:nth-of-type(even) .vg-livros-1 .vg-livro-link { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.vg-ano:nth-of-type(even) .vg-livros-1 .vg-livro-capa { order: 2; }

.vg-filtro-vazio { margin-top: 24px; }

.vg-vazio { margin: 24px auto 0; max-width: 640px; }
.vg-vazio-icone { font-size: 2.6rem; margin: 0; }

/* ---------- Viagem: capa ---------- */
.vg-capa {
  position: relative; display: flex; align-items: stretch; overflow: hidden;
  min-height: clamp(480px, 84vh, 780px); color: #fff; background: #1a1612;
}
.vg-capa-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: vg-zoom 18s ease-out both;
}
@keyframes vg-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.vg-capa-veu {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(12, 9, 6, .9) 0%, rgba(12, 9, 6, .5) 38%, rgba(12, 9, 6, .08) 66%, rgba(12, 9, 6, .45) 100%);
}
.vg-capa-sem-foto { background: linear-gradient(135deg, var(--accent), var(--link)); color: var(--accent-text); }
.vg-capa-sem-foto .vg-capa-veu { display: none; }
.vg-capa-conteudo {
  position: relative; z-index: 1; width: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: 24px; padding-bottom: clamp(96px, 12vw, 136px);
}
.vg-voltar {
  margin-bottom: auto; align-self: flex-start;
  display: inline-flex; gap: 8px; align-items: center; color: inherit; text-decoration: none;
  font-size: .9rem; font-weight: 600; padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.vg-voltar:hover { color: inherit; background: rgba(255, 255, 255, .24); }
.vg-capa-lugar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 32px 0 10px; font-size: clamp(.95rem, 1.6vw, 1.1rem); font-weight: 500; letter-spacing: .03em; }
.vg-capa-lugar .vg-bandeira { font-size: 1.8rem; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.vg-capa-titulo {
  color: inherit; max-width: 18ch; margin: 0 0 .3em;
  font-size: clamp(2.5rem, 7.4vw, 5.6rem); font-weight: 600; line-height: 1.02; letter-spacing: -.025em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .35); text-wrap: balance;
  font-variation-settings: "opsz" 144;
}
.vg-capa-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.vg-capa-meta span {
  font-size: .88rem; font-weight: 600; padding: 5px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vg-capa-rolar {
  position: absolute; z-index: 1; right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  bottom: clamp(96px, 12vw, 136px);
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; text-decoration: none; font-size: 1.3rem; border: 1px solid rgba(255, 255, 255, .4);
  animation: vg-flutua 2.4s ease-in-out infinite;
}
.vg-capa-rolar:hover { color: #fff; background: rgba(255, 255, 255, .15); }
@keyframes vg-flutua { 50% { transform: translateY(6px); } }

/* ---------- Viagem: ficha do lugar + Wikipédia ---------- */
.vg-ficha-faixa { background: var(--bg-alt); padding-bottom: clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--border); }
.vg-ficha-grade { position: relative; z-index: 2; margin-top: -64px; display: grid; gap: 16px; }
.vg-ficha-grade.vg-com-wiki { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.vg-ficha { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
@media (min-width: 760px) {
  .vg-ficha-grade:not(.vg-com-wiki) .vg-ficha { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.vg-ficha-item {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.vg-ficha-icone {
  grid-row: span 2; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.vg-ficha-col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.vg-gmaps { justify-self: start; box-shadow: var(--shadow); }
.vg-gmaps:hover { border-color: var(--accent); }
.vg-ficha-rotulo { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; align-self: end; }
.vg-ficha-valor { font-weight: 600; line-height: 1.3; align-self: start; font-size: .95rem; }

.vg-wiki {
  display: grid; grid-template-columns: 116px 1fr; gap: 16px; padding: 16px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  min-height: 100%;
}
.vg-wiki-sem-thumb { grid-template-columns: 1fr; }
.vg-wiki-sem-thumb .vg-wiki-thumb { display: none; }
.vg-wiki-thumb { border-radius: 10px; background: var(--bg-alt) center / cover no-repeat; min-height: 116px; }
.vg-wiki-sobre { margin: 0 0 2px; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 600; }
.vg-wiki-titulo { font-size: 1.3rem; margin: 0 0 6px; }
.vg-wiki-extrato { font-size: .92rem; color: var(--muted); line-height: 1.55; }
.vg-wiki-extrato p { margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.vg-wiki-desc { font-style: italic; font-size: .85rem; margin: -2px 0 6px; color: var(--muted); }
.vg-wiki-link { font-weight: 600; font-size: .88rem; text-decoration: none; }
.vg-wiki-link:hover { text-decoration: underline; }
.vg-esqueleto {
  display: block; height: .8em; margin: 8px 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border) 50%, var(--bg-alt) 75%) 0 0 / 200% 100%;
  animation: vg-brilho 1.3s linear infinite;
}
.vg-esqueleto-curto { width: 60%; }
.vg-wiki-carregando .vg-wiki-thumb { animation: vg-pulsa 1.3s ease-in-out infinite; }
@keyframes vg-brilho { to { background-position: -200% 0; } }
@keyframes vg-pulsa { 50% { opacity: .55; } }

/* ---------- Viagem: a história (tipografia de livro) ---------- */
.vg-livro-texto { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(32px, 5vw, 56px); }
.vg-epigrafe {
  max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center;
  font: italic 400 clamp(1.2rem, 2.4vw, 1.45rem)/1.5 var(--font-display); color: var(--muted);
}
.vg-epigrafe::before, .vg-epigrafe::after { content: ""; display: block; width: 48px; height: 2px; margin: 0 auto 18px; background: var(--accent); opacity: .7; }
.vg-epigrafe::after { margin: 18px auto 0; }
.vg-historia {
  margin: 0 auto; counter-reset: vg-cap;
  font-family: var(--font-display); font-size: clamp(1.08rem, 1.6vw, 1.18rem); line-height: 1.8;
  font-variation-settings: "opsz" 14;
  hyphens: auto; -webkit-hyphens: auto;
}
.vg-historia p { text-align: justify; text-wrap: pretty; }
.vg-historia > p:first-of-type::first-letter {
  float: left; font-size: 4.4em; line-height: .78; margin: .08em .1em 0 0;
  font-weight: 650; color: var(--accent); font-variation-settings: "opsz" 144;
}
.vg-historia :is(h2, h3) {
  counter-increment: vg-cap; text-align: center; font-size: clamp(1.5rem, 3vw, 1.95rem);
  margin: 2.2em 0 1em; font-weight: 600;
}
.vg-historia :is(h2, h3)::before {
  content: "Capítulo " counter(vg-cap, upper-roman); display: block; margin-bottom: .7em;
  font: 600 .7rem/1 var(--font-body); letter-spacing: .24em; text-transform: uppercase; color: var(--accent);
}
:root:lang(en) .vg-historia :is(h2, h3)::before { content: "Chapter " counter(vg-cap, upper-roman); }
.vg-historia :is(h2, h3):first-child { margin-top: 0; }
.vg-historia :is(h2, h3) + p::first-line { font-variant: small-caps; letter-spacing: .04em; }
.vg-historia figure {
  width: min(1000px, calc(100vw - 2 * var(--gutter)));
  margin: 2.4em 0 2.4em 50%; transform: translateX(-50%);
}
.vg-historia figure img { border-radius: 6px; box-shadow: var(--shadow-lg); }
.vg-historia figcaption { font: 600 1.3rem/1.2 var(--vg-manuscrito); color: var(--muted); margin-top: 12px; }
.vg-historia blockquote {
  border: 0; text-align: center; margin: 2em auto; padding: 0; max-width: 560px;
  font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.4; color: var(--text);
}
.vg-historia blockquote::before { content: "“"; display: block; font-size: 3.4rem; line-height: .6; color: var(--accent); margin-bottom: .1em; }
.vg-historia blockquote p { text-align: center; margin: 0; }
.vg-fim { text-align: center; color: var(--accent); font-size: 1.6rem; margin: 1.6em 0 0; }

/* ---------- Viagem: álbum em páginas ---------- */
.vg-album-fotos {
  padding: clamp(48px, 7vw, 88px) 0;
  background:
    radial-gradient(70% 50% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--bg-alt);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.vg-secao-topo { text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.vg-secao-topo h2 { margin-bottom: .2em; }
.vg-secao-sub { color: var(--muted); margin: 0; font-size: .95rem; }

.vg-paginas { display: grid; gap: clamp(28px, 5vw, 56px); max-width: 1040px; margin: 0 auto; }
.vg-pagina {
  position: relative; background: var(--vg-papel); border-radius: 4px;
  padding: clamp(12px, 3vw, 36px) clamp(12px, 3vw, 36px) clamp(8px, 2vw, 20px);
  box-shadow: 0 1px 0 var(--border), 0 2px 0 -1px var(--surface), 0 3px 0 -1px var(--border), var(--shadow-lg);
}
.vg-pagina::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(12px, 3vw, 36px); pointer-events: none;
}
.vg-pagina-impar::before { left: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--text) 12%, transparent), transparent); }
.vg-pagina-par::before { right: 0; background: linear-gradient(-90deg, color-mix(in srgb, var(--text) 12%, transparent), transparent); }
.vg-pagina:nth-child(odd) { transform: rotate(-.35deg); }
.vg-pagina:nth-child(even) { transform: rotate(.35deg); }

.vg-mosaico {
  --vg-gap: clamp(8px, 1.6vw, 16px);
  --vg-cols: 2; --vg-asp: .95; --vg-leg: 3.3rem;
  display: grid; gap: var(--vg-gap);
  grid-template-columns: repeat(var(--vg-cols), minmax(0, 1fr));
  grid-auto-rows: 170px;
}
.vg-foto {
  margin: 0; min-width: 0; display: flex; flex-direction: column;
  grid-column: var(--c2); grid-row: var(--r2);
}
.vg-foto a {
  position: relative; display: block; flex: 1; min-height: 0; overflow: hidden; border-radius: 3px;
  background: var(--bg-alt); box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.vg-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .3s; }
.vg-foto a:hover img { transform: scale(1.045); }
.vg-foto a::after {
  content: "⤢"; position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1rem; color: #fff; background: rgba(0, 0, 0, .4);
  opacity: 0; transition: opacity .2s;
}
.vg-foto a:hover::after, .vg-foto a:focus-visible::after { opacity: 1; }
.vg-foto figcaption {
  flex: none; height: var(--vg-leg); padding-top: 7px;
  font: 600 1.18rem/1.12 var(--vg-manuscrito); color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vg-foto[style*="--destaque"] figcaption { font-size: 1.3rem; }
.vg-pagina-numero { text-align: center; margin: clamp(10px, 2vw, 18px) 0 0; font: italic .85rem var(--font-display); color: var(--muted); letter-spacing: .1em; }

/* ---------- Viagem: mapa de fotos ---------- */
.vg-secao-mapa-viagem { padding-top: clamp(48px, 7vw, 88px); }
.vg-mapa-viagem { height: clamp(340px, 58vh, 540px); box-shadow: var(--shadow); }

/* ---------- Viagem: dicas ---------- */
.vg-secao-dicas { padding-top: clamp(48px, 7vw, 88px); }
.vg-dicas {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 3vw, 32px);
  max-width: 880px; margin: 0 auto; padding: clamp(28px, 5vw, 48px);
  background: var(--accent-soft); border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.vg-dicas::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(-2deg);
  background: color-mix(in srgb, var(--accent) 28%, var(--surface)); opacity: .85; box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.vg-dicas-icone {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text);
}
.vg-dicas-icone svg { width: 28px; height: 28px; }
.vg-dicas h2 { margin-bottom: .6em; }
.vg-dicas-texto { font-size: 1rem; }
.vg-dicas-texto ul { list-style: none; padding: 0; margin: 0; }
.vg-dicas-texto li { position: relative; padding-left: 30px; margin: .6em 0; }
.vg-dicas-texto li::before {
  content: "✓"; position: absolute; left: 0; top: .15em; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: .72rem; font-weight: 700;
  background: var(--accent); color: var(--accent-text);
}
.vg-dicas-texto > :last-child { margin-bottom: 0; }

/* ---------- Viagem: anterior / próxima ---------- */
.vg-navegacao {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding-top: clamp(48px, 7vw, 88px); max-width: calc(880px + 2 * var(--gutter));
}
.vg-vizinho {
  display: flex; align-items: center; gap: 14px; padding: 12px; min-width: 0;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.vg-vizinho:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.vg-vizinho img, .vg-vizinho-img { width: 92px; height: 70px; flex: none; object-fit: cover; border-radius: 8px; }
.vg-vizinho-proxima { flex-direction: row-reverse; text-align: right; }
.vg-vizinho-vazio { visibility: hidden; box-shadow: none; }
.vg-vizinho-texto { display: flex; flex-direction: column; min-width: 0; }
.vg-vizinho-rotulo { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; }
.vg-vizinho-titulo { font: 600 1.05rem/1.25 var(--font-display); margin: 2px 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vg-vizinho-meta { font-size: .82rem; color: var(--muted); }

/* ---------- Responsivo ---------- */
@media (min-width: 760px) {
  .vg-mosaico { --vg-cols: 4; --vg-asp: 1.3; }
  .vg-foto { grid-column: var(--c4); grid-row: var(--r4); }
}
/* Altura da linha proporcional à largura da coluna (unidades de container) */
@supports (width: 1cqw) {
  .vg-pagina { container-type: inline-size; }
  .vg-mosaico {
    grid-auto-rows: calc((100cqw - (var(--vg-cols) - 1) * var(--vg-gap)) / var(--vg-cols) / var(--vg-asp) + var(--vg-leg));
  }
}

@media (max-width: 900px) {
  .vg-ficha-grade.vg-com-wiki { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .vg-hero-grade { grid-template-columns: 1fr; }
  .vg-colagem { height: 290px; max-width: 420px; width: 100%; margin: 0 auto; }
  .vg-polaroid { width: 52%; }
  .vg-polaroid-3 { top: 30%; right: 20%; }
  .vg-numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vg-capa-rolar { display: none; }
  .vg-wiki { grid-template-columns: 1fr; }
  .vg-wiki-thumb { min-height: 160px; }
  .vg-wiki-sem-thumb .vg-wiki-thumb { display: none; }
  .vg-dicas { grid-template-columns: 1fr; }
  .vg-dicas-icone { width: 46px; height: 46px; }
  .vg-navegacao { grid-template-columns: 1fr; }
  .vg-vizinho-vazio { display: none; }
  .vg-historia p { text-align: left; }
  .vg-alternador { width: 100%; }
  .vg-livros-1 .vg-livro-link, .vg-ano:nth-of-type(even) .vg-livros-1 .vg-livro-link { grid-template-columns: 1fr; gap: 0; }
  .vg-ano:nth-of-type(even) .vg-livros-1 .vg-livro-capa { order: 0; }
  .vg-livros-1 .vg-livro-info { padding: 18px 12px 0 4px; }
  .vg-alternador button { flex: 1; justify-content: center; padding: 8px 10px; white-space: nowrap; font-size: .88rem; }
}
@media (max-width: 420px) {
  .vg-alternador svg { display: none; }
  .vg-ficha { grid-template-columns: 1fr 1fr; }
  .vg-ficha-item { grid-template-columns: 1fr; padding: 12px; row-gap: 4px; }
  .vg-ficha-icone { grid-row: auto; width: 34px; height: 34px; border-radius: 10px; }
  .vg-ficha-icone svg { width: 18px; height: 18px; }
  .vg-livro-rotulo { padding-left: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .vg-pagina { transform: none !important; }
}
