:root {
  --wifth: 500px;
  --marg: 20px;
}

*, *::before, *::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
}
body {
  height: 100%;
  margin: 0;

}

body {
  background-color: #fff;
  
  color: #000;
  font-family: "Times New Roman";
  display: block;
  align-items: center;
  overflow-x: hidden;

  overscroll-behavior: none;
}

.himg {
  display: block;
  width: var(--wifth);
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--marg);

  padding: 5px;

  border-width: 2px;
  border-style: solid;
  border-color: black;
}
.main {
  display: block;
  width: var(--wifth);

  margin-left: auto;
  margin-right: auto;
  margin-top: var(--marg);
  margin-bottom: var(--marg);

  overscroll-behavior: none;
  background: white;
}
.gallery
{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr;

  column-gap: 10px;
  row-gap: 15px;
  height: var(--wifth);
  background: white;
}
.row1
{
  background: #fff;
  width: 100%;
}
.row2
{
  background: #fff;
  width: 100%;
}
.row3
{
  background: #fff;
  width: 100%;
}
.image
{
  padding-bottom: 10px;
  width: 100%;
}
.image img 
{
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-width: 2px;
  border-style: solid;
  border-color: black;
}
.img1 {
  background-image: url(gallery-images\\thumbnail\\blue-fractal-poster-thumbnail.jpeg);
  background-repeat: no-repeat;
  background-size: contain;
  width: auto;

}
.img2 {
  background-image: url(gallery-images\\thumbnail\\blue-fractal-poster-thumbnail.jpeg);
  background-repeat: no-repeat;
  background-size: contain;
  height: 100px;
}
.img3 {
  background-image: url(gallery-images\\thumbnail\\blue-fractal-poster-thumbnail.jpeg);
  background-repeat: no-repeat;
  background-size: contain;
  height: 100px;
}
.img4 {
  background-image: url(gallery-images\\thumbnail\\chi-city-thumbnail.jpeg);
  background-repeat: no-repeat;
  background-size: contain;
  height: 100px;
}
.img5 {
  background-image: url(gallery-images\\thumbnail\\chi-city-thumbnail.jpeg);
  background-repeat: no-repeat;
  background-size: contain;
  height: 100px;
}
.pop {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: calc(var(--wifth) - 50px);
  max-width: calc(100vw - 2 * var(--marg));

  background: white;
  padding: 5px;

  border-width: 2px;
  border-style: solid;
  border-color: black;

}
.pop-head {
  display: flex;
  justify-content:space-between;
  gap: 10px;
  padding: 6px 10px; 
  align-items: center;
  
}
.pop-head p {
  display: flex;
  font-size: 1rem;
  line-height: 1;

}
.pop-head a, button {
  white-space:nowrap;

  text-decoration: none;
  color: inherit;

  display: inline;
  -webkit-appearance: none;
  appearance: none;

  font-weight: bold;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  
         /* pick the height you actually want */
  padding: 0 2px;         /* NO vertical padding */
  margin: 0;

  background: #fff;
  border-style: none;

  min-height: 0;
}
.pop-head a:hover, button:hover {
  background-color: black;
  color: white;
}

.pop-body {
  font-size: 0.85rem;
  padding: 0 15px;
}
.pop-body img {
  width: 100%;
}



@media screen and (max-width: 600px) {
  :root {
    --wifth: 95vw;
    --marg: 2.5vw;
  }
  body {
  height: 100vh;
  overflow-y: ;
  margin: 0;
  }
}

@media screen and (max-height: 600px) {
  :root {
    --wifth: 95vw;
    --marg: 2.5vw;
  }
  body {
  height: 100vh;
  overflow-y: hidden;
  margin: 0;
  }
}