html,
body {
	margin: 0;
	padding: 0;
	background: #124 url(bg.png);
	color: #eee;
	font-family: Arial, Helvetica, Sans-Serif;
	font-size: 11pt;
	-webkit-text-size-adjust: 100%;
}
body {
	padding: 2vw;
	position: relative;
	display: flex;
	flex-flow: row wrap;
	justify-content: center;
}

a {
	text-decoration: none;
	color: #FB0;
	transition: color .25s;
}
a:hover,
a:active,
a:focus {
	text-decoration: underline;
	color: #FFF;
	transition: color .25s;
}

#top {
	margin: 2vw auto;
	margin-top: 0;
	order: -1;
	flex: 1 100%;
	text-align: center;
}
#top a {
	background: url(mainbanner.png) center center/cover no-repeat;
	display: inline-block;
	border: 2px solid #fb0;
	box-shadow: 0 0.25rem 0.5rem #013;
	max-width: 960px;
	width: 100%;
	box-sizing: border-box;
	height: 25vw;
	max-height: 220px;
	color: transparent;
}

#container {
	background: url(task.gif);
	max-width: 960px;
	margin: 0;
	order: 1;
	flex: 1 100%;
}
#content,
#comments {
	background: #326;
	border: 2px solid #fb0;
	padding: 2vw;
	text-align: justify;
	box-shadow: 0 0.25rem 0.5rem #013;
}

.banner {
	background: #326;
	border: 2px solid #fb0;
	box-shadow: 0 0.25rem 0.5rem #013;
	margin: 2vw 1vw;
	padding: 2vw;
	width: 50%;
	order: 2;
	flex: 1;
}
#internal {
	margin-left: 0;
}
#external {
	margin-right: 0;
}
.banner ul {
	list-style: none;
	margin: auto;
	padding: 0;
}
.banner .banner_divider {
	width: calc(100% - 40px);
	height: 1px;
	min-height: 1px;
	margin-top: 15px;
	margin-bottom: 15px;
	margin-left: auto;
	margin-right: auto;
	background-color: #fb0;
}

#breadcrumbs {
	border: 1px solid #428;
	margin: 0;
	margin-bottom: 2vw;
	padding: 2vw;
	box-shadow: 0 1px 4px #214;
	text-shadow: 0 1px 2px #214;
}

p>a>img {
	display: inline-block;
	width: 100%;
	max-width: 560px;
	height: auto;
	vertical-align: bottom;
	box-shadow: 0 2px 4px #214;
}

a.comic,
.chapter {
	display: block;
	width: 100%;
	box-shadow: none;
	margin: 0;
	padding: 0.25rem;
	border: 0;
}
.list a.comic:nth-child(even),
.list .chapter:nth-child(even) {
	background: #281855;
}
a.comic h2 {
	margin: 0.25rem 0;
}
.comic {
	border: 1px solid #428;
	margin: 1rem 0;
	box-shadow: 0 2px 4px #214;
}
.comic header {
	background: #281855;
	border-bottom: 1px solid #214;
	padding: 0.25rem 0.5rem;
}
.comic .list {
	display: flex;
	flex-flow: row wrap;
	justify-content: center;
}
.comic .page {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	text-align: center;
	margin: 1em;
	border: 1px solid #428;
	padding: 4px;
	box-shadow: 0 1px 4px #214;
	flex: 0;
}
.comic .page a {
	display: flex;
	flex-direction: column;
}
.comic .page img {
	width: 96px;
	height: 144px;
	object-fit: cover;
	background-color: grey;
}
.comic .page span {
	display: block;
	margin-top: 4px;
}
.comic .page .published {
	border: 2px solid #326;
}
.comic .page .early {
	border: 2px solid #FB0;
}

.comic .pagination {
	margin: 0;
	padding: 0;
}
.comic .pagination .page {
	display: inline;
	margin: 0;
	padding: 0;
	morder: 0;
	box-shadow: none;
	flex: 0;
}

.chapter {
	display: flex;
}
.chapter .thumbnail {
	flex: 0 1 auto;
}
.chapter h3 {
	flex: 0 1 100%;
	margin: 1em;
}

