
#page {
	width: 1840px; /* enough for 10 rows of memes plus padding equivalent to inter-meme padding */
}
h1.mt-header {
	margin: 0 5px;
}
h2.mt-subheader {
	font-size: 13px;
	margin: 10px 5px;
}
.mt-banner-top {
	width: 728px;
	margin: 10px 0 0 10px;
	float: right;
}
.mt-banner-top + .mt-header {
	height: 90px;
	line-height: 90px;
	padding: 10px 0 0;
}
.mt-banner-msg {
	color: #999;
	opacity: 0.3;
	font-size: 11px;
	position: absolute;
	left: 50%;
	top: 50%;
	margin: -10px 0 0 -60px;
	width: 120px;
	height: 20px;
	line-height: 20px;
}
.mt-ad {
	margin: 20px 0 10px;
}

#mt-tabs {
	height: 0;
	position: relative;
}
.mt-tab {
	display: inline-block;
	height: 35px;
	line-height: 34px;
	padding: 0 15px;
	color: #333;
	background: #e1e1e1;
	position: relative;
	top: -36px;
	border: 1px solid #ccc;
	border-radius: 5px 5px 0 0;
	border-bottom: none;
}
a.mt-tab:hover {
	text-decoration: none;
}
.darkmode .mt-tab {
	color: #ccc;
	border-color: #666;
	background: #222;
}
.mt-tab.on {
	height: 36px;
	background: #fff;
	font-weight: bold;
}
.darkmode .mt-tab.on {
	background: #333;
}
#mt-tab-memes {
	margin-right: 10px;
}
#mt-sort {
	position: absolute;
	right: 0;
	bottom: 6px;
}

#mt-boxes-wrap {
	padding: 10px 20px;
	text-align: center;
	border-radius: 0 3px 3px 3px;
}
.mt-boxes {
	margin: 0 -11px; /* just enough for two columns of 150px width images to fit on 360px wide device */
}
.mt-box {
	display: inline-block;
	vertical-align: top;
	width: 180px;
	max-width: 49%; /* 49 because of rounding, to ensure 2 memes per row on all mobile phones */
	padding: 10px 5px 30px;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
}
.mt-title {
	width: 100%;
	height: 42px;
	font-size: 14px;
	line-height: 18px;
	font-weight: bold;
	text-align: center;
	margin: 0;
	word-wrap: break-word;
}
.mt-title a {
	color: #333;
}
.darkmode .mt-title a {
	color: #ccc;
}
.mt-box:hover .mt-title a {
	color: #00bff3;
}
.mt-img-wrap {
	display: block;
	position: relative;
}
.mt-img-wrap img {
	display: block;
	margin: 0 auto;
	width: 150px;
	max-width: 100%;
}
.mt-animated-label {
	position: absolute;
	bottom: 5px;
	left: 50%;
	margin-left: -50px;
	width: 100px;
	background: rgba(0, 0, 0, 0.5);
	padding: 5px 0;
	color: #fff;
	border-radius: 3px;
	pointer-events: none;
}
.mt-info {
	display: none;
	margin: 5px 0 -5px;
	font-size: 10px;
	line-height: 18px;
}
.mt-info .img-id {
	float: left;
	width: 100px;
	height: 18px;
	line-height: 16px;
	padding: 0 3px;
}
.mt-captions {
	float: right;
}
.mt-caption {
	width: 150px;
	display: block;
	margin: 10px auto 0;
	max-width: 100%;
}

/**Meme Search**/
#mt-search-panel {
	margin: 20px 0;
	text-align: center;
	display: flex;
	width: 100%;
	flex-wrap: wrap;
	justify-content: center;
}
#mt-search-query {
	vertical-align: top;
	width: 300px;
	max-width: 65%;
}
#mt-search-submit {
	vertical-align: top;
	width: 30%;
	max-width: 120px;
	margin-left: 10px;
}
.mt-search-opts {
	width: 100%;
}
.mt-search-opts .check-wrap {
	margin: 4px 5px 0;
}
.mt-boxes + h2 {
	padding-top: 20px;
	border-top: 1px solid #ccc;
	margin-top: 20px;
}
.darkmode .mt-boxes + h2 {
	border-color: #666;
}

@media (max-width: 1130px) {
	.mt-banner-top {
		width: 100%;
		margin: 10px 0 0;
		float: none;
	}
	h1.mt-header {
		font-size: 21px;
		text-align: center;
		margin: 0 0 5px;
	}
	.mt-banner-top + .mt-header {
		height: auto;
		line-height: initial;
	}
	h2.mt-subheader {
		font-size: 11px;
		text-align: center;
		margin: 0 10px;
	}
	#mt-tabs {
		margin-top: 56px;
	}
}

@media (max-width: 430px) {
	#mt-tabs .mt-tab {
		margin-right: 0;
		padding: 0 9px;
	}
}
@media (max-width: 390px) {
	#mt-tabs .mt-tab {
		font-size: 13px;
	}
}