/* Photo proportions come from each original file, never a fixed crop. */
.cg-ranked-guide .apt-list .apt-tier .apt-card {
  margin: 24px 0;
  padding: 26px;
  border: 1px solid #e0e2d8;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 7px 24px #181a160a;
  gap: 28px;
  align-items: start;
}
.cg-ranked-guide .apt-list .apt-tier .apt-card:last-child {
  border-bottom: 1px solid #e0e2d8;
}
.apt-card .apt-media {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 18px;
  min-width: 0;
}
.apt-card .apt-gallery-wrap {
  display: block;
  min-width: 0;
  width: 100%;
  margin: 0;
}
.apt-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.apt-photo-grid[data-mosaic-ready] {
  display: block;
}
.apt-mosaic-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}
.apt-mosaic-row:last-child {
  margin-bottom: 0;
}
.apt-card .apt-photo-grid figure,
.apt-hero .apt-hero-collage.apt-photo-grid figure {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 0;
  background: transparent;
  overflow: visible;
  grid-column: auto;
  flex-basis: 0;
  flex-shrink: 1;
}
.apt-photo-grid a[data-apt-photo] {
  display: block;
  line-height: 0;
  overflow: visible;
  outline-offset: 3px;
}
.apt-photo-grid a[data-apt-photo]:focus-visible {
  outline: 2px solid #181a16;
}
.apt-card .apt-media .apt-photo-grid img,
.apt-hero .apt-hero-collage.apt-photo-grid figure img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  aspect-ratio: auto;
  transform: none;
  border-radius: 0;
}
.apt-gallery-credit {
  margin: 10px 0 0;
  font:
    10px/1.5 Manrope,
    Arial,
    sans-serif;
  color: #656960;
}
.apt-gallery-credit a {
  text-underline-offset: 3px;
}
.apt-card .apt-location {
  height: auto;
  min-height: 0;
  padding: 16px;
  background: #fafaf6;
  border: 1px solid #e0e2d8;
  gap: 9px;
}
.apt-card .apt-location-heading {
  padding: 0;
  gap: 12px;
}
.apt-card .apt-location > strong {
  padding: 0;
  font-size: 23px;
}
.apt-card .apt-location > p {
  padding: 0;
  font-size: 12px;
}
.apt-card .apt-location-foot {
  padding: 8px 0 0;
  font-size: 11px;
  border-top: 1px solid #d3d6cb;
}
.apt-card .apt-location-wordmark {
  display: none;
}
.apt-hero .apt-hero-collage.apt-photo-grid {
  display: block;
  align-self: center;
}
.apt-popup > img {
  height: auto;
  max-height: 200px;
  object-fit: contain;
}
.apt-photo-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #d3d6cb;
  border-radius: 0;
  background: #fafaf6;
  color: #181a16;
  box-shadow: 0 18px 70px #0004;
  font:
    13px/1.5 Manrope,
    Arial,
    sans-serif;
  overflow: auto;
}
.apt-photo-dialog::backdrop {
  background: #181a16d9;
}
.apt-photo-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid #d3d6cb;
}
.apt-photo-dialog-head strong {
  font-weight: 700;
}
.apt-photo-dialog button {
  border: 1px solid #d3d6cb;
  border-radius: 0;
  background: #fff;
  color: #181a16;
  padding: 9px 13px;
  min-height: 40px;
  font:
    600 12px Manrope,
    Arial,
    sans-serif;
  cursor: pointer;
}
.apt-photo-dialog button:focus-visible {
  outline: 2px solid #181a16;
  outline-offset: 3px;
}
.apt-photo-viewer {
  margin: 0;
  padding: 12px 18px;
  min-width: 0;
}
.apt-photo-viewer img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: calc(100dvh - 220px);
  object-fit: contain;
  margin: 0 auto;
}
.apt-photo-viewer figcaption {
  font:
    12px/1.5 Manrope,
    Arial,
    sans-serif;
  margin: 12px 0 0;
}
.apt-photo-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid #d3d6cb;
}
.apt-photo-dialog-foot a {
  font-size: 11px;
  text-underline-offset: 3px;
}
.apt-photo-nav {
  display: flex;
  gap: 8px;
}
@media (max-width: 1100px) {
  .cg-ranked-guide .apt-list .apt-tier .apt-card {
    grid-template-columns: 1fr;
  }
  .apt-card .apt-location {
    display: none;
  }
}
@media (max-width: 620px) {
  .cg-ranked-guide .apt-list .apt-tier .apt-card {
    padding: 16px;
    margin: 20px 0;
    gap: 22px;
  }
  .apt-photo-dialog-head,
  .apt-photo-dialog-foot {
    padding: 12px;
  }
  .apt-photo-viewer {
    padding: 12px;
  }
  .apt-photo-dialog-foot {
    flex-wrap: wrap;
  }
  .apt-photo-viewer img {
    max-height: calc(100dvh - 250px);
  }
  .apt-photo-grid,
  .apt-mosaic-row {
    gap: 6px;
  }
  .apt-mosaic-row {
    margin-bottom: 6px;
  }
}

.apt-photos-empty {
  padding: 24px;
  background: #fafaf6;
  border: 1px solid #e0e2d8;
  font:
    12px/1.6 Manrope,
    Arial,
    sans-serif;
  color: #656960;
  margin: 0;
}

@media (min-width: 1101px) {
  .apt-card .apt-location {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 8px 18px;
    align-items: center;
  }
  .apt-card .apt-location > * {
    grid-column: 1;
  }
  .apt-card .apt-location .apt-location-map-link {
    grid-column: 2;
    grid-row: 1 / span 4;
    display: block;
    width: 160px;
    height: 120px;
    min-height: 0;
  }
  .apt-card .apt-location .apt-location-map {
    display: block;
    width: 100%;
    height: 120px;
    min-height: 0;
    object-fit: contain;
  }
  .apt-card .apt-location .apt-location-wordmark {
    display: none;
  }
}
.apt-hero-media {
  margin: 0;
  min-width: 0;
  align-self: center;
}
.apt-hero-media > .apt-gallery-credit {
  position: static;
  background: none;
  padding: 0;
  margin: 10px 0 0;
  color: #656960;
  font:
    10px/1.5 Manrope,
    Arial,
    sans-serif;
}
.apt-tier-heading .apt-tier-label {
  display: inline-block;
  padding: 5px 9px;
  margin: 0 0 7px;
  font:
    700 10px/1.4 Manrope,
    Arial,
    sans-serif;
  letter-spacing: 0.04em;
}
.apt-tier-top .apt-tier-label {
  color: #705919;
  background: #f8f1d9;
  border: 1px solid #e0d4b3;
}
.apt-tier-middle .apt-tier-label {
  color: #656960;
  background: #fafaf6;
  border: 1px solid #d3d6cb;
}
.apt-tier-top .apt-tier-heading,
.apt-tier-middle .apt-tier-heading {
  background: transparent;
  border-left: 0;
}
