/* ==========================================================================
   Páginas de conteúdo (eventos, cidades, privacidade, mcp, 404).
   Mesmo padrão do mapa: paleta do Lupi, DM Sans, cartões creme, botões em pílula.
   Cabeçalho e rodapé vêm de api/page-lib.php. Padrão em .cursor/rules/design.mdc.
   ========================================================================== */
:root {
  color-scheme: light;
  --pg-forest: #244630;
  --pg-forest-600: #183222;
  --pg-ink: #1c3527;
  --pg-muted: #4b6054;
  --pg-soft: #a9b3a8;
  --pg-line: #e2dfd2;
  --pg-canvas: #faf7ef;
  --pg-card: #fffefa;
  --pg-leaf: #e7ede0;
  --pg-leaf-2: #dbe4d2;
  --pg-event: #c2611a;
  --pg-event-ink: #9a4a10;
  --pg-event-soft: #f8e9d8;
  --pg-font: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --pg-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --pg-safe-top: env(safe-area-inset-top, 0px);
  --pg-safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 128px;
}

body {
  margin: 0;
  background: var(--pg-canvas);
  color: var(--pg-ink);
  font-family: var(--pg-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--pg-ink);
  outline-offset: 2px;
}

.pg-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Cabeçalho ---------- */
.pg-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: var(--pg-safe-top);
  background: rgba(250, 247, 239, 0.92);
  -webkit-backdrop-filter: saturate(1.3) blur(10px);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--pg-line);
}

.pg-collab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 44px;
  padding: 6px 16px;
  background: var(--pg-forest);
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
}

.pg-collab:hover {
  background: var(--pg-forest-600);
}

.pg-collab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.pg-collab-text {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.pg-collab-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pg-collab strong {
  font-size: 15px;
  font-weight: 600;
}

.pg-collab-cta {
  flex: none;
  padding: 5px 14px;
  border-radius: 9999px;
  background: var(--pg-card);
  color: var(--pg-forest);
  font-weight: 600;
  white-space: nowrap;
}

.pg-header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px;
}

.pg-logo {
  flex: none;
  display: block;
}

.pg-logo img {
  display: block;
  width: auto;
  height: 32px;
}

.pg-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.pg-nav a {
  padding: 8px 12px;
  border-radius: 9999px;
  color: var(--pg-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.pg-nav a:hover {
  color: var(--pg-ink);
  background: var(--pg-leaf);
}

.pg-nav a[aria-current="page"] {
  color: var(--pg-ink);
  background: var(--pg-leaf);
}

/* ---------- Botões ---------- */
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: var(--pg-forest);
  color: #fff;
  font: 600 14px/1 var(--pg-font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, transform 100ms ease-out;
}

.pg-btn:hover {
  background: var(--pg-forest-600);
}

.pg-btn:active {
  transform: scale(0.97);
}

.pg-btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

.pg-btn-ghost {
  background: transparent;
  border-color: var(--pg-ink);
  color: var(--pg-ink);
}

.pg-btn-ghost:hover {
  background: var(--pg-card);
}

.pg-btn-event {
  background: var(--pg-event);
}

.pg-btn-event:hover {
  background: var(--pg-event-ink);
}

.pg-btn-lg {
  min-height: 48px;
  padding: 0 24px;
  font-size: 15px;
}

/* ---------- Corpo ---------- */
.pg-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.pg-main.is-narrow {
  max-width: 800px;
}

.pg-crumb {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--pg-muted);
}

.pg-crumb a {
  text-decoration: none;
}

.pg-crumb a:hover {
  text-decoration: underline;
}

/* Abertura: faixa verde-clara com o Lupi. */
.pg-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 40px;
  border-radius: 28px;
  background: var(--pg-leaf);
  overflow: hidden;
}

.pg-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: var(--pg-leaf-2);
}

.pg-hero > * {
  position: relative;
  z-index: 1;
}

.pg-hero-text {
  min-width: 0;
  max-width: 620px;
}

.pg-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pg-forest);
}

.pg-hero h1,
.pg-h1 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.pg-lead {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.45;
  color: var(--pg-muted);
}

.pg-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.pg-hero-art {
  flex: none;
  width: 200px;
  height: 200px;
  margin: -12px 0 -24px;
  object-fit: contain;
}

/* Números em destaque */
.pg-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.pg-stat {
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--pg-card);
}

.pg-stat b {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.pg-stat span {
  font-size: 12px;
  color: var(--pg-muted);
}

/* Seções */
.pg-section {
  margin-top: 40px;
}

.pg-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pg-h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pg-meta {
  margin: 0;
  font-size: 13px;
  color: var(--pg-muted);
}

.pg-card {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--pg-card);
}

.pg-prose p,
.pg-prose ul {
  margin: 0 0 10px;
}

.pg-prose > :last-child {
  margin-bottom: 0;
}

.pg-prose ul {
  padding-left: 20px;
}

.pg-prose li {
  margin-bottom: 8px;
}

.pg-prose a {
  color: var(--pg-forest);
  font-weight: 500;
}

/* Chips (filtros e atalhos) */
.pg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pg-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--pg-line);
  border-radius: 9999px;
  background: var(--pg-card);
  color: var(--pg-ink);
  font: 500 14px/1 var(--pg-font);
  text-decoration: none;
  cursor: pointer;
}

.pg-chip:hover {
  border-color: var(--pg-ink);
}

.pg-chip span {
  color: var(--pg-muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.pg-chip.is-on {
  background: var(--pg-forest);
  border-color: var(--pg-forest);
  color: #fff;
}

.pg-chip.is-on span {
  color: #cfdccf;
}

/* Campo de busca */
.pg-search {
  position: relative;
  max-width: 440px;
}

.pg-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  color: var(--pg-muted);
  pointer-events: none;
}

.pg-input,
.pg-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--pg-line);
  border-radius: 14px;
  background: var(--pg-card);
  color: var(--pg-ink);
  font: 400 16px/1 var(--pg-font);
}

.pg-search input {
  padding-left: 44px;
  border-radius: 9999px;
}

.pg-input::placeholder,
.pg-search input::placeholder {
  color: var(--pg-soft);
}

.pg-input:focus,
.pg-search input:focus {
  outline: none;
  border-color: var(--pg-forest);
  box-shadow: 0 0 0 1px var(--pg-forest);
}

/* Grade de cidades */
.pg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.pg-city {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--pg-card);
  text-decoration: none;
  transition: box-shadow 160ms ease;
}

.pg-city:hover {
  box-shadow: 0 0 0 2px var(--pg-forest);
}

.pg-city-name {
  font-weight: 600;
}

.pg-city-count {
  font-size: 13px;
  color: var(--pg-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Destaques (cidades com mais lugares) */
.pg-tops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.pg-top {
  display: block;
  padding: 16px;
  border-radius: 18px;
  background: var(--pg-forest);
  color: #fff;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.pg-top:hover {
  background: var(--pg-forest-600);
}

.pg-top b {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.pg-top span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #dbe4d2;
}

/* Eventos */
.pg-day {
  margin-top: 28px;
}

.pg-day-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pg-event-ink);
}

.pg-list {
  display: grid;
  gap: 8px;
}

.pg-event {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--pg-card);
  text-decoration: none;
  transition: box-shadow 160ms ease;
}

.pg-event:hover {
  box-shadow: 0 0 0 2px var(--pg-event);
}

.pg-cal {
  flex: 0 0 46px;
  height: 50px;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--pg-event);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  background: var(--pg-card);
}

.pg-cal-m {
  background: var(--pg-event);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pg-cal-d {
  flex: 1;
  font-size: 19px;
  font-weight: 700;
  line-height: 29px;
  font-variant-numeric: tabular-nums;
}

.pg-event-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pg-event-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.pg-event-meta {
  font-size: 13px;
  color: var(--pg-muted);
}

.pg-event-go {
  flex: none;
  align-self: center;
  margin-left: auto;
  color: var(--pg-soft);
}

/* Vazio */
.pg-empty {
  padding: 32px 20px;
  border-radius: 20px;
  background: var(--pg-card);
  text-align: center;
  color: var(--pg-muted);
}

.pg-empty img {
  display: block;
  width: 128px;
  height: 128px;
  margin: 0 auto 8px;
  object-fit: contain;
}

.pg-empty strong {
  display: block;
  color: var(--pg-ink);
  font-size: 17px;
}

/* Formulário */
.pg-form {
  display: grid;
  gap: 14px;
}

.pg-field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.pg-field small {
  font-weight: 400;
  color: var(--pg-muted);
}

.pg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pg-row.is-city {
  grid-template-columns: 1fr 96px;
}

.pg-msg {
  margin: 0;
  font-size: 14px;
}

.pg-msg.is-err {
  color: #a12b2b;
}

.pg-msg.is-ok {
  color: var(--pg-forest);
  font-weight: 600;
}

/* Bloco recolhível (indicar evento, perguntas) */
.pg-details {
  border-radius: 20px;
  background: var(--pg-card);
}

.pg-details > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  font-weight: 600;
}