#comicpage {
	margin: 1rem 0;
	text-align: center;
}
#comicpage img {
	max-width: 700px;
	width: 100%;
	box-shadow: 0 2px 4px #214;
	background-color: gray;
}
.comicnav {
	text-align: center;
	font-size: 12pt;
	font-weight: bold;
}

.comicnav a,
.comicnav span {
	margin: 2px;
	padding: 4px;
}

#comments {
	margin-top: 16px;
}

.comment,
#postcomment {
	border: 1px solid #428;
	margin: 1rem 0;
	box-shadow: 0 2px 4px #214;
}
.comment>header,
#postcomment>div {
	background: #281855;
	border-bottom: 1px solid #214;
	padding: 0.25rem 0.5rem;
}
.comment>div {
	padding: 0.25rem 0.5rem;
}
.comment .author,
#postcomment>div {
	font-weight: bold;
	font-size: 12pt;
}

.comment blockquote,
.comment .codeblock {
	color: #BBB;
	padding: 0.25rem;
	border: 1px solid #428;
	box-shadow: 0 2px 4px #214;
	box-sizing: border-box;
}
.comment blockquote cite,
.comment .codeblock .title {
	color: #97C;
	display: block;
	position: relative;
	margin-bottom: 0.25rem;
	padding-bottom: 0.25rem;
	border-bottom: 1px solid #214;
}
.comment blockquote cite span {
	position: absolute;
	bottom: 0.25rem;
	right: 0;
	font-size: 0.8em;
}
.comment blockquote cite a {
	display: inline-block;
	width: 1em;
	height: 0.8em;
	background: url(jump.png) center center no-repeat;
}
.comment .codeblock code {
	overflow: auto;
	height: auto;
	max-height: 600px;
	display: block;
}
.smilie {
	vertical-align: middle;
}

#postcomment>textarea {
	display: block;
	width: 100%;
	height: 10em;
	background: #438;
	border: 1px solid #438;
	color: #EEE;
	font-family: Arial, Helvetica, Sans-Serif;
	font-size: 10pt;
	padding: 4px;
	box-sizing: border-box;
	transition: border .25s;
}
#postcomment>textarea:hover,
#postcomment>textarea:focus {
	border: 1px solid #FB0;
	transition: border .25s;
}
#postcomment>input {
	width: 100%;
	box-sizing: border-box;
}

.comment:first-child {
	margin-top: 0;
}
#postcomment {
	margin-bottom: 0;
}

.success {
	background: #052;
	border: 1px solid #1C3;
	text-align: center;
	padding: 5px 20px;
	margin-bottom: 1rem;
	font-size: 0.8rem;
	word-wrap: break-word;
	box-shadow: 0 2px 4px #214;
}
.info {
	background: #036;
	border: 1px solid #15C;
	text-align: center;
	padding: 5px 20px;
	margin-bottom: 1rem;
	font-size: 0.8rem;
	word-wrap: break-word;
	box-shadow: 0 2px 4px #214;
}
.error {
	background: #520;
	border: 1px solid #C31;
	text-align: center;
	padding: 5px 20px;
	margin-bottom: 1rem;
	font-size: 0.8rem;
	word-wrap: break-word;
	box-shadow: 0 2px 4px #214;
}
.error a:link,
.red_alert a:visited,
.red_alert a:hover,
.red_alert a:active {
	color: #C31;
}

figure {
	display: block;
	margin: 0;
	padding: 0;
	width: 100%;
	text-align: center;
}
figure img {
	max-width: 100%;
	height: auto;
}
figure figcaption {
	font-size: 9pt;
	font-style: italic;
	margin: 0;
	padding: 0.25em;
}

a.button:link,
a.button:visited,
a.button:active,
button,
input.button {
	display: inline-block;
	padding: 2px 5px;
	margin: 2px;
	font-size: 1rem;
	background: #281855;
	border: 1px solid #428;
	color: #FB0;
	box-shadow: 0 2px 4px #214;
	cursor: pointer;
	transition: background 0.25s, border 0.25s, color 0.25s;
}

