.sight-gallery-cover {
  min-width: 0;
  margin-bottom: .25rem;
}

.sight-gallery-trigger {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--forest);
  text-decoration: none;
}

.sight-gallery-trigger:hover {
  border-color: var(--copper);
}

.sight-gallery-trigger img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--sand);
}

.sight-gallery-trigger > span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .72rem;
  font-size: .93rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-underline-offset: 4px;
}

.trip-photo-overview {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.trip-photo-overview h2 {
  margin-bottom: .75rem;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
}

.trip-photo-overview ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: clamp(.65rem, 2vw, 1.1rem);
  padding: 0;
}

.trip-photo-overview li {
  min-width: 0;
}

.trip-photo-overview li:only-child {
  max-width: 32rem;
}

.sight-gallery-cover--featured .sight-gallery-trigger > span {
  display: grid;
  gap: .16rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.sight-gallery-cover--featured .sight-gallery-trigger small {
  color: var(--copper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sight-gallery-dialog [hidden] { display: none; }

.sight-gallery-dialog {
  position: fixed;
  inset: 0;
  width: min(54rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  margin: auto;
  padding: clamp(.75rem, 2.4vw, 1.4rem);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  color: var(--ink);
}

.sight-gallery-dialog:not([open]) {
  display: none;
}

.sight-gallery-dialog::backdrop {
  background: rgb(18 35 29 / .72);
}

html:has(.sight-gallery-dialog[open]) {
  overflow: hidden;
}

.sight-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .65rem;
}

.sight-gallery-header h2 {
  min-width: 0;
  font-size: clamp(1.35rem, 4.2vw, 2.1rem);
  overflow-wrap: anywhere;
}

.sight-gallery-header button {
  flex: none;
}

.sight-gallery-dialog .button {
  min-width: 44px;
  min-height: 44px;
  padding: .45rem .72rem;
}

.sight-gallery-view {
  display: grid;
  place-items: center;
  min-height: 7rem;
  overflow: hidden;
  border-radius: 3px;
  background: var(--forest);
  color: var(--white);
}

.sight-gallery-view img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(61vh, 42rem);
  max-height: min(61dvh, 42rem);
  object-fit: contain;
}

.sight-gallery-image--loading {
  visibility: hidden;
}

.sight-gallery-view p {
  padding: .85rem;
  text-align: center;
}

.sight-gallery-view [data-gallery-error] a { color: inherit; }

.sight-gallery-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .3rem;
  margin-top: .75rem;
}

.sight-gallery-controls p {
  grid-column: 2;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

.sight-gallery-controls [data-gallery-next] {
  justify-self: end;
}

.sight-gallery-index {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .26rem;
  margin-top: .55rem;
}

.sight-gallery-index .button[aria-current="true"] {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
}

@media (max-width: 380px) {
  .sight-gallery-controls .button {
    font-size: .85rem;
    padding-inline: .48rem;
  }
}

@media (max-height: 530px) {
  .sight-gallery-view img {
    max-height: 44vh;
    max-height: 44dvh;
  }
}
