.lb-project-gallery {
  width: min(var(--lb-max, 1180px), calc(100% - 36px));
  margin: 0 auto 34px;
}

.lb-project-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(340px, 62vh, 680px);
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #211a13;
}

.lb-project-main-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  touch-action: pan-y;
}

.lb-project-main-link .lb-project-main-image {
  flex: 0 0 auto;
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  will-change: transform, opacity;
}

.lb-project-main-link.is-swiping .lb-project-main-image {
  transition: none !important;
}

.lb-project-main-link.is-swipe-settling .lb-project-main-image {
  transition: transform .24s ease, opacity .24s ease;
}

.lb-project-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(31, 27, 22, .78);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transform: translateY(-50%);
}

.lb-project-arrow:hover {
  background: rgba(31, 27, 22, .95);
}

.lb-project-arrow[data-lb-gallery-prev] {
  left: 12px;
}

.lb-project-arrow[data-lb-gallery-next] {
  right: 12px;
}

.lb-project-thumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 90px;
  margin-top: 12px;
  padding-bottom: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.lb-project-thumbs.is-swipe-linked {
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.lb-project-thumb {
  flex: 0 0 96px;
  width: 96px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #e3ded5;
  cursor: pointer;
  scroll-snap-align: start;
}

.lb-project-thumb.is-active {
  border-color: var(--lb-gold, #dfa52f);
}

.lb-project-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
}

.lb-project-main-link:focus-visible,
.lb-project-thumb:focus-visible {
  outline: 3px solid var(--lb-gold, #dfa52f);
  outline-offset: 3px;
}

html.lb-project-lightbox-open {
  overflow: hidden;
}

.lb-project-lightbox[hidden] {
  display: none;
}

.lb-project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  padding: clamp(58px, 8vw, 92px) clamp(16px, 5vw, 72px);
  overflow: hidden;
  background: rgba(12, 9, 6, .94);
}

@supports (height: 100dvh) {
  .lb-project-lightbox {
    height: 100dvh;
    max-height: 100dvh;
  }
}

.lb-project-lightbox-image {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  cursor: zoom-in;
  touch-action: manipulation;
  transform: translateZ(0);
  transition: transform .16s ease;
}

.lb-project-lightbox.is-zoomed .lb-project-lightbox-image {
  cursor: grab;
  touch-action: none;
}

.lb-project-lightbox.is-panning .lb-project-lightbox-image {
  cursor: grabbing;
}

.lb-project-lightbox-close,
.lb-project-lightbox-nav {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 4px;
  background: rgba(24, 18, 13, .72);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
}

.lb-project-lightbox-close {
  top: 18px;
  right: 18px;
  min-height: 42px;
  padding: 8px 14px;
  font-size: .9rem;
}

.lb-project-lightbox-nav {
  top: 50%;
  width: 46px;
  height: 58px;
  font-size: 1.9rem;
  line-height: 1;
  transform: translateY(-50%);
}

.lb-project-lightbox-prev {
  left: 18px;
}

.lb-project-lightbox-next {
  right: 18px;
}

.lb-project-lightbox-close:hover,
.lb-project-lightbox-nav:hover,
.lb-project-lightbox-close:focus-visible,
.lb-project-lightbox-nav:focus-visible {
  background: rgba(42, 31, 22, .95);
}

.lb-model-photograph-gallery,
.building-plan-photograph-gallery {
  width: 100%;
  margin-bottom: 0;
}

.building-plan-photographs {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.building-plan-photographs-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.building-plan-photographs-header h2,
.building-plan-photographs-header p {
  margin: 0;
}

.building-plan-photographs-header > div {
  min-width: 0;
}

.building-plan-photographs-header > button {
  width: auto;
  min-width: 108px;
  margin: 0;
}

.building-plan-photograph-gallery {
  min-width: 0;
}

.building-plan-photograph-gallery .lb-project-stage {
  height: clamp(300px, 42vh, 480px);
  border: 1px solid #2b3a48;
  background: #07121d;
}

.building-plan-photograph-gallery .lb-project-thumb {
  flex: 0 0 84px;
  width: 84px;
  height: 63px;
  background: #111c27;
}

.building-plan-photograph-gallery .lb-project-thumbs {
  gap: 8px;
  padding-block: 8px;
}

.lb-model-photograph-caption {
  margin: 0;
  color: inherit;
  opacity: .76;
}

@media (max-width: 560px) {
  .lb-project-gallery {
    width: min(var(--lb-max, 1180px), calc(100% - 28px));
  }

  .lb-project-stage {
    height: clamp(280px, 58vh, 500px);
  }

  .building-plan-photograph-gallery .lb-project-stage {
    height: clamp(260px, 45vh, 380px);
  }

  .lb-project-arrow {
    width: 36px;
    height: 46px;
    font-size: 1.65rem;
  }

  .lb-project-arrow[data-lb-gallery-prev] {
    left: 8px;
  }

  .lb-project-arrow[data-lb-gallery-next] {
    right: 8px;
  }

  .lb-project-thumb {
    flex-basis: 78px;
    width: 78px;
    height: 58px;
  }

  .lb-project-thumbs {
    min-height: 76px;
  }
}