a.button:hover,
a.button:focus,
button:hover,
input.button:hover,
button:focus,
input.button:focus {
	color: #FFF;
	background: #326;
	border-color: #FB0;
	transition: background 0.25s, border 0.25s, color 0.25s;
}

a.button.disabled,
button:disabled,
input.button:disabled {
	color: #DDD;
	background: #666;
	border-color: #CCC;
	transition: background 0.25s, border 0.25s, color 0.25s;
}

.pagination {
	text-align: center;
}

#debug,
#copyright {
	margin: 1rem auto;
	color: #77A;
	font-size: 9pt;
	display: none;
}

#carousel {
	display: block;
	overflow: auto;
	font-size: 0;
	max-width: 700px;
	width: 100%;
	margin: auto;
	background-color: white;
	border-bottom: 1px solid #ccc
}
[data-carousel-slide] {
	position: absolute;
	visibility: hidden;
}
.slide {
	display: inline-flex;
	width: 100%;
	height: 100%;
	top: 0;
	visibility: visible;
}
.slide img {
	vertical-align: bottom;
}

font {
	color: #000;
}

/* Halflite: Galleries */
.gallery-desc {
	font-size: 18px;
}
.gallery-tiles {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	position: relative;
	width: 100%;
	height: auto;
}
.gallery-tiles .gallery-separator {
	position: relative;
	width: 100%;
	padding-bottom: 10px;
	margin-top: 20px;
	margin-bottom: 30px;
	border-bottom: solid 2px #FB0;
	color: #FB0;
	font-size: 40px;
}
.gallery-tiles .gallery-tile {
	position: relative;
	width: auto;
	height: auto;
	margin-left: 10px;
	margin-right: 10px;
	margin-bottom: 20px;
	cursor: pointer;
}
.gallery-tiles .gallery-tile img {
	width: auto;
	height: 200px;
	box-sizing: border-box;
	border: solid 1px white;
	object-fit: cover;
}
#gallery-staging {
	display: none;
}

/* Halflite: Admin gallery pages */
.gallery-edit-list {
	width: 100%;
	height: auto;
}
.gallery-add-new {
	display: block;
	position: relative;
	padding-top: 20px;
	padding-bottom: 30px;
	font-size: 25px;
}
.gallery-dropdown {
	width: 100%;
	height: auto;
	max-height: 50px;
	transition: max-height 0.3s ease;
	overflow: hidden;
}
.gallery-dropdown.open {
	max-height: 2000px;
}
.gallery-dropdown:not(:last-child) {
	margin-bottom: 10px;
}
.gallery-dropdown .dropdown-header {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	position: relative;
	align-items: center;
	width: 100%;
	height: 50px;
	padding: 0 10px;
	box-sizing: border-box;
	border-bottom: solid 2px #FB0;
	background-color: #281855;
	cursor: pointer;
}
.gallery-dropdown .dropdown-header .dropdown-label {
	position: relative;
	color: #FB0;
	font-size: 25px;
}
.gallery-dropdown .dropdown-header .dropdown-arrow {
	position: relative;
	width: 25px;
	height: 25px;
}
.gallery-dropdown .dropdown-header .dropdown-arrow svg {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 25px;
	min-width: 25px;
	height: 25px;
	transform: translate(-50%, -50%) rotate(-90deg);
	transition: transform 0.3s ease;
}
.gallery-dropdown .dropdown-header .dropdown-arrow svg path {
	fill: #fb0;
}
.gallery-dropdown.open .dropdown-header .dropdown-arrow svg {
	transform: translate(-50%, -50%) rotate(90deg);
}
.gallery-dropdown .dropdown-content {
	width: 100%;
	height: auto;
}
.gallery-dropdown .dropdown-content .list {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	padding: 10px;
	margin: 0;
	border-width: 0;
	background-color: #214;
}
.gallery-dropdown .dropdown-content .list li {
	position: relative;
	box-sizing: border-box;
	background-color: transparent !important;
}
.gallery-dropdown .dropdown-content .list li a {
	position: relative;
	display: block;
	position: relative;
	overflow: hidden;
}
.gallery-dropdown .dropdown-content .list li a img {
	position: relative;
	width: auto;
	height: 80px;
	object-fit: cover;
}
.gallery-dropdown .dropdown-content .list li a .unpublished-cover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	color: white;
	background-color: rgba(34, 17, 68, 0.5);
	writing-mode: vertical-lr;
	font-size: 14px;
	pointer-events: none;
}

