/* Cartões e painéis de informação sobre os animais. */
/* Interactive wrappers preserve the original15 crops, sizes and grid placement. */
.hero-fauna {
  pointer-events: auto;
}
.hero-fauna > button.hero-fauna-cell {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  min-height: 0;
  box-shadow: none;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.hero-fauna > button.hero-fauna-cell:hover {
  background: #edf3e7;
  box-shadow: 0 0 0 4px #edf3e7;
}
.hero-fauna > button.hero-fauna-cell:focus-visible {
  outline: 3px solid #405e49;
  outline-offset: 4px;
}
.hero-fauna > button.hero-fauna-cell .hero-fauna-crop {
  pointer-events: none;
}
#fauna-tip {
  position: fixed;
  inset: auto;
  margin: 0;
  box-sizing: border-box;
  width: min(300px,calc(100vw - 24px));
  padding: 16px 18px;
  border: 1px solid #b3c1a8;
  border-radius: 12px;
  background: #fff;
  color: #3b342e;
  box-shadow: 0 8px 26px #34452a20;
  font: 13px/1.55 var(--font-ui);
  pointer-events: none;
  overflow-wrap: anywhere;
}
#fauna-tip strong {
  display: block;
  font: 600 18px/1.3 var(--font-title);
  color: #405e49;
}
#fauna-tip p {
  margin: 8px 0;
}
#fauna-tip small {
  font-size: 11px;
  color: #647269;
}
#fauna-dialog {
  box-sizing: border-box;
  width: min(740px,calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  margin: auto;
  border: 1px solid #b3c1a8;
  border-radius: 18px;
  background: #fff;
  color: #304232;
  box-shadow: 0 20px 70px #253b2926;
  overflow: hidden;
}
#fauna-dialog::backdrop {
  background: #263b3059;
  backdrop-filter: blur(3px);
}
.fauna-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 34px);
}
.fauna-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 26px 16px;
  border-bottom: 1px solid #e3e9df;
  flex: none;
}
.fauna-heading>div {
  min-width: 0;
}
#fauna-title {
  font: 400 32px/1.2 var(--font-title);
  margin: 0;
  color: #405e49;
  overflow-wrap: anywhere;
}
#fauna-subtitle {
  margin: 6px 0 0;
  font: 12px/1.4 var(--font-ui);
  color: #65725e;
}
#fauna-dialog button {
  min-height: 44px;
  border: 1px solid #b3c1a8;
  border-radius: 8px;
  background: #fff;
  color: #405e49;
  padding: 10px 18px;
  font-size: 13px;
}
#fauna-dialog .fauna-close {
  width: 44px;
  flex: none;
  padding: 4px;
  font-size: 26px;
  line-height: 1;
}
.fauna-copy {
  padding: 18px 26px;
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  font: 14px/1.75 var(--font-ui);
}
.fauna-copy h3 {
  font-size: 17px;
  line-height: 1.4;
  margin: 18px 0 8px;
  color: #405e49;
}
.fauna-copy p {
  margin: 8px 0;
}
.fauna-copy .fauna-editorial {
  font-size: 11px;
  color: #66725e;
  line-height: 1.5;
}
.fauna-art-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
  background: #fafcf6;
  border: 1px solid #e2e9dc;
  border-radius: 12px;
  padding: 12px;
}
.fauna-art-grid figure {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
}
.fauna-art-grid figcaption {
  font-size: 12px;
  line-height: 1.4;
  color: #5a6853;
  text-align: center;
}
.fauna-art-view {
  display: flex;
  width: min(100%,150px);
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
}
.fauna-sheet-crop {
  position: relative;
  display: block;
  overflow: hidden;
  flex: none;
  background: #fff;
}
.fauna-sheet-crop img {
  position: absolute;
  display: block;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}
