html {
	height: 100%;
	margin: 0;
}

body {
	background: #333240;
	height: 100%;
	margin: 0;
	overflow: hidden;
}

input[type="checkbox"] {
	display: none;
}

a {
	color: #FFF;
	text-decoration: none;
}
	
viewport {
	display: block;
	position: absolute;
	width: 100vw;
	height: 100vh;
	background: #4c4b60 linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.2));
}

titlebar {
	position: absolute;
	display: block;
	left: 0;
	right: 0;
	padding: 10px 10px 10px 55px;
	margin-top: 0px;
	background-color: rgba(0,0,0,0.25);
	color: #FFF;
	font-family: 'Economica', sans-serif;
	font-size: calc(10px + 3.25vh);
	text-shadow: 2px 2px 1px rgba(0,0,0,1);
	box-shadow: 0px 0px 5px rgba(0,0,0,0.1);
	min-height: 30px;
	line-height: max(30px, calc(10px + 3.25vh));
	z-index: 1000;
}

reference {
	display: block;
	position: absolute;
	top: calc(60px + 3vh);
	bottom: 10px;
	left: 0;
	right: 0;
	margin-left: 1vw;
	margin-right: 1vw;
	margin-bottom: 2vh;
}

poses {
	display: flex;
	flex-direction: row;
	position: absolute;
	left: 0;
	right: 15%;
	top: 0;
	bottom: 0;
	justify-content: center;
	align-items: center;
	transition: left 0.1s, bottom 0.1s, right 0.1s, top 0.1s;
}

pose {
	display: block;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
	height: 100%;
}

/* Front Pose */
#pose_front {
	width: 100%;
	background-image: url('../images/anthro/pose_front.png');
	background-position: center center;
	transition: background-image 0.5s;
}

#pose_front:hover, #show_labels:checked ~ viewport #pose_front { 
	background-image: url('../images/anthro/pose_front_labels.png'), url('../images/anthro/pose_front.png');
	transition: background-image 0.5s;
}


/* Front Pose Adult */
#show_adult:checked ~ viewport #pose_front {
	background-image: url('../images/anthro/pose_front_adult.png');
}

#show_adult:checked ~ viewport #pose_front:hover, #show_labels:checked + #show_adult:checked ~ viewport #pose_front { 
	background-image: url('../images/anthro/pose_front_labels.png'), url('../images/anthro/pose_front_adult.png');
	transition: background-image 0.5s;
}

/* Back Pose */
#pose_back {
	width: 80%;
	margin-left: -10%;
	margin-right: 1%;
	background-image: url('../images/anthro/pose_back.png');
	background-position: center center;
}

#pose_back:hover, #show_labels:checked ~ viewport #pose_back { 
	background-image: url('../images/anthro/pose_back_labels.png'), url('../images/anthro/pose_back.png');
	transition: background-image 0.5s;
}

extras {
	transition: left 0.1s, bottom 0.1s, right 0.1s, top 0.1s;
	display: flex;
	flex-direction: column;
	position: absolute;
	left: 85%;
	right: 0;
	top: 0;
	bottom: 0;
	justify-content: center;
	align-items: center;
}

detail {
	position: relative;
	display: block;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
	width: 100%;
	height: 100%;
	margin: 5px;
}

#detail_front {
	background-image: url('../images/anthro/detail_frontal.png');
}

#detail_twothirds {
	background-image: url('../images/anthro/detail_twothirds.png');
}

#detail_boybits {
	height: 70%;
	width: 70%;
	background-image: url('../images/anthro/detail_boybits.png');
	transition: opacity 0.5s;
	opacity: 1;
}

#detail_paws {
	height: 70%;
	width: 70%;
	background-image: url('../images/anthro/detail_paws.png');
}

#detail_eye {
	height: 50%;
	width: 50%;
	background-image: url('../images/anthro/detail_eye.png');
}

swatchbar {
	display: flex;
	position: absolute;
	right: 15px;
	top: 15px;
	bottom: 15px;
	width: 30vw;
	z-index: 1100;
}

swatch {
	position: relative;
	display: inline-block;
	height: 100%;
	width: 20%;
	margin-left: 3px;
	box-shadow: 0px 0px 3px rgba(0,0,0,0.3);
}

