.photo-gallery {
  --photo-gallery-paper: #141414;
  --photo-gallery-ink: #fff;
  --photo-gallery-ratio: 3 / 2;
  --photo-gallery-gap: clamp(.7rem, 2vw, 1.35rem);
  box-sizing: border-box;
  background: var(--photo-gallery-paper);
  color: var(--photo-gallery-ink);
  padding: clamp(1.8rem, 4vw, 4.5rem) clamp(.8rem, 4.5vw, 5rem);
}

.photo-gallery [hidden] { display: none !important; }

.photo-gallery__head {
  align-items: baseline;
  border-bottom: 1px solid #606060;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: var(--photo-gallery-gap);
  padding-bottom: .7rem;
}

.photo-gallery__head h2 { color: inherit; font-weight: 400; margin: 0; }

.photo-gallery__buttons { align-items: center; display: flex; flex-shrink: 0; gap: .4rem; }

.photo-gallery__buttons button,
.photo-gallery__close {
  align-items: center;
  background: transparent;
  border: 1px solid #767676;
  border-radius: 0;
  color: inherit;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.photo-gallery__buttons button:disabled { cursor: default; opacity: .45; }

.photo-gallery__buttons svg,
.photo-gallery__close svg { display: block; height: 24px; width: 24px; }

.photo-gallery__list {
  display: grid;
  gap: var(--photo-gallery-gap);
  align-items: start;
  grid-auto-columns: 86%;
  grid-auto-flow: column;
  list-style: none;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: .25rem .25rem .85rem;
  scroll-padding-inline: .25rem;
  scroll-snap-type: x mandatory;
  scrollbar-color: #92989f #2a2a2a;
}

.photo-gallery__item { min-width: 0; scroll-snap-align: start; }
.photo-gallery__item figure, .photo-gallery__dialog figure { margin: 0; }

.photo-gallery[data-visual-group="home"] { --photo-gallery-ratio: 4 / 3; }
.photo-gallery[data-visual-group="breakfast"] { --photo-gallery-ratio: 1; }
.photo-gallery[data-visual-group="atmosphere"] { --photo-gallery-ratio: 16 / 15; }

.photo-gallery__picture {
  aspect-ratio: var(--photo-gallery-ratio);
  border-radius: .55rem;
  color: #fff;
  display: block;
  overflow: hidden;
}

.photo-gallery .photo-gallery__picture img {
  background: transparent;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.photo-gallery__position {
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  margin-inline-end: .3rem;
}

.photo-gallery figcaption {
  color: #e5e9ed;
  font-size: .85rem;
  line-height: 1.55;
  padding-top: .6rem;
}

.photo-gallery[data-visual-group="pool"] .photo-gallery__item figcaption {
  display: none;
}

.photo-gallery[data-visual-group="pool"] [data-gallery-caption] {
  visibility: hidden;
}

.photo-gallery__list:focus-visible,
.photo-gallery__picture:focus-visible,
.photo-gallery__buttons button:focus-visible,
.photo-gallery__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.photo-gallery__dialog {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow: hidden;
  background: #080808;
  color: #fff;
  overscroll-behavior: contain;
}

html:has(.photo-gallery__dialog[open]) { overflow: hidden; }
.photo-gallery__dialog::backdrop { background: #080808; }

.photo-gallery__dialog figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
}

.photo-gallery__dialog img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  touch-action: pan-y pinch-zoom;
}

.photo-gallery__dialog figcaption {
  max-height: 25vh;
  max-height: 25dvh;
  padding: .55rem .9rem .7rem;
  overflow: auto;
  text-align: center;
}

.photo-gallery__dialog :is(.photo-gallery__close, .photo-gallery__dialog-step) {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
}

.photo-gallery__dialog :is(.photo-gallery__close, .photo-gallery__dialog-step) svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 2px #000) drop-shadow(0 0 5px #000);
}

.photo-gallery__dialog :is(.photo-gallery__close, .photo-gallery__dialog-step):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.photo-gallery__dialog .photo-gallery__close {
  inset-block-start: calc(.35rem + env(safe-area-inset-top));
  inset-inline-end: calc(.35rem + env(safe-area-inset-right));
}

.photo-gallery__dialog-step {
  inset-block-start: 50%;
  transform: translateY(-50%);
}

.photo-gallery__dialog-step[data-gallery-modal-step="-1"] {
  inset-inline-start: calc(.25rem + env(safe-area-inset-left));
}

.photo-gallery__dialog-step[data-gallery-modal-step="1"] {
  inset-inline-end: calc(.25rem + env(safe-area-inset-right));
}

@media (min-width: 38em) { .photo-gallery__list { grid-auto-columns: 47%; } }
@media (min-width: 64em) { .photo-gallery__list { grid-auto-columns: 32%; } }

.photo-gallery--room {
  background: transparent;
  min-width: 0;
  padding: 0;
}

.photo-gallery--room .photo-gallery__head {
  align-items: center;
  border: 0;
  justify-content: flex-end;
  margin: 0;
  padding: 0 0 .3rem;
}

.photo-gallery--room h4 {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.photo-gallery--room .photo-gallery__list { grid-auto-columns: 100%; }
.photo-gallery--meeting .photo-gallery__list { grid-auto-columns: min(100%, 37rem); }

.photo-gallery__description {
  color: #e5e9ed;
  line-height: 1.55;
  margin: 0 0 .9rem;
}

@media (max-width: 38em) {
  .room44 .gm-card { --room-inline: clamp(12px, 4vw, 17px); padding-inline: var(--room-inline); }

  .room44 .photo-gallery--room {
    margin-inline: calc(-1 * var(--room-inline));
    width: calc(100% + 2 * var(--room-inline));
  }

  .photo-gallery--room .photo-gallery__head { padding-inline: var(--room-inline, 12px); }
  .photo-gallery__head h2 { min-width: 0; overflow-wrap: anywhere; }
  .photo-gallery--room .photo-gallery__list { padding-inline: 1px; scroll-padding-inline: 1px; }
  .photo-gallery--room figcaption { padding-inline: var(--room-inline, 12px); }
  .photo-gallery[data-visual-group="breakfast"],
  .photo-gallery[data-visual-group="atmosphere"] { padding-block: clamp(1.35rem, 5vw, 2.3rem); }

}

.gm-grid:has(> .gm-card > .gm54-discovery-still) { grid-auto-rows: 1fr; }

.gm-card .gm54-discovery-still {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: .55rem;
  overflow: hidden;
}

.gm-card .gm54-discovery-still > img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .gm-card .gm54-discovery-still > img {
    transition: transform 700ms ease, filter 700ms ease;
  }

  .gm-card:hover .gm54-discovery-still > img {
    transform: scale(1.04);
    filter: brightness(1.05);
  }
}