.pg-details > summary::-webkit-details-marker {
  display: none;
}

.pg-details > summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-left: auto;
  border-right: 2px solid var(--pg-muted);
  border-bottom: 2px solid var(--pg-muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.pg-details[open] > summary::after {
  transform: rotate(-135deg);
}

.pg-details > summary img {
  flex: none;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.pg-details > summary small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--pg-muted);
}

.pg-details-body {
  padding: 0 20px 20px;
}

.pg-faq {
  display: grid;
  gap: 8px;
}

.pg-faq .pg-details > summary {
  font-size: 15px;
}

.pg-faq .pg-details-body {
  color: var(--pg-muted);
}

.pg-faq .pg-details-body p {
  margin: 0;
}

/* Lightbox (<dialog>): formulário que abre por cima da página */
.pg-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(92dvh, 860px);
  padding: 20px 24px 24px;
  border: 0;
  border-radius: 24px;
  background: var(--pg-card);
  color: var(--pg-ink);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pg-dialog::backdrop {
  background: rgba(28, 53, 39, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.pg-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pg-dialog-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9999px;
  background: var(--pg-canvas);
  color: var(--pg-ink);
  cursor: pointer;
}

.pg-dialog-close:hover {
  background: var(--pg-leaf);
}

.pg-dialog-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--pg-event-soft);
}

.pg-dialog-hero img {
  flex: none;
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.pg-dialog-hero strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}

.pg-dialog-hero p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--pg-muted);
}

.pg-dialog-done {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 8px 0 4px;
  text-align: center;
}

.pg-dialog-done:focus {
  outline: none;
}

.pg-dialog-done img {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.pg-dialog-done h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pg-dialog-done p {
  margin: 0 0 8px;
  max-width: 34ch;
  color: var(--pg-muted);
}

.pg-dialog-done .pg-btn {
  width: 100%;
}

.pg-form > .pg-btn {
  width: 100%;
}

/* Chamada (convite com o Lupi) */
.pg-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding: 24px 28px;
  border-radius: 24px;
  background: var(--pg-forest);
  color: #fff;
}

.pg-cta img {
  flex: none;
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.pg-cta h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pg-cta p {
  margin: 4px 0 0;
  color: #dbe4d2;
}

.pg-cta .pg-btn {
  margin-left: auto;
  background: var(--pg-card);
  color: var(--pg-ink);
}

.pg-cta .pg-btn:hover {
  background: #fff;
}

.pg-note {
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--pg-muted);
}

/* /anuncie (destaque): faixa do lightbox em folha, cartões do que é e do que não é, rótulo de exemplo. */
.pg-dialog-hero.is-leaf {
  background: var(--pg-leaf);
}

.pg-ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.pg-ad-grid .pg-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pg-ad-grid .pg-card p {
  margin: 0;
  font-size: 14px;
  color: var(--pg-muted);
}

.pg-ad-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 12px;
  border: 1px solid var(--pg-line);
  border-radius: 9999px;
  background: var(--pg-card);
  font-size: 12px;
  font-weight: 600;
  color: var(--pg-ink);
}

.pg-ad-steps {
  margin: 0;
  padding-left: 22px;
}

.pg-ad-steps li {
  margin-bottom: 8px;
}

.pg-ad-steps li:last-child {
  margin-bottom: 0;
}

/* Texto corrido em blocos (privacidade) */
.pg-legal section {
  margin-top: 12px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--pg-card);
}

.pg-legal section:target {
  box-shadow: 0 0 0 2px var(--pg-forest);
}

.pg-legal h2 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pg-legal p,
.pg-legal ul {
  margin: 0 0 10px;
}

.pg-legal section > :last-child {
  margin-bottom: 0;
}

.pg-legal ul {
  padding-left: 20px;
}

.pg-legal li {
  margin-bottom: 8px;
}

.pg-legal a {
  color: var(--pg-forest);
  font-weight: 500;
}

.pg-legal .card {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--pg-leaf);
}

/* Tabela simples (ferramentas do MCP) */
.pg-table {
  width: 100%;
  border-collapse: collapse;
}

.pg-table td {
  padding: 14px 0;
  vertical-align: top;
  border-top: 1px solid var(--pg-line);
}

.pg-table tr:first-child td {
  padding-top: 0;
  border-top: 0;
}

.pg-table tr:last-child td {
  padding-bottom: 0;
}

.pg-table td:first-child {
  width: 1%;
  padding-right: 18px;
  white-space: nowrap;
  font-family: var(--pg-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--pg-forest);
}

.pg-table td:last-child {
  color: var(--pg-muted);
}

.pg-asks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pg-asks li {
  padding: 12px 18px;
  border-radius: 9999px;
  background: var(--pg-card);
}

.pg-asks li::before {
  content: "\201C";
  color: var(--pg-soft);
}

.pg-asks li::after {
  content: "\201D";
  color: var(--pg-soft);
}

/* Código (página do MCP) */
.pg-code {
  font-family: var(--pg-mono);
  font-size: 13px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--pg-leaf);
}

.pg-pre {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--pg-leaf);
  font-family: var(--pg-mono);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
}

.pg-rows > div {
  padding: 16px 0;
  border-top: 1px solid var(--pg-line);
}

.pg-rows > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.pg-rows > div:last-child {
  padding-bottom: 0;
}

.pg-rows .k {
  font-weight: 600;
}

.pg-rows .v {
  margin-top: 4px;
  color: var(--pg-muted);
}

.pg-endpoint {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.pg-endpoint code {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 18px;
  border: 1px solid var(--pg-line);
  border-radius: 9999px;
  background: var(--pg-card);
  font-family: var(--pg-mono);
  font-size: 14px;
  white-space: nowrap;
  overflow-x: auto;
}

/* ---------- Rodapé ---------- */
.pg-footer {
  margin-top: 24px;
  padding: 40px 24px calc(96px + var(--pg-safe-bottom));
  background: var(--pg-leaf);
}

.pg-footer-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, 1fr);
  gap: 32px;
  max-width: 1080px;
  margin: 0 auto;
}

.pg-footer-brand img {
  display: block;
  width: auto;
  height: 30px;
}

.pg-footer-brand p {
  margin: 12px 0 0;
  max-width: 30ch;
  color: var(--pg-muted);
  font-size: 14px;
}

.pg-footer h2 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.pg-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pg-footer li a {
  color: var(--pg-muted);
  font-size: 14px;
  text-decoration: none;
}

.pg-footer li a:hover {
  color: var(--pg-ink);
}

.pg-footer-base {
  max-width: 1080px;
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--pg-leaf-2);
  font-size: 13px;
  color: var(--pg-muted);
}

/* Idioma (PT | EN) no rodapé: leva à mesma página no outro idioma. */
.pg-lang {
  margin-left: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pg-lang a {
  display: inline-block;
  padding: 6px 4px;
  color: var(--pg-muted);
  text-decoration: none;
}

.pg-lang a:hover {
  color: var(--pg-ink);
  text-decoration: underline;
}

.pg-lang a[aria-current="true"] {
  color: var(--pg-forest);
  text-decoration: underline;
}

.in-app .pg-apps {
  display: none;
}

/* ---------- Roteiro de um dia (/cidade/x/roteiro) e Viagem com pet (/viagem) ---------- */
.pg-h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pg-route-warn {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--pg-card);
  font-size: 14px;
  font-weight: 500;
}

.pg-route-tabs {
  margin-top: 24px;
}

.pg-route {
  margin-top: 28px;
}

.pg-route-lead {
  margin: -4px 0 12px;
}

.pg-stops {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pg-stop {
  position: relative;
  padding: 0 0 4px 26px;
}

/* Linha do dia: um ponto por parada, ligados por um traço. */
.pg-stop::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pg-forest);
}

.pg-stop::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: -2px;
  width: 2px;
  background: var(--pg-leaf-2);
}

.pg-stop:last-child::after {
  display: none;
}

.pg-stop-when {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pg-forest);
}

.pg-stop-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: var(--pg-card);
}

.pg-stop-card:hover,
.pg-stop-card:focus-within {
  box-shadow: 0 0 0 2px var(--pg-forest);
}

.pg-stop-photo {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--pg-leaf);
}

.pg-stop-photo.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--pg-forest);
}

.pg-stop-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pg-stop-cat {
  font-size: 13px;
  color: var(--pg-muted);
}

.pg-stop-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.pg-stop-name::after {
  content: "";
  position: absolute;
  inset: 0;
}

.pg-stop-card {
  position: relative;
}

.pg-stop-name:focus-visible {
  outline: none;
}

.pg-stop-card:has(.pg-stop-name:focus-visible) {
  outline: 2px solid var(--pg-ink);
  outline-offset: 2px;
}

.pg-stop-pet {
  font-size: 13px;
  line-height: 1.4;
  color: var(--pg-ink);
}

.pg-stop-extra {
  font-size: 13px;
  color: var(--pg-forest);
  font-weight: 500;
}

.pg-leg {
  margin: 8px 0 14px;
  font-size: 13px;
  color: var(--pg-muted);
}

.pg-route-actions {
  margin-top: 18px;
}

.pg-route-help {
  margin-top: 28px;
}

.pg-help-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pg-help {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--pg-card);
}

.pg-help:hover,
.pg-help:focus-within {
  box-shadow: 0 0 0 2px var(--pg-forest);
}

/* Viagem: formulário, cidade escolhida e blocos */
.pg-trip-form {
  margin-top: 24px;
  padding: 20px;
  border-radius: 20px;
  background: var(--pg-card);
}

.pg-trip-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.pg-trip-city {
  position: relative;
}

.pg-trip-row > *,
.pg-trip-row .pg-field > * {
  min-width: 0;
}

.pg-trip-row input {
  min-width: 0;
  max-width: 100%;
}

.pg-trip-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.pg-trip-pick button {
  min-height: 36px;
  font-size: 13px;
}

.pg-trip-form .pg-btn {
  min-height: 48px;
}

.pg-trip-msg {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--pg-ink);
}

.pg-places {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pg-places .pg-stop-card {
  height: 100%;
}

.pg-places .pg-stop-photo {
  width: 72px;
  height: 72px;
}

.pg-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--pg-forest);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .pg-route .pg-section-head {
    flex-direction: column;
    gap: 2px;
  }

  .pg-trip-row {
    grid-template-columns: 1fr 1fr;
  }

  .pg-trip-row > .pg-trip-city,
  .pg-trip-row > .pg-btn {
    grid-column: 1 / -1;
  }

  .pg-trip-form {
    padding: 16px;
  }

  .pg-stop-photo {
    width: 72px;
    height: 72px;
  }

  .pg-places {
    grid-template-columns: 1fr;
  }

  .pg-route-actions .pg-btn {
    flex: 1 1 100%;
    white-space: normal;
    text-align: center;
    min-height: 44px;
  }
}

/* ---------- Telas menores ---------- */
@media (max-width: 760px) {
  .pg-collab {
    justify-content: space-between;
    gap: 10px;
  }

  .pg-collab-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .pg-collab-tag {
    font-size: 11px;
  }

  .pg-collab strong {
    font-size: 14px;
  }

  .pg-header-row {
    gap: 10px;
    padding: 10px 16px;
  }

  .pg-logo img {
    height: 24px;
  }

  .pg-nav a {
    padding: 8px 8px;
    font-size: 13px;
  }

  .pg-header .pg-btn {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
  }

  .pg-main {
    padding: 16px 16px 40px;
  }

  .pg-hero {
    padding: 24px 20px;
    border-radius: 22px;
    align-items: flex-start;
  }

  .pg-hero-art {
    width: 96px;
    height: 96px;
    margin: -4px -6px 0 0;
  }

  .pg-lead {
    font-size: 15px;
  }

  .pg-cta {
    flex-wrap: wrap;
    padding: 20px;
  }

  .pg-cta img {
    width: 72px;
    height: 72px;
  }

  .pg-cta > div {
    flex: 1;
    min-width: 0;
  }

  .pg-cta .pg-btn {
    width: 100%;
    margin-left: 0;
  }

  .pg-row {
    grid-template-columns: 1fr;
  }

  .pg-row.is-city {
    grid-template-columns: 1fr 88px;
  }

  .pg-table td:first-child {
    white-space: normal;
  }

  .pg-dialog {
    width: 100vw;
    max-width: none;
    max-height: 92dvh;
    margin: auto 0 0;
    padding: 16px 16px calc(20px + var(--pg-safe-bottom));
    border-radius: 22px 22px 0 0;
  }

  .pg-dialog-hero img {
    width: 64px;
    height: 64px;
  }

  .pg-footer-row {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .pg-footer-brand {
    grid-column: 1 / -1;
  }

  .pg-endpoint {
    flex-direction: column;
  }

  .pg-endpoint code {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .pg-header,
  .pg-footer,
  .pg-cta,
  .pg-hero-art {
    display: none;
  }
}

@media (max-width: 520px) {
  /* Logo + botão do mapa; Eventos e Cidades ficam no rodapé. */
  .pg-nav {
    display: none;
  }

  .pg-header .pg-btn {
    margin-left: auto;
  }
}