swatchsub {
	position: absolute;
	right: 2px;
	top: 2px;
	bottom: 2px;
	width: 45%;
}

#swatch_main, #swatch_picker_main {
	background-color: #45a9df;
}
#swatch_secondary, #swatch_picker_secondary {
	background-color: #87ccf1;
}
#swatch_markings, #swatch_picker_markings {
	background-color: #c23c45;
}
#swatch_eye, #swatch_picker_eye {
	background-color: #e8b51f;
}
#swatch_eye_secondary, #swatch_picker_eye_secondary {
	background-color: #de8d01;
}
#swatch_skin, #swatch_picker_skin {
	background-color: #f27083;
}

signature {
	position: relative;
	display: inline-block;
	height: 100%;
	width: 20%;
	margin-right: 5px;
	background-image: url('../images/common/acidapluvia.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center right;
	opacity: 0.3;
}

menubar {
	display: block;
	position: absolute;
	left: 10px;
	top: 10px;
	bottom: 10px;
	width: 35px;
	background-image: url('../images/common/menu_b.svg');
	filter: drop-shadow(1px 1px 2px rgba(0,0,0,1));
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
	pointer-events: all;
	cursor: pointer;
}

menulist {
	display: flex;
	flex-direction: column;
	background: linear-gradient(90deg, rgba(0,0,0,0.8),rgba(0,0,0,0));
	position: absolute;
	top: -10px;
	left: -15px;
	width: max-content;
	height: 100vh;
	padding: 15px;
	margin-left: -100vw;
	transition: margin-left 0.25s, width 0.25s;
	box-sizing: border-box;
	padding-top: max(40px, calc(30px + 4vh));
}

menubar:hover menulist {
	margin-left: 0;
	transition: margin-left 0.25s;
}

menulist > * {
	display: inline-block;
	position: relative;
	margin-top: 0.25em;
	margin-bottom: 0.25em;
	margin-right: 2.4em;
	cursor: pointer;
	padding-left: 2.4em;
}

#menu_show_adult::before, 
#menu_show_labels::before, 
#menu_show_swatches::before {
	position: inline-block;
	content: '';
	position: absolute;
	height: 1em;
	width: 1em;
	top: 0;
	bottom: 0;
	left: 1.2em;
	margin: auto;
	background: url('../images/common/cb_frame.svg') center center, url('../images/common/cb_blip.svg') left center;
	background-size: contain;
	background-repeat: no-repeat;
	opacity: 0.5;
	transition: background-position 0.5s, opacity 0.5s;
}

menulist > a::before {
	position: inline-block;
	content: '';
	position: absolute;
	background-color: #F0F;
	height: 1em;
	width: 1em;
	top: 0;
	bottom: 0;
	left: 1.2em;
	margin: auto;
	background: url('../images/common/link.svg') center center;
	background-size: contain;
	background-repeat: no-repeat;
	opacity: 0.5;
}


swatchlist {
	overflow-y: auto;
	text-align: right;
	display: flex;
	flex-direction: column;
	background: linear-gradient(-90deg, rgba(0,0,0,0.8),rgba(0,0,0,0));
	position: absolute;
	top: -15px;
	right: -15px;
	width: max-content;
	height: 100vh;
	padding: 15px;
	pointer-events: none;
	opacity: 0;
	transition: margin-left 0.5s, width 0.5s;
	box-sizing: border-box;
	padding-top: max(40px, calc(40px + 4vh));
	transition: opacity 0.25s;
}

swatchlist > * {
	display: block;
	width: 25vw;
	margin-bottom: 0.15em;
	border-style: solid;
	border-width: 1px;
	border-color: #000;			
	padding: 5px;
	box-shadow: 1px 1px 5px rgba(0,0,0,0.5);
	margin-left: 2em;
	font-size: 0.85em;
	line-height: 0.85em;
}

swatchtitle {
	display: block;
	font-size: 0.6em;
	line-height: 0.6em;
	margin-top: 2px;
	margin-bottom: 8px;
}

@media (max-aspect-ratio: 1/1) { /* Titlebar Font Sizing */
	titlebar {
		font-size: calc(10px + 3.25vw);
		min-height: 30px;
		line-height: max(30px, calc(10px + 3.25vw));
	}
	reference {
		top: calc(50px + 3.25vw);
	}
	swatchlist {
		padding-top: max(50px, calc(50px + 3.25vw));
	}
}

