.vm {
  font-size: 0.85em;
  font-style: italic;
  opacity: 0.8;
  white-space: nowrap;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #f6e8cc;
  background: rgba(240, 222, 190, 0.08);
  border: 2px solid rgba(240, 222, 190, 0.55);
  border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn svg { width: 26px; height: 26px; }

.icon-btn:hover,
.icon-btn:focus-visible {
  color: #2a1c0e;
  background: var(--brush-orange);
  border-color: var(--brush-orange);
  transform: translateY(-2px) rotate(-3deg);
  outline: none;
}

.social-row {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.social-row .icon-btn {
  color: #3a2814;
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(90, 65, 38, 0.55);
}

.social-row .icon-btn:hover,
.social-row .icon-btn:focus-visible { color: #2a1c0e; }

.footer-socials { gap: 14px; }

.footer-bottom .credits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.footer-bottom .credits a {
  color: #f0c27a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom .credits a:hover { color: #fff; }

@media (min-width: 700px) {
  .footer-bottom { flex-wrap: wrap; }
  .footer-bottom .credits {
    flex-basis: 100%;
    justify-content: center;
    margin-top: 6px;
  }
}

/* photo galleries */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.gallery-item {
  position: relative;
  padding: 6px 6px 8px;
  background: #fff8ea;
  border: 1px solid rgba(90, 65, 38, 0.3);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(60, 40, 15, 0.22);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.gallery-item:nth-child(odd) { transform: rotate(-1deg); }
.gallery-item:nth-child(even) { transform: rotate(0.8deg); }

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: rotate(0) scale(1.03);
  outline: 3px solid rgba(234, 138, 46, 0.5);
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
}

.gallery-more {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 6px;
}

.gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  text-align: center;
  font-style: italic;
  border: 2px dashed rgba(90, 65, 38, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.25);
}

@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (min-width: 1000px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

.lightbox {
  width: min(94vw, 980px);
  max-height: 92vh;
  padding: 0;
  color: #f6e8cc;
  background: var(--night);
  border: 0;
  border-radius: 8px;
  overflow: visible;
}

.lightbox::backdrop { background: rgba(10, 7, 4, 0.88); }

.lightbox figure { margin: 0; text-align: center; }

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 8px 8px 0 0;
}

.lightbox figcaption { padding: 10px 16px 14px; font-size: 1.05rem; }

.lightbox button {
  position: absolute;
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
  line-height: 1;
  color: #f6e8cc;
  background: rgba(21, 17, 13, 0.8);
  border: 2px solid rgba(240, 222, 190, 0.6);
  border-radius: 50%;
  cursor: pointer;
}

.lightbox button:hover,
.lightbox button:focus-visible { background: var(--brush-orange); color: #2a1c0e; outline: none; }

.lightbox .lb-close { top: 8px; right: 8px; }
.lightbox .lb-prev { top: 38%; left: 8px; }
.lightbox .lb-next { top: 38%; right: 8px; }

.way { min-width: 0; }
.way a { overflow-wrap: anywhere; }
.way-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

.missing-lede {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.missing-actions { margin-top: 18px; }

@media (min-width: 700px) {
  .footer-links {
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
    gap: 32px 24px;
  }
}

.footer-links > div { min-width: 0; }
.footer-links a { overflow-wrap: anywhere; }

html, body { overflow-x: clip; }
.footer-links h4 { white-space: normal; overflow-wrap: anywhere; }

.footer-bottom p:not(.credits) a { color: #f0c27a; text-decoration: underline; text-underline-offset: 3px; }

/* open / close sections */
.fold summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

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

.fold summary h2 { margin-bottom: 0; }

.fold[open] summary h2 { margin-bottom: 12px; }

.fold summary::after {
  content: "+";
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: 2px;
  font-family: var(--font-ui);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  color: #3a2814;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid rgba(90, 65, 38, 0.5);
  border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  transition: background 0.15s ease, transform 0.15s ease;
}

.fold[open] summary::after { content: "\2212"; }

.fold summary:hover::after,
.fold summary:focus-visible::after { background: var(--brush-orange); }

.fold summary:focus-visible { outline: none; }

.fold summary:focus-visible::after { box-shadow: 0 0 0 3px rgba(234, 138, 46, 0.4); }

.fold-body > :last-child { margin-bottom: 0; }

/* available animals */
.animal-list { display: grid; gap: 22px; }
.animal-list:empty { display: none; }

.animal { display: grid; gap: 18px; }
.animal-media { min-width: 0; }

.animal-main {
  display: block;
  width: 100%;
  padding: 6px;
  background: #fff8ea;
  border: 1px solid rgba(90, 65, 38, 0.3);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(60, 40, 15, 0.22);
  cursor: zoom-in;
}

.animal-main img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}

.animal-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.animal-thumb {
  width: 64px;
  padding: 3px;
  background: #fff8ea;
  border: 1px solid rgba(90, 65, 38, 0.3);
  border-radius: 3px;
  cursor: pointer;
}

.animal-thumb:hover,
.animal-thumb:focus-visible { outline: 3px solid rgba(234, 138, 46, 0.5); }

.animal-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.animal-facts { font-weight: 700; color: var(--brush-orange-dark, #a8481f); }
.animal-body h2 { margin-top: 0; }

@media (min-width: 760px) {
  .animal { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; }
}

/* adoption stories */
.story-list { display: grid; gap: 22px; margin-top: 16px; }
.story { display: grid; gap: 14px; padding-top: 22px; border-top: 1px solid rgba(90, 65, 38, 0.25); }
.story:first-child { padding-top: 0; border-top: 0; }
.story-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; align-content: start; }
.story-photos .gallery-item img { aspect-ratio: auto; max-height: 460px; object-fit: contain; background: #fff8ea; }
.story-body h3 { margin: 0 0 6px; }
.story-body p { margin: 0 0 10px; }

@media (min-width: 760px) {
  .story { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; align-items: start; }
  .story-photos:only-child { grid-column: 1 / -1; }
}