.fauna-sheet-crop img.fauna-pixel {
  image-rendering: pixelated;
}
.fauna-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 26px;
  border-top: 1px solid #e3e9df;
  background: #fafbf7;
  flex: none;
}
.fauna-sources {
  margin-top: 16px;
  font-size: 12px;
}
.fauna-sources summary {
  min-height: 40px;
  padding: 8px 0;
  color: #405e49;
  font-weight: 650;
}
.fauna-sources ul {
  padding-left: 18px;
  margin: 4px 0;
}
.fauna-sources li {
  margin: 7px 0;
}
.fauna-sources a {
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}
@media(max-width:600px) {
  #fauna-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
  .fauna-shell {
    max-height: calc(100dvh - 22px);
  }
  .fauna-heading {
    padding: 16px;
    gap: 8px;
  }
  #fauna-title {
    font-size: 25px;
  }
  .fauna-copy {
    padding: 14px 16px;
    font-size: 13px;
  }
  .fauna-art-grid {
    gap: 7px;
    padding: 8px;
  }
  .fauna-art-grid figcaption {
    font-size: 10px;
  }
  .fauna-actions {
    padding: 10px 16px;
  }
}
.fauna-sintonia-sprite {
  display: block;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
/* Mapa ilustrativo de ocorrência: a arte original do animal permanece acima. */
#fauna-dialog .fauna-range-map {
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid #d8e1cf;
  border-radius: 14px;
  background: #fafcf6;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 14px;
  align-items: center;
}
#fauna-dialog .fauna-range-map figcaption {
  min-width: 0;
  font-size: 12px;
  line-height: 1.55;
}
#fauna-dialog .fauna-range-legend {
  font-size: 13px;
  line-height: 1.4;
  display: block;
  color: #365c38;
}
#fauna-dialog .fauna-range-caveat,#fauna-dialog .fauna-range-sources {
  font-size: 11px;
  color: #5d6b56;
  line-height: 1.5;
}
#fauna-dialog .fauna-range-sources a {
  color: #365c38;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
@media(max-width:600px) {
  #fauna-dialog .fauna-range-map {
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
    padding: 12px;
  }
  #fauna-dialog .fauna-range-svg {
    max-width: 230px!important;
  }
}
/* Cultura brasileira com referências próprias, sem substituir a biologia ou o mapa. */
#fauna-dialog .fauna-culture {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid #c5d2bc;
  border-radius: 16px;
  background: #f6f8f1;
}
#fauna-dialog .fauna-culture h3 {
  margin: 0 0 8px;
}
#fauna-dialog .fauna-culture-sources {
  font-size: 11px;
  line-height: 1.55;
  color: #5d6b56;
}
#fauna-dialog .fauna-culture-sources a {
  color: #365c38;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
@media(max-width:600px) {
  #fauna-dialog .fauna-culture {
    padding: 12px;
  }
}
#fauna-dialog .fauna-culture-topics {
  margin: 0 0 12px;
  padding-left: 20px;
  line-height: 1.75;
}
#fauna-dialog .fauna-culture-topics li+li {
  margin-top: 12px;
}
#fauna-dialog .fauna-culture-topics li::marker {
  color: #56734e;
}
/* Moldura individual: preserva os recortes e dá respiro às extremidades. */
#fauna-dialog .fauna-art-view {
  box-sizing: border-box;
  border: 1px solid #c5d2bc;
  border-radius: 12px;
  padding: clamp(4px,.8vw,8px);
}
/* Convite visível só na galeria que abre as fichas, sem mover os animais. */
.hero-fauna .hero-fauna-hint {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  margin: 0;
  color: #52634a;
  font: 500 11px/1.4 var(--font-ui);
  text-align: center;
  pointer-events: none;
  user-select: text;
}
.fauna-hint-touch {
  display: none;
}
@media(hover:none),(pointer:coarse) {
  .fauna-hint-click {
    display: none;
  }
  .fauna-hint-touch {
    display: inline;
  }
}
.hero-fauna > button.hero-fauna-cell:focus-visible,.hero-fauna > button.hero-fauna-cell:active {
  background: #edf3e7;
  box-shadow: 0 0 0 4px #edf3e7;
}
@media(max-width:1100px) {
  .hero-fauna {
    margin-bottom: 29px;
  }
}
