#wrapper {
	height: 100vh;
	overflow: hidden;
}

html.topmodal-isopen,
body.topmodal-isopen {
	height: 100%;
	overflow: hidden;
}


.topmodal_open{
	background-color: #F4F4F4;
	color: #5A5A5A;
	margin: 0 auto 40px;
	padding: 10px 30px;
	display: inline-block;
	color: #2796DC;
	border: 1px solid #D3D3D3;
	border-radius: 5px;
	font-size: 110%;
	cursor: pointer;
}
.topmodal_open:hover{
	background-color: #D3D3D3;
}
.topmodal {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: rgba(0,0,0,0.8);
	z-index: 9999;
	touch-action: none;
}

.topmodal_inner {
	position: relative;
	width: 100%;
	height: 100%;
	display: table;
}

.topmodal_x {
	position: absolute;
	bottom: 100%;
	right: 0;

	width: 50px;
	height: 50px;
	line-height: 50px;

	color: #999999;
	background-color: transparent;
	font-size: 24px;
	padding: 0;
	margin: 0;
	display: inline-block;
	border: none;
}

.topmodal_x:focus {
	outline: none;
}

.topmodal_body {
	display: table-cell;
	vertical-align: middle;

	text-align: center;
	position: relative;

	height: 100%;
}

.videoframe {
	position: relative;
	margin: 0 auto;
}

.videoframe_frame,
.videoframe_poster {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.videoframe_poster {
	display: none;
}


/* horizontal */
@media (min-aspect-ratio: 16/9) {
	.videoframe {
		height: 80%;
		width: 141.5vh;
	}
}

/* vertical */
@media (max-aspect-ratio: 16/9) {
	.videoframe {
		width: 80%;
		/*height: 0;*/
	}
	.videoframe:before {
		content: '';
		display: block;
		padding-top: 56.25%;
	}
}

@media (min-aspect-ratio: 16/9) and (max-width: 767px) {
	.videoframe {
		height: 100%;
	}
}

@media (max-aspect-ratio: 16/9) and (max-width: 767px) {
	.videoframe {
		width: 100%;
	}
}

@media (max-width: 767px) and (orientation: landscape) {
	.topmodal_x {
		bottom: auto;
		top: 0;
	}
}

@media (max-width: 639px) {
	.topmodal_x {
		width: 30px;
		height: 25px;
		line-height: 25px;
		font-size: 16px;
	}
	
	.topmodal_open{
		margin-bottom: 30px;
	}
}
