html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #111;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  overflow: hidden;
}

.gallery-viewer {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.gallery-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 8px 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .82);
}

.gallery-back {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.gallery-back:hover,
.gallery-back:focus {
  background: #fff;
  color: #111;
}

.gallery-counter {
  margin-left: 16px;
  font-size: 14px;
  font-weight: 600;
}

.gallery-scroll {
  position: absolute;
  inset: 0;
  overflow: auto;
  background: #1a1a1a;
}

.gallery-stage {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: max-content;
  min-width: 100%;
  height: max-content;
  min-height: 100%;
  padding: 72px 72px 28px;
}

.gallery-image {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: auto;
  background: #fff;
  box-shadow: 0 0 18px rgba(0, 0, 0, .55);
}

.gallery-arrow {
  position: fixed;
  top: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 72px;
  transform: translateY(-50%);
  border-radius: 5px;
  background: rgba(0, 0, 0, .64);
  color: #fff;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 56px;
  line-height: 1;
  user-select: none;
}

.gallery-arrow:hover,
.gallery-arrow:focus {
  background: rgba(255, 255, 255, .92);
  color: #111;
}

.gallery-arrow--previous {
  left: 10px;
}

.gallery-arrow--next {
  right: 10px;
}

@media (max-width: 640px) {
  .gallery-toolbar {
    padding: 6px 10px;
  }

  .gallery-stage {
    padding: 64px 48px 20px;
  }

  .gallery-arrow {
    width: 38px;
    height: 58px;
    font-size: 44px;
  }

  .gallery-arrow--previous {
    left: 4px;
  }

  .gallery-arrow--next {
    right: 4px;
  }
}
