.theme-gallery body {
  overflow-x: clip;
}

.theme-gallery .gallery-walk {
  padding-right: 0;
  padding-left: 0;
  overflow: clip;
}

.theme-gallery .gallery-walk__head {
  width: min(1240px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.theme-gallery .gallery-corridor {
  position: relative;
  overflow: hidden;
  background: #101010;
  color: #f1e8d9;
  isolation: isolate;
}

.theme-gallery .gallery-corridor__wayfinding,
.theme-gallery .gallery-corridor__footer {
  position: absolute;
  z-index: 3;
  right: 22px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
}

.theme-gallery .gallery-corridor__wayfinding {
  top: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(241, 232, 217, .28);
}

.theme-gallery .gallery-corridor__footer {
  bottom: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(241, 232, 217, .28);
}

.theme-gallery .gallery-corridor__viewport {
  --gallery-panel-width: clamp(300px, 38vw, 520px);
  height: auto;
  min-height: 0;
  overflow: visible;
}

.theme-gallery .gallery-track {
  display: grid;
  gap: 28px;
  width: min(520px, calc(100% - 48px));
  margin: 0 auto;
  padding: 66px 0;
}

.theme-gallery .gallery-exhibit {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 620px;
  min-height: 470px;
  overflow: hidden;
  background: #f1e8d9;
  color: #101010;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

.theme-gallery .gallery-poster {
  position: relative;
  min-height: 0;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.08em;
  line-height: .72;
}

.theme-gallery .gallery-poster b {
  position: absolute;
  font-size: 11px;
  letter-spacing: .12em;
  line-height: 1;
}

.theme-gallery .gallery-poster--sign {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9%;
  background: #ff4b35;
  font-size: clamp(74px, 10vw, 140px);
}

.theme-gallery .gallery-poster--sign span:last-of-type {
  align-self: flex-end;
  color: #f1e8d9;
}

.theme-gallery .gallery-poster--sign b {
  top: 20px;
  right: 20px;
}

.theme-gallery .gallery-poster--body {
  display: grid;
  align-content: center;
  padding: 8%;
  background: #101010;
  color: #f1e8d9;
  font-size: clamp(86px, 11vw, 156px);
}

.theme-gallery .gallery-poster--body span:last-of-type {
  color: #ff4b35;
  text-align: right;
}

.theme-gallery .gallery-poster--body b {
  top: 20px;
  left: 20px;
  color: #f1e8d9;
}

.theme-gallery .gallery-poster--code {
  display: grid;
  align-content: center;
  padding: 8%;
  background-color: #f1e8d9;
  background-image:
    linear-gradient(rgba(16, 16, 16, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 16, 16, .18) 1px, transparent 1px);
  background-size: 12.5% 12.5%;
  color: #101010;
  font-size: clamp(76px, 10vw, 142px);
}

.theme-gallery .gallery-poster--code span:last-of-type {
  color: #ff4b35;
}

.theme-gallery .gallery-poster--code b {
  right: 20px;
  bottom: 20px;
}

.theme-gallery .gallery-poster--space {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 7%;
  background: #ff4b35;
  color: #101010;
  font-size: clamp(54px, 7vw, 104px);
  line-height: .8;
}

.theme-gallery .gallery-poster--space span:first-of-type {
  max-width: 4.8ch;
  overflow-wrap: anywhere;
}

.theme-gallery .gallery-poster--space span:last-of-type {
  align-self: flex-end;
  color: #f1e8d9;
}

.theme-gallery .gallery-poster--space b {
  right: 20px;
  top: 20px;
}

.theme-gallery .gallery-poster--tide {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 8%;
  background: #101010;
  color: #f1e8d9;
  font-size: clamp(48px, 6vw, 86px);
  line-height: .86;
}

.theme-gallery .gallery-poster--tide span:first-of-type {
  letter-spacing: -.11em;
}

.theme-gallery .gallery-poster--tide span:last-of-type {
  padding-top: 22px;
  border-top: 18px solid #ff4b35;
  text-align: right;
}

.theme-gallery .gallery-poster--tide b {
  top: 20px;
  right: 20px;
  color: #f1e8d9;
}

.theme-gallery .gallery-label {
  min-height: 196px;
  padding: 19px 21px 18px;
  border-top: 1px solid #101010;
}

.theme-gallery .gallery-label__index {
  display: block;
  margin-bottom: 15px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .15em;
}

.theme-gallery .gallery-label h3 {
  margin: 0 0 9px;
  font-family: var(--display);
  font-size: clamp(26px, 2.5vw, 36px);
  letter-spacing: -.05em;
  line-height: .95;
}

.theme-gallery .gallery-label p {
  min-height: 48px;
  margin: 0;
  color: #4d483f;
  font-size: 13px;
  line-height: 1.4;
}

.theme-gallery .gallery-label dl {
  display: grid;
  grid-template-columns: .6fr 1.4fr;
  gap: 18px;
  margin: 17px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(16, 16, 16, .35);
}

.theme-gallery .gallery-label dl div {
  min-width: 0;
}

.theme-gallery .gallery-label dt {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.theme-gallery .gallery-label dd {
  margin: 3px 0 0;
  font-size: 10px;
  line-height: 1.25;
}

@media (min-width: 801px) {
  .theme-gallery .gallery-walk.is-motion-ready .gallery-corridor__viewport {
    height: min(82vh, 760px);
    min-height: 590px;
    overflow: hidden;
  }

  .theme-gallery .gallery-walk.is-motion-ready .gallery-track {
    display: flex;
    align-items: center;
    gap: clamp(70px, 10vw, 170px);
    width: max-content;
    height: 100%;
    margin: 0;
    padding: 66px calc((100vw - var(--gallery-panel-width)) / 2);
    will-change: transform;
  }

  .theme-gallery .gallery-walk.is-motion-ready .gallery-exhibit {
    flex: 0 0 var(--gallery-panel-width);
    width: var(--gallery-panel-width);
    height: min(620px, calc(82vh - 112px));
    will-change: opacity;
  }
}

@media (max-width: 800px) {
  .theme-gallery .gallery-walk__head {
    width: calc(100% - 30px);
  }

  .theme-gallery .gallery-corridor {
    overflow: visible;
    background: transparent;
    color: #101010;
  }

  .theme-gallery .gallery-corridor__wayfinding,
  .theme-gallery .gallery-corridor__footer {
    display: none;
  }

  .theme-gallery .gallery-corridor__viewport {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .theme-gallery .gallery-track {
    display: grid;
    gap: 22px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0 15px;
    transform: none;
    will-change: auto;
  }

  .theme-gallery .gallery-exhibit {
    width: 100%;
    height: auto;
    min-height: 0;
    box-shadow: none;
    will-change: auto;
  }

  .theme-gallery .gallery-poster {
    min-height: 360px;
  }

  .theme-gallery .gallery-label {
    min-height: 0;
  }

  .theme-gallery .gallery-label p {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .theme-gallery .gallery-walk__head {
    width: calc(100% - 32px);
  }

  .theme-gallery .gallery-poster {
    min-height: 290px;
  }

  .theme-gallery .gallery-poster--sign,
  .theme-gallery .gallery-poster--body,
  .theme-gallery .gallery-poster--code {
    font-size: 76px;
  }

  .theme-gallery .gallery-poster--space {
    font-size: 57px;
  }

  .theme-gallery .gallery-poster--tide {
    font-size: 45px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-gallery .gallery-track,
  .theme-gallery .gallery-exhibit {
    will-change: auto;
  }
}
