body.lg-raleway .lg-directory h2 {
  font-weight: 600 !important;
}

body.home.lg-raleway.lg-light-hero .lg-home-v2 .lg-hero h1 {
  text-transform: none;
}

.lg-photo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 12px;
}

.lgi-main .lg-photo-header h2 {
  margin: 0;
}

.lg-photo-all {
  flex: none;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--lgi-rule, #d4d0c9);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}

.lg-photo-all:hover {
  background: #121212;
  color: #faf9f7;
}

.lg-photo-mosaic {
  display: grid;
  grid-template-columns: 2.14fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 5px;
  height: clamp(295px, 35vw, 495px);
}

.lg-photo-mosaic a {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #dedbd6;
  cursor: zoom-in;
}

.lg-photo-mosaic a:focus-visible {
  outline-offset: -4px;
}

.lg-photo-mosaic img, .lg-photo-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lg-photo-mosaic a:first-child {
  grid-row: span 2;
}

.lg-photo-mosaic[data-count="1"],
.lg-photo-mosaic[data-count="2"] {
  grid-template-rows: minmax(0, 1fr);
}

.lg-photo-mosaic[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.lg-photo-mosaic[data-count="1"] img {
  object-fit: contain;
}

.lg-photo-mosaic:is([data-count="1"], [data-count="2"]) a:first-child {
  grid-row: auto;
}

.lg-photo-mosaic:is([data-count="2"], [data-count="3"], [data-count="4"]) {
  grid-template-columns: 1.65fr 1fr;
}

.lg-photo-mosaic[data-count="4"] {
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.lg-photo-mosaic[data-count="4"] a:first-child {
  grid-row: span 3;
}

body:has(.lg-photo-viewer[open]) {
  overflow: hidden;
}

dialog.lg-photo-viewer {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: #faf9f7;
  background: #121212;
  font: 450 16px/1.4 "Lisanov Manrope", system-ui, sans-serif;
}

.lg-photo-viewer[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.lg-photo-viewer::backdrop {
  background: #121212;
}

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

.lg-photo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px clamp(12px, 3vw, 36px);
  border-bottom: 1px solid #41403e;
}

.lg-photo-caption {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lg-photo-viewer button {
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.lg-photo-viewer :focus-visible {
  outline: 2px solid #faf9f7;
  outline-offset: 2px;
}

.lg-photo-viewer :is(.lg-photo-close, .lg-photo-prev, .lg-photo-next) {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #77736e;
  border-radius: 50%;
  font-size: 22px;
}

.lg-photo-viewer button:hover {
  background: #393735;
}

.lg-photo-stage {
  display: grid;
  grid-template-columns: minmax(44px, 6vw) minmax(0, 1fr) minmax(44px, 6vw);
  align-items: center;
  justify-items: center;
  gap: 10px;
  min-height: 0;
  padding: 12px;
}

.lg-photo-stage figure {
  position: relative;
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  touch-action: pan-y pinch-zoom;
}

.lg-photo-original {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lg-photo-error {
  padding: 12px;
  text-align: center;
}

.lg-photo-error a {
  color: inherit;
}

.lg-photo-bottom {
  --lg-photo-counter-space: clamp(54px, 6vw, 72px);
  display: grid;
  grid-template-columns: var(--lg-photo-counter-space) minmax(0, 1fr) var(--lg-photo-counter-space);
  gap: 8px;
  min-width: 0;
  border-top: 1px solid #41403e;
  border-bottom: 0;
}

.lg-photo-count {
  grid-column: 3;
  justify-self: end;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lg-photo-strip {
  position: relative;
  grid-column: 2;
  justify-self: center;
  display: flex;
  box-sizing: border-box;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  gap: 6px;
  padding: 4px;
  overflow-x: auto;
}

.lg-photo-strip button {
  box-sizing: border-box;
  flex: 0 0 64px;
  height: 46px;
  padding: 2px;
  border: 1px solid transparent;
  opacity: .62;
}

.lg-photo-strip :is([aria-current="true"], button:hover) {
  border-color: #faf9f7;
  opacity: 1;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lg-photo-mosaic img { transition: transform .22s ease-out; }
  .lg-photo-mosaic a:hover img { transform: scale(1.025); }
}

@media (max-width: 640px) {
  .lg-photo-mosaic {
    display: flex;
    height: clamp(220px, 65vw, 360px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .lg-photo-mosaic a {
    flex: 0 0 88%;
    scroll-snap-align: start;
  }
  .lg-photo-mosaic[data-count="1"] a { flex-basis: 100%; }
  .lg-photo-stage {
    position: relative;
    grid-template-columns: 1fr;
    padding: 8px;
  }
  .lg-photo-stage figure { grid-column: 1; }
  .lg-photo-viewer :is(.lg-photo-prev, .lg-photo-next) {
    position: absolute;
    z-index: 1;
    background: rgb(18 18 18 / 75%);
  }
  .lg-photo-prev { left: 8px; }
  .lg-photo-next { right: 8px; }
}