/* Halflite: Lightbox */
#lightbox {
	display: none;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.9);
	opacity: 0;
	transition: opacity 0.5s ease;
	z-index: 1;
}
#lightbox.draw {
	display: flex !important;
}
#lightbox.show {
	opacity: 1;
}
#lightbox .lightbox-arrow {
	position: relative;
	width: 50px;
	min-width: 50px;
	height: 50px;
	margin: 30px;
	box-sizing: border-box;
	border: 2px solid #fb0;
	border-radius: 50%;
	background-color: #326;
	opacity: 0.5;
	transition: opacity 0.5s ease;
	cursor: pointer;
	pointer-events: none !important;
}
#lightbox .lightbox-arrow.active {
	opacity: 1;
	pointer-events: auto !important;
}
#lightbox .lightbox-arrow.arrow-right {
	transform: rotate(180deg);
}
#lightbox .lightbox-arrow svg {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 30px;
	min-width: 30px;
	height: 30px;
	transform: translate(-50%, -50%);
}
#lightbox .lightbox-arrow svg path {
	fill: #fb0;
}
#lightbox .lightbox-center {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	position: relative;
}
#lightbox .lightbox-center .img-container {
	position: relative;
}
#lightbox .lightbox-center .img-container .img-full {
	position: relative;
	max-height: 90vmin;
  	max-width: calc(100vw - 220px);
}
#lightbox .lightbox-center .img-container .img-caption {
	position: relative;
	padding: 10pt;
	font-size: 12pt;
}
#lightbox .lightbox-close {
	position: absolute;
	top: 0;
	right: 0;
	width: 50px;
	height: 50px;
	margin: 30px;
	cursor: pointer;
}
#lightbox .lightbox-close svg {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	transform: translate(-50%, -50%);
}
#lightbox .lightbox-close svg path {
	fill: white;
}

/* Styling specific to browser aspect ratios */
@media (min-width: 800px) {

	body {
		padding: 16px;
	}
	#top {
		margin:16px auto;
	}
	#top a {
		width:50%;
	}

	#container {
		max-width: 50%; 
		flex: 1;
	}
	#content,
	#comments {
		padding: 18px;
	}

	#breadcrumbs {
		margin: -10px;
		margin-bottom: 16px;
		padding: 8px;
	}

	#debug,
	#copyright {
		display: block;
	}

	/* Navigation banners (left and right) */
	nav.banner {
		padding: 2rem 0;
	}
	.banner {
		width: 220px;
		height: auto;
		min-height: 500px;
		margin: 0 14px;
		padding: 0;
		box-sizing: border-box;
		text-align: center;
		font-size: 12pt;
		flex: none;
		position: relative;
		border-bottom: none;
		margin-bottom: 220px;
	}
	.banner header {
		font-weight: bold;
		padding: 1rem;
	}
	.banner ul {
		width: 100%;
	}
	.banner li {
		font-weight: bold;
		transition: background 0.25s;
	}
	.banner li:hover {
		background: rgba(255,255,255,0.5);
		transition: background .25s;
	}
	.banner a {
		padding: 0.4rem;
		display: block;
		width: 100%;
		text-decoration: none;
		box-sizing: border-box;
	}
	.banner li:hover a {
		color:#281855;
	}
	.banner img {
		max-width: 100%;
		width: 128px;
	}

	.banner:before {
		content: ' ';
		position: absolute;
		bottom: -220px;
		left: -2px;
		width: 0;
		height: 0;
		border-left: 110px solid transparent;
		border-right: 110px solid transparent;
		border-top: 220px solid #fb0;
	}
	.banner:after {
		content: ' ';
		position: absolute;
		bottom: -215px;
		left: 0;
		width: 0;
		height: 0;
		border-left: 108px solid transparent;
		border-right: 108px solid transparent;
		border-top: 216px solid #326;
	}

	#internal {
		order: 0;
	}
	#external {
		order: 2;
	}
}
