html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	text-align: center;
}   
body {
	font-family: Helvetica, Arial, sans-serif;
	font-size: 24px;
	line-height: 24px;
}
.header {
	position: absolute; 
	top: 34px; 
	left: 36px;
}
.more {
	position: absolute; 
	top: 33px; 
	right: 33px;
}
.more img {
	height: 24px;
}
.close {
	position: absolute; 
	top: 33px; 
	right: 33px;
}
.close img {
	height: 24px;
}
.number {
	position: absolute; 
	bottom: 33px; 
	right: 36px;
}
.image {
	position: absolute;
	top: 50%;
	-ms-transform: translateY(-50%);
	transform: translateY(-50%);
	width: 100%;
}
.image img {
	max-height: calc(100vh - 216px);
	max-width: calc(100% - 72px);
	margin-top: 4px;
}
.previous a {
	position: absolute;
	top: 108px;
	left: 0;
	width: 50%;
	height: calc(100vh - 216px);
	cursor: w-resize;
}
.next a {
	position: absolute;
	top: 108px;
	right: 0;
	width: 50%;
	height: calc(100vh - 216px);
	cursor: e-resize;
}
.grid {
	font-size: 0px; 
	width: 100%; 
	position: absolute;
	top: 108px;
}
.grid img {
	width: calc(33.3% - 72px); 
	margin: 36px;
	margin-top: 0px;
	margin-bottom: 108px;
	vertical-align: middle;
}
a {
	outline: none;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
  	-webkit-tap-highlight-color: transparent;
}
a:link {
	color: #000;
	text-decoration: none;
}
a:visited {
	color: #000;
	text-decoration: none;
}
a:hover {
	color: #000;
	text-decoration: none;
}
a:active {
	color: #000;
	text-decoration: none;
}
@-moz-document url-prefix() {
	.header {
		top: 35px; 
	}
	.number {
		bottom: 31px;
	}
	.image img {
		margin-top: 6px;
	}
}
@media only screen and (max-width: 800px) {
	body {
		font-size: 16px;
		line-height: 16px;
	}
	.header {
		top: 22px; 
		left: 24px;
	}
	.close {
		top: 22px; 
		right: 22px;
	}
	.close img {
		height: 16px;
	}
	.more {
		top: 22px; 
		right: 22px;
	}
	.more img {
		height: 16px;
	}
	.number {
		bottom: 22px; 
		right: 24px;
	}
	.image img {
		max-height: calc(100vh - 288px);
		max-width: calc(100% - 48px);
		margin-top: 3px;
	}
	.previous a {
		top: 72px;
		height: calc(100vh - 144px);
	}
	.next a {
		top: 72px;
		height: calc(100vh - 144px);
	}
	.grid {
		width: calc(100% - 24px);
		margin: 12px;
		margin-top: 0px;
		margin-bottom: 0px;
	}
	.grid img {
		width: calc(33.3% - 24px); 
		margin: 12px;
		margin-top: 0px;
		margin-bottom: 72px;
	}
	@-moz-document url-prefix() {
		.header {
			top: 23px; 
		}
		.number {
			bottom: 26px;
		}
		.image img {
			margin-top: 0px;
		}
	}
}
@media only screen and (max-width: 400px) {
	body {
		font-size: 14px;
		line-height: 14px;
	}
	.header {
		top: 21px; 
		left: 22px;
	}
	.close {
		top: 21px; 
		right: 21px;
	}
	.close img {
		height: 14px;
	}
	.more {
		top: 21px; 
		right: 21px;
	}
	.more img {
		height: 14px;
	}
	.number {
		bottom: 19px; 
		right: 22px;
	}
	.image img {
		max-height: calc(100vh - 264px);
		max-width: calc(100% - 44px);
		margin-top: 3px;
	}
	.previous a {
		top: 66px;
		height: calc(100vh - 132px);
	}
	.next a {
		top: 66px;
		height: calc(100vh - 132px);
	}
	.grid {
		width: calc(100% - 22px);
		margin: 11px;
		margin-top: 0px;
		margin-bottom: 0px;
		top: 99px;
	}
	.grid img {
		width: calc(50% - 22px); 
		margin: 11px;
		margin-top: 0px;
		margin-bottom: 66px;
	}
	@-moz-document url-prefix() {
		.header {
			top: 22px; 
		}
		.number {
			bottom: 22px;
		}
		.image img {
			margin-top: 0px;
		}
	}
}