
  img {
    max-width: 100%;
    height: auto;
    transform-origin: top left;
  }
  
  .gallery {
    /* https://tobiasahlin.com/blog/masonry-with-css/ */
    display: flex;
    flex-flow: column wrap;
    align-content: space-between;
    overflow: hidden;
    height: 250vw;
    /* height: 310vw; */
    /* Re-order items into rows */
    /* Force new columns */
  }
  .gallery .gallery-image {
    width: 33.3%;
  }
  .gallery .gallery-image[data-flipping] {
    opacity: 1;
    z-index: 3;
  }
  .gallery .gallery-image:nth-child(3n+1) {
    order: 1;
  }
  .gallery .gallery-image:nth-child(3n+2) {
    order: 2;
  }
  .gallery .gallery-image:nth-child(3n) {
    order: 3;
  }
  .gallery::before, .gallery::after {
    content: "";
    flex-basis: 100%;
    width: 0;
    order: 2;
  }
  
  .gallery-image {
    margin: 0;
    display: block;
    position: relative;
  }
  .gallery-image img {
    display: block;
    width: 100%;
  }
  .gallery-image figcaption {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    text-shadow: 0 0 1px #000;
    opacity: 0.8;
    padding: 1em;
    text-align: left;
    transition: opacity 0.4s linear;
    font-family: monospace;
  }
  .gallery-image:hover figcaption {
    opacity: 1;
  }
  
  .detail {
    z-index: 2;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(25, 25, 25, 0);
    box-shadow: 0 0 30px #000;
    display: flex;
    pointer-events: none;
    transition: background 0.3s linear;
  }
  .detail .gallery-image {
    /* padding: 5vmin; */
    padding: 0vmin !important;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .detail .gallery-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }
  .detail .gallery-image figcaption {
    display: none;
  }
  
  [data-state=detail] .detail {
    background: rgba(25, 25, 25, 0.85);
    pointer-events: auto;
  }
  [data-state=detail] .detail .gallery-image {
    opacity: 1;
  }
  
  [data-state=gallery] .detail .gallery-image {
    opacity: 0;
    transition: none;
  }
  
  /* ---------------------------------- */
  #app {
    pointer-events: none;
  }
  #app .gallery .gallery-image {
    pointer-events: auto;
  }
  
  .gallery-image {
    transition: opacity 0.5s linear;
  }
  
  #app:hover .gallery .gallery-image {
    /* opacity: 0.3; */
    opacity: 1;
  }
  #app:hover .gallery .gallery-image[data-flipping],
  #app:hover .gallery .gallery-image:hover {
    opacity: 1;
    transition-duration: 0.3s;
  }

/*---------------------- responsive-design -------------------- */
    @media(max-width:1280px){
        .gallery .gallery-image {
            width: 33.3%;
        }
    }

    @media(max-width:1080px){
        .gallery .gallery-image {
            width: 33.3%;
        }
    }

    @media(max-width:991px){
        .gallery .gallery-image {
            width: 33.3%;
        }
    }

    @media(max-width:900px){
        .gallery .gallery-image {
            width: 33.3%;
        }
    }
    
    @media(max-width:800px){
        .gallery .gallery-image {
            width: 33.3%;
        }
    }

    @media(max-width:768px){
        .gallery .gallery-image {
            width: 50%;
        }
    }

    @media(max-width:736px){
        .gallery .gallery-image {
            width: 50%;
        }
    }

    @media(max-width:667px){
        .gallery .gallery-image {
            width: 100%;
        }
    }

    @media(max-width:600px){
        .gallery .gallery-image {
            width: 100%;
        }
    }

    @media(max-width:568px){
        .gallery .gallery-image {
            width: 100%;
        }
    }
    
    @media(max-width:480px){
        .gallery .gallery-image {
            width: 100%;
        }
    }

    @media(max-width:414px){
        .gallery .gallery-image {
            width: 100%;
        }
    }

    @media(max-width:384px){
        .gallery .gallery-image {
            width: 100%;
        }
    }

    @media(max-width:375px){
        .gallery .gallery-image {
            width: 100%;
        }
    }

    @media(max-width:320px){
        .gallery .gallery-image {
            width: 100%;
        }
    }
    /*-- //responsive-design --*/