@charset "UTF-8";

:root { 
	--preimage-height: 0px;
}

.top-panel {
	background: rgba(0, 0, 0, 0.6);
	left: 0px;
	top: 0px;
	width: 100%;
	z-index: 300;
}

.label {
	display: block;
	position: fixed;
	top: calc(50% - 50px);
	z-index: 500;
}

#home {
	float: left;
	left: 5px;
}

#home > a {
	display: block;
	background: url("../images/home-label_gray.png") no-repeat left top;
	width: 100px;
	height: 51px;
	text-decoration: none;
}

#home > a:hover {
	background: url("../images/home-label_green.png") no-repeat left top;
}

#glasses {
	float: right;
	display: block;
	right: 5px;
	width: 128px;
	height: 51px;
	background: url("../images/glasses.png") no-repeat left top;
}

#glasses > button {
	display: inline-block;
	position: absolute;
	width: 30px;
	height: 30px;
	margin: 0 0px;
	padding: 0px 0px;
	text-decoration: none;
	top: 18px;
	border: none;
	background: transparent;
	border-radius: 50%;
	font-size: 2em;
	cursor: pointer;
}

#glasses .zoom {
	
}

body.zoom-0 #glasses #minus {
	cursor: default !important;
}

body.zoom-3 #glasses #plus {
	cursor: default !important;
}

#minus {
	left: 6px;
}

#plus {
	left: 59px;
}

.text-image {
	width: 550px;
	margin-bottom: 10px;
}

#text {
	margin-left: 10px;
  	display: -webkit-box;
  	display: -moz-box;
  	display: -ms-flexbox;
  	display: -webkit-flex;
    display: flex;
	-webkit-flex-direction: column;
	flex-direction: column;
	-webkit-align-items: center;
	align-items: center;
	width: 610px;
	position: relative;
}

.artefact {
	position: relative;
	z-index: 200;
}

#text-corpus {
  	display: -webkit-box;
  	display: -moz-box;
  	display: -ms-flexbox;
  	display: -webkit-flex;
    display: flex;
	-webkit-flex-direction: column;
	flex-direction: column;
	-webkit-align-items: center;
	align-items: center;
	z-index: 200;
}

#text-bg, #text-bg > *, #text-corpus {
	width: inherit;
}

#text-bg {
 	position: absolute;
	z-index: 100;
	height: 100%;
	top: 0px;
	left: 0px;
}

#text-bg-top {
	background: url("../images/texts/blank-paper-trans_top.png") no-repeat
		center top;
	height: 300px;
}

#text-bg-middle {
	background: url("../images/texts/blank-paper-trans_middle.png") repeat-y center top;
	min-height: 10px;
	height: calc(100% - 300px - 40px);
}

#text-bg-bottom {
	background: url("../images/texts/blank-paper-trans_bottom.png") no-repeat center top;
	height: 40px;
}

#text-bg-top, #text-bg-middle, #text-bg-bottom {
	background-size: 100%;
}

#text-body {
	text-align: justify;
	margin-left: 50px;
	margin-right: 60px;
	font-size: 1em;
	padding-bottom: 60px;
}

#text-title {
	margin: 2em 30px 0px 25px;
	text-align: center;
}

#text-body > p.centered-text{
	text-indent: 0px;
}

#text-body > p.centered-text, #text-body > p.chapter,
#text-body > p.centered-text-def, 
#text-body > p.centered-definition {
	text-indent: 0px;
	text-align: center;
}

#text-body > p.centered-text {
	font-style: italic;
}

#text-body > p.centered-text-def {
	font-style: italic;
	margin-bottom: 0.3em;	
}

#text-body > p.centered-definition {
	margin-top: 0;
	font-style: italic;
}

#text-body > p.no-top-indent {
	text-indent: 0px;
	margin-top: 0;
}

#text-body > p.no-indent {
	text-indent: 0px;
	margin: 0.2em;
}

#text-body > p.indent {
	text-indent: 40px;
	margin: 0px;
}

#text-body > p.indent-reverse {
    text-indent: -40px;
    margin-left: 40px;
}
    
#text-body > p.italic {
	font-style: italic;
}

#text-body > p.personage {
	display: inline;
	margin: 0px;
	letter-spacing: 0.2em;
}

#text-body > div.personage {
	display: inline;
	margin: 0px;
	letter-spacing: 0.2em;
}

#text-body > a > img {
	width: 100%;
	margin-top: 15px;
	margin-bottom: 15px;
}
 
#text-body>div.end {
	margin-top: 2em;
  	display: -webkit-box;      /* OLD - iOS 6-, Safari 3.1-6 */
  	display: -moz-box;         /* OLD - Firefox 19- (buggy but mostly works) */
  	display: -ms-flexbox;      /* TWEENER - IE 10 */
  	display: -webkit-flex;     /* NEW - Chrome */
    display: flex;
	-webkit-flex-flow: row wrap;
	flex-flow: row wrap;
	-webkit-justify-content: space-between;
	justify-content: space-between;
}

@media only screen and (max-width: 820px) {
	.text-image {
		width: 470px;
	}
	#text {
		width: 520px;
	}
	#text-bg-top {
		height: 255px;
	}
	#text-bg-middle {
		height: calc(100% - 255px - 35px);
	}
	#text-bg-bottom {
		height: 35px;
	}
}

@media only screen and (max-width: 700px) {
	.top-panel {
		display: block;
		position: fixed;
		height: 51px;
	}
	.label {
		position: relative;
		top: 0px;
	}
	#glasses {
		background: url("../images/glasses_w.png") no-repeat left top;
	}
	.fill-content {
		margin-top: 50px;
	}
	#text-bg {
/*  		height: calc(100% - var(--preimage-height) - 50px); */
	}
}

@media only screen and (max-width: 530px) {
	.text-image {
		width: 405px;
	}
	#text {
		width: 450px;
	}
	#text-bg-top {
		height: 222px;
	}
	#text-bg-middle {
		height: calc(100% - 222px - 30px);
	}
	#text-bg-bottom {
		height: 30px;
	}
	#text-body {
		margin-left: 40px;
		margin-right: 45px;
	}
}

@media only screen and (max-width: 450px) {
	.text-image {
		width: 278px;
	}
	#text {
		width: 308px;
	}
	#text-bg-top {
		height: 151px;
	}
	#text-bg-middle {
		height: calc(100% - 151px - 25px);
	}
	#text-bg-bottom {
		height: 25px;
	}
	#text-title>* {
		margin: 0px;
	}
	#text-body {
		margin-left: 30px;
		margin-right: 35px;
	}
	#text-body > div.end > div {
		width: 100%;
	}
	#text-body > div.end > div:last-child {
		text-align: right;
	}
}