/* ---------------------------------------------------------------- ficha do lugar (pop-up e página) */
.place-modal { position: absolute; inset: 0; pointer-events: none; }

/* o mapa desfoca e escurece; os pinos continuam nítidos por cima */
.com-ficha .stage { filter: blur(5px) brightness(.5) saturate(.9); }

.pm-backdrop {
  position: absolute; inset: 0; z-index: 12;
  pointer-events: auto;
  background: rgba(40, 28, 15, .38);
  animation: pmFade .18s ease-out;
}
.com-ficha .zoom, .com-ficha .list-toggle, .com-ficha .hint { opacity: 0; pointer-events: none; }
@keyframes pmFade { from { opacity: 0; } to { opacity: 1; } }

.pm-card {
  position: absolute; z-index: 45;
  pointer-events: auto;
  width: min(66%, 1060px);
  max-height: calc(100% - 32px);
  display: flex; flex-direction: column;
  background: var(--paper-2);
  border: 2px solid rgba(122, 91, 51, .18);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(38, 26, 14, .5);
  overflow: visible;
  animation: pmPop .22s ease-out;
  transition: none;
}
@keyframes pmPop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* pontinha apontando para o pino */
.pm-card::after {
  content: ""; position: absolute; left: var(--tail, 50%); width: 16px; height: 16px;
  background: var(--paper-2); border: 2px solid rgba(122, 91, 51, .18);
  transform: translateX(-50%) rotate(45deg);
}
.pm-card.acima::after { bottom: -9px; border-top: none; border-left: none; }
.pm-card.abaixo::after { top: -9px; border-bottom: none; border-right: none; }
.pm-card.direita::after {
  left: -9px; top: var(--tailY, 50%); transform: translateY(-50%) rotate(45deg);
  border-top: none; border-right: none;
}
.pm-card.esquerda::after {
  left: auto; right: -9px; top: var(--tailY, 50%); transform: translateY(-50%) rotate(45deg);
  border-bottom: none; border-left: none;
}
.pm-card.central::after, .pm-card.sem-seta::after { display: none; }

/* cabeçalho */
.pm-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px 15px;
  background: linear-gradient(135deg, var(--c, var(--terra)), color-mix(in srgb, var(--c, var(--terra)) 70%, #000 12%));
  color: #fffdf6;
  border-radius: 18px 18px 0 0;
}
.pm-ico {
  width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 253, 246, .22);
  border: 2px solid rgba(255, 253, 246, .55);
}
.pm-ico svg { width: 26px; height: 26px; }
.pm-title { min-width: 0; }
.pm-cat { font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; opacity: .92; }
.pm-title h2 { margin: 3px 0 0; font-size: 26px; line-height: 1.1; font-weight: 800; }
.pm-x {
  margin-left: auto; align-self: flex-start;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 253, 246, .2); color: #fffdf6; font-size: 22px; line-height: 1;
}
.pm-x:hover { background: rgba(255, 253, 246, .34); }

/* corpo: foto à esquerda, texto à direita */
.pm-body {
  display: grid; grid-template-columns: minmax(230px, 40%) 1fr;
  min-height: 0; flex: 1 1 auto;
  overflow: hidden; border-radius: 0 0 18px 18px;
}
.pm-media { position: relative; background: #e7dcc7; min-height: 280px; }
.pm-photo { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.pm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-photo-linhas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: none; stroke: rgba(120, 96, 62, .18); stroke-width: 1.4;
}
.pm-photo.vazio > * { position: relative; }
.pm-photo.vazio {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 26px 22px; text-align: center; color: #6d5b43;
  background:
    radial-gradient(120% 90% at 25% 0%, color-mix(in srgb, var(--c, #B4553F) 30%, #fff) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(160deg, #f6eedd 0%, #e9ddc6 100%);
}
.pm-photo-ico { color: color-mix(in srgb, var(--c, #B4553F) 75%, #4a3a26); }
.pm-photo-ico svg { width: 46px; height: 46px; }
.pm-photo.vazio strong { font-family: "Baloo 2", sans-serif; font-size: 16px; color: #5c4b35; }
.pm-photo-note { font-size: 11.5px; line-height: 1.45; max-width: 24ch; color: #8a7659; }

.pm-thumbs {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
}
.pm-thumb {
  width: 60px; height: 46px; flex: 0 0 auto; padding: 0; cursor: pointer;
  border-radius: 9px; overflow: hidden; background: #fff;
  border: 2px solid rgba(255, 253, 246, .85); box-shadow: 0 2px 8px rgba(40, 28, 15, .3);
}
.pm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-thumb.on { border-color: var(--terra); }

/* texto */
.pm-scroll { padding: 20px 24px 22px; overflow: auto; }
.pm-resumo { margin: 0 0 8px; font-size: 17px; line-height: 1.45; font-weight: 700; color: var(--ink); }
.pm-desc { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); max-width: 64ch; }
.pm-h {
  margin: 20px 0 9px; font-size: 10.5px; letter-spacing: 1.2px;
  text-transform: uppercase; color: #a8916d; font-weight: 700;
}
.pm-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.pm-chips li {
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  background: #f4ead6; border: 1px solid #e3d4b7; color: #6b5942;
}
.pm-info {
  margin: 0; display: grid; gap: 12px 20px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.pm-info dt { font-size: 10px; letter-spacing: .9px; text-transform: uppercase; color: #a8916d; }
.pm-info dd { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; }
.pm-info a { color: var(--terra); text-decoration: none; }
.pm-info a:hover { text-decoration: underline; }

.pm-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 12px; }
.pm-btn {
  font-family: "Baloo 2", sans-serif; font-weight: 700; font-size: 14px;
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
  border: 2px solid #ddc9a4; color: var(--ink); background: var(--paper);
}
.pm-btn:hover { border-color: var(--terra); color: var(--terra); }
.pm-primary { background: var(--terra); border-color: transparent; color: #fffdf6; }
.pm-primary:hover { background: #a94f3c; color: #fffdf6; }
.pm-link {
  display: inline-block; font-size: 12.5px; color: var(--ink-soft);
  text-decoration: none; border-bottom: 1px dashed rgba(122, 91, 51, .4);
}

/* ficha dentro da página do lugar */
.pm-card.sheet::after { display: none; }
.pm-card.sheet {
  position: static; width: 100%; max-width: 1060px; max-height: none;
  margin: 0 auto; animation: none; border-radius: 22px;
}
.pm-card.sheet .pm-body { grid-template-columns: minmax(260px, 42%) 1fr; }
.pm-card.sheet .pm-media { min-height: 340px; }
.pm-card.sheet .pm-scroll { overflow: visible; padding: 26px 30px 28px; }
.pm-card.sheet .pm-title h2 { font-size: 30px; }

@media (max-width: 950px) {
  .pm-card { width: calc(100% - 28px); }
  .pm-card.sheet::after { display: none; }
.pm-card.sheet { width: 100%; }
  .pm-body, .pm-card.sheet .pm-body { grid-template-columns: 1fr; }
  .pm-media, .pm-card.sheet .pm-media { min-height: 0; height: 190px; }
  .pm-photo { position: relative; height: 190px; }
  .pm-photo-linhas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: none; stroke: rgba(120, 96, 62, .18); stroke-width: 1.4;
}
.pm-photo.vazio > * { position: relative; }
.pm-photo.vazio { position: relative; height: 190px; padding: 18px; }
  .pm-photo-ico svg { width: 34px; height: 34px; }
  .pm-photo-note { display: none; }
  .pm-thumbs { left: 10px; right: 10px; bottom: 10px; }
  .pm-thumb { width: 48px; height: 38px; }
  .pm-scroll, .pm-card.sheet .pm-scroll { padding: 16px 18px 20px; }
  .pm-title h2, .pm-card.sheet .pm-title h2 { font-size: 21px; }
  .pm-ico { width: 42px; height: 42px; flex: 0 0 42px; }
  .pm-ico svg { width: 21px; height: 21px; }
  .pm-resumo { font-size: 15.5px; }
  .pm-acts { margin: 16px 0 10px; }
}

@media (max-width: 950px) {
  .pm-card.central {
    left: 50% !important; top: 50% !important;
    transform: translate(-50%, -50%);
    width: calc(100% - 20px);
    max-height: calc(100% - 20px);
  }
  .pm-card.central { animation: pmFade .18s ease-out; }
}
@media (max-width: 760px) {
  .pm-card.central {
    left: 50% !important; top: 50% !important;
    transform: translate(-50%, -50%);
    width: calc(100% - 20px);
    max-height: calc(100% - 20px);
  }
  .pm-card.central { animation: pmFade .18s ease-out; }
}