@media (min-aspect-ratio: 20/9) { /* Landscape - Details - 3 rows per column */
		extras {
			flex-wrap: wrap;
			left: 80%;
		}
		detail {
			height: 33% !important;
			width: 50% !important;
			margin: 0;
		}
		poses {
			right: 20%;
		}
}
@media (max-aspect-ratio: 8/5) { /* Compressed Landscape */
		extras {
			top: 75%;
			bottom: 0;
			left: 0;
			right: 0;
			flex-direction: row;
		}
		poses {
			top: 0;
			bottom: 30%;
			left: 0;
			right: 0;
		}
}

@media (max-aspect-ratio: 1/1) {  /* Square */
		extras {
			top: 77%;
			bottom: 0;
			left: 0;
			right: 0;
			flex-direction: row;
		}
		poses {
			flex-direction: column;
			top: 0;
			bottom: 28%;
			left: 0;
			right: 0;
		}
		pose {
			width: 100% !important;
		}
		#pose_front {
			margin-top: 0%;
			margin-bottom: -9.5%;
			background-position: left center;
		}
		#pose_back {
			margin-top: -9.5%;
			margin-bottom: -4%;
			margin-left: 0px;
			background-position: right center;
		}
}

@media (max-aspect-ratio: 5/7) {  /* Portrait */
		#pose_front {
			margin-top: 0%;
			margin-bottom: -10%;
			background-position: left center;
		}
		#pose_back {
			margin-top: 0;
			margin-bottom: -5%;
			background-position: right center;
		}
}


@media (max-aspect-ratio: 5/8) {  /* Portrait Compressed */
		#pose_front {
			margin-top: -1%;
			margin-bottom: -10%;
			background-position: left top;
		}
		#pose_back {
			margin-top: 0;
			margin-bottom: -5%;
			background-position: right center;
		}
}

@media (max-aspect-ratio: 5/9) { /* Portrait - Details - 3 columns per row */
		extras {
			flex-wrap: wrap;
			top: 75%;
		}
		detail {
			height: 50% !important;
			width: 30% !important;
		}
		#pose_back {
			margin-left: 0;
		}
		poses {
			bottom: 30%;
		}
}		

@media (min-width: 2500px) { /* HD Imagery */
	#pose_front {
		background-image: url('../images/anthro/pose_front_hd.png');
	}

	#pose_back {
		background-image: url('../images/anthro/pose_back_hd.png');
	}
	
	#pose_front:hover, #show_labels:checked ~ viewport #pose_front { 
		background-image: url('../images/anthro/pose_front_labels.png'), url('../images/anthro/pose_front_hd.png');
		transition: background-image 0.5s;
	}
	#pose_back:hover, #show_labels:checked ~ viewport #pose_back { 
		background-image: url('../images/anthro/pose_back_labels.png'), url('../images/anthro/pose_back_hd.png');
		transition: background-image 0.5s;
	}
	
	/* Adult Version */
		
	#show_adult:checked ~ viewport #pose_front {
		background-image: url('../images/anthro/pose_front_adult_hd.png');
	}
	
	#show_adult:checked ~ viewport #pose_front:hover, #show_labels:checked + #show_adult:checked ~ viewport #pose_front { 
		background-image: url('../images/anthro/pose_front_labels.png'), url('../images/anthro/pose_front_adult_hd.png');
		transition: background-image 0.5s;
	}

	


}

#show_adult:not(:checked) ~ viewport #detail_boybits {
	width: 0% !important;
	height: 0% !important;
	opacity: 0;
}



#show_adult:checked ~ viewport #menu_show_adult::before,
#show_labels:checked ~ viewport #menu_show_labels::before,
#show_swatches:checked ~ viewport #menu_show_swatches::before {
	background: url('../images/common/cb_frame.svg') center center, url('../images/common/cb_blip.svg') right center;
	background-size: contain;
	background-repeat: no-repeat;
	opacity: 1;
}

swatchbar:hover > swatchlist, #show_swatches:checked ~ viewport swatchlist {
	pointer-events: auto;
	opacity: 1;
}