html{
	font-family: arial;
	height: 100vh;
	background-color: #181818;
    overflow-y: scroll;
}	
body{
	height: 1px; /* Enables min-height for div containing everything */
	min-height: 100vh;
}

#noscript {
	position: fixed;
	top: 0;
	left: 0;
	height: 3em;
	width: 3em;
	animation: color-change 3s infinite;
	color:white;
	z-index: 1;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: 2em;
}
#noscriptmessage {
	display: none;
	position: fixed;
	top: 3em;
	background-color: #181818;
	color: #f4f4f0;
	padding: 1em;
	border-radius: 1em;
	box-shadow: 0em 0em 1em;
	text-align: center;
}
#noscript:hover #noscriptmessage{
	display: block;
}

@keyframes color-change {
	0%{ background-color: red; }
	33%{ background-color: green; }
	66%{ background-color: blue; }
	100%{ background-color: red; }
}

.error-page body{
	background-color: transparent;
}
.everything{
	position: relative;
	min-height: 100%;
	padding-bottom: 2.2em; /* Room for cp */
	box-sizing: border-box; /* Handle 100%+padding */
	background-color: #f4f4f0;
   text-align: center;
}
a, .hidden-button{
	text-decoration: none;
	color:#181818;
	font-weight: bold;
}

a:hover, .hidden-button:hover{
	text-decoration: underline;
}

.hidden{
	display: none;
}

.cp{
	position: absolute;
	width: 100%;
	bottom: 0px;
	text-align: center;
	font-size: .8em;
	padding: .2em;
	box-sizing: border-box;
	color: darkslategrey;
}


h1{
	margin-top: 0px;
	display:inline-block;
}
h2{
   display:inline-block;
}
h3{
   display:inline-block;
}
blockquote {
    border-left: 3px solid grey;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    padding-left: 1em;
}
button{
	cursor: pointer;
}
#mainMenuSpacer{
	height: 3.4em;
}

#mainMenu{
	position: fixed;
	z-index: 1;
	font-size: 1.3em;
	font-variant: small-caps;
   -webkit-user-select: none;
   -ms-user-select: none;
	user-select: none;
	width:100%;
	background-color: #181818;
	color: #f4f4f0;
	box-shadow: 0em 0.25em 0.25em;
   text-align: center;
   overflow: hidden;
}
#mainMenu.expanded{
	max-height:100vh;
	overflow-y: auto;
}


.menuChild{
	-webkit-transition: background-color 2s ease-out,  color 2s ease-out; /* Safari */
	transition: background-color 2s ease-out,  color 2s ease-out;
	background-color: #181818;
	display:inline-block;
	padding: 0.6em 0.8em 0.6em 2.1em;
	border-radius: 1.2em;
	border-bottom-right-radius:0;
	border-bottom-left-radius:0;
	text-decoration: none;
	background-size: 32px;
	background-repeat: no-repeat;
	background-position: 0.4em;
	color: #f4f4f0;
	font-weight: normal;
   text-align: left;
}
.menuChildWrapper{
	display:inline-block;
	background: linear-gradient(to bottom, #181818 0%,#181818 50%,#181818 50%,#f4f4f0 50%,#f4f4f0 100%);
}

#mainMenu-dummy-start .menuChild:hover, #mainMenu-dummy-end .menuChild:hover {
	 background: #181818;
	border-radius: 0;
}


#mainMenu-dummy-start .menuChild {
	 padding-right: 1.2em;
	padding-left: 0;
	 border-top-left-radius: 0;
	 border-bottom-left-radius: 0;
}
#mainMenu-dummy-end .menuChild {
	 padding-right: 0;
	padding-left: 1.2em;
	 border-top-right-radius: 0;
	 border-bottom-right-radius: 0;
}

#mainMenu-expand{
	float: right;
	border-radius: 0;
	display: none;
}
#mainMenu-expand .menuChild{
	border-radius: 0;
	cursor: pointer;
	background-image: url(/img/pageicons/expand-64px.webp);
}
.menuChild:hover{
	background-color: #f4f4f0;
	color: #181818;
	text-decoration: none;
}

.menuChildWrapper.here .menuChild{
	background-color: #f4f4f0;
	color: #181818;
	text-decoration: underline;
}

.menuChildWrapper.before .menuChild, #mainMenu-dummy-start.before .menuChild:hover{
	border-bottom-right-radius: 1.2em;
}

.menuChildWrapper.after .menuChild, #mainMenu-dummy-end.after .menuChild:hover{
	border-bottom-left-radius: 1.2em;
}

.content{
	padding: 0em 1.2em;
   text-align: left;
}
.content.inlinecontent{
   padding: 0px;
   display: inline-block;
   max-width: 100%;
}

.content-item{
	 background: lightgrey;
	 max-width: 900px;
	 border-radius: 1em;
	 padding: 1em;
	 margin-top: 1em;
	 box-sizing: border-box;
	 box-shadow: 0.5em 0.5em 2em;
    margin-left: auto;
    margin-right: auto;
}
.content-item-wrapper{
   padding: 0em 1.2em;
}

.content-img{
	float: right;
	margin-left: 1em;
	margin-bottom: 1em;
	height: 96px;
	width: 96px;
	transition: scale 0.5s;
}
.content-img:hover{
	scale: 1.1;
}

#image-viewer{
	bottom: 0px;
	right: 0px;
	left: 0px;
	display: flex;
	flex-wrap: wrap;
	outline: none;
}

.image-panel{
	width: 250px;
	height: 210px;
	display:inline-block;
	 position: relative;
	flex: 1 0 auto;
	outline: none;
	cursor: pointer;
}

.image-panel .image-image{
	transition: max-width .2s, max-height .2s;
	box-shadow: 0.5em 0.5em 2em;
}
.image-panel:hover .image-image{
	 max-height: 99%;  
	 max-width: 99%;
}

.fullscreen-viewer:hover .image-image{
	 max-height: 95%;  
	 max-width: 95%;
}
.fullscreen-viewer .image-image:hover{
	 max-height: 100%;  
	 max-width: 100%;
}

.fullscreen-viewer{
	position: fixed;
	visibility: hidden; 
	top: -220px;
	left: 50%;
	margin: -125px;
	transition: top 1s, left 1s, width 1s, height 1s;
}

.fullscreen-viewer .image-image{
	cursor: default;
	max-height: 100%;  
	max-width: 100%;
	box-shadow: none;
}

.fullscreen-viewer.fullscreen{
	width: 100%;
	height: 100%;
	top: 0px;
	left: 0px;
	position: fixed;
	background-color: #181818;
	visibility: visible; 
	margin: 0px;
}
.fullscreen-viewer.fullscreen.fullscreen-next{
	left: 100%;
	z-index: 0;
}
.fullscreen-viewer.fullscreen.fullscreen-prev{
	left: -100%;
	z-index: 0;
}

.image-image{
	 max-height: 95%;  
	 max-width: 95%; 
	 width: auto;
	 height: auto;
	 position: absolute;  
	 top: 0;  
	 bottom: 0;  
	 left: 0;  
	 right: 0;  
	 margin: auto;
}

body{
	margin: 0;
}

form{
	position: relative;
	max-width: 100%;
	width: 500px;
}

.form-row{
	height: 25px;
	line-height: 25px;
	margin-bottom: 5px;
	padding-left:1.2em;
}

/* Join the chat form */
.form-row-aoeii{
    margin-top: -7px;
    margin-bottom: 6px;
}
.form-row-aoeii .form-input{
	border-top-left-radius: 0px;
	border-top-right-radius: 0px;
}
#chatlog{
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
	border-bottom-left-radius: 0px;
	border-bottom-right-radius: 0px;
}

.form-row-tall{
	height: 200px;
}

.form-input-span {
	 display: inline-block;
	 position: absolute;
	 left: 160px;
	 right: 1.2em;
}
.form-input-span-wide{
	left: 1.2em;
}

.form-input-span-wide .form-input{
	max-width: 100%;
}

	
.form-input:focus
/*, .form-input:hover*/{
	background-color: #f4f4f0;
	color: #181818;
}
/* Same again but handles webkit autofill nonsense */
.form-input:-webkit-autofill:focus
/*,.form-input:-webkit-autofill:hover*/
{
	-webkit-text-fill-color: #181818;
	 -webkit-box-shadow: 0 0 0px 1000px #f4f4f0 inset;
}

.form-input{
	max-width: 250px;
	width:100%;
	height: 25px;
	outline: none;
	background-color: #181818;
	color: #f4f4f0;
	box-sizing: border-box;
	padding: 6px;
	border: solid 1px #181818;
	border-radius:5px;
}
.form-input-check{
	width: 25px;
	margin: 0px;
}

/* Same again but handles webkit autofill nonsense */
.form-input:-webkit-autofill{
	-webkit-text-fill-color: #f4f4f0;
	 -webkit-box-shadow: 0 0 0px 1000px #181818 inset;
}

.form-textarea{
	width: 100%;
	max-width: 100%;
	height: 200px;
	resize: none;
	border-radius: 5px;
}

.form-submit{
	cursor: pointer;
	padding: 0;
	border-radius: 13px;
}

.form-message{
	padding:1.2em;
	max-width:500px;
	box-sizing: border-box;
}

@media only screen and (max-width: 380px) {
   .form-row.form-row-input-pair{
      height: 50px;
   }
   .form-row-input-pair .form-input-span{
      display: block;
      left: 1.2em;
   }
   .form-row-input-pair .form-input{
      max-width: 100%
   }
}

.error{
	color: red;
	font-weight: bold;
	text-decoration: underline;
}

/* Error Page */

.error-page .everything{ 
  background: url(/img/fullsize/stranger-things.webp) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

.message {
	 position: fixed;
	 top: 60%;
	 left: 50%;
	 transform: translate(-50%, -50%);
	 padding: 1em;
	 border-radius: 2em;
	 background-color: rgba(255,255,255,.8);
	 font-size: 1.3em;
	 width: 80%;
	 max-width: 700px;
    text-align: left;
}

.credit {
	 position: fixed;
	 bottom: 0px;
	 right: 0px;
	 color: grey;
	padding: 1.2em;
	font-size: 0.8em;
}

.credit a {
	 color: grey;
}

#secret{
	box-sizing: border-box;
	border: none;
	 max-width: 100%;
	 max-height: 100%;
	 width: 650px;
	 height: 450px;
}

.hidden-form{
	display: inline;
}
.hidden-button{
	display: inline;
	padding:0px;
	margin:0px;
	border:0px;
	background:none;
	cursor: pointer;
	font-size:1em;
	font-family:arial;

}

tr:nth-child(even) {
	background-color: #f5f5f5;
}
tr:nth-child(odd) {
	background-color: #e5e5e5;
}
table{
	border-collapse: collapse;
}
td,th{
	border: 1px solid #181818;
	padding: 1px 5px;
}
tr:hover{
	background-color: #eef;

}

/*Fields are black so make placeholder pale*/
::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
	color: #f4f4f0;
	opacity: 1; /* Firefox */
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
	color: #f4f4f0;
}

::-ms-input-placeholder { /* Microsoft Edge */
	color: #f4f4f0;
}

/* width */
::-webkit-scrollbar {
	width: 10px;
}


/* Track */
::-webkit-scrollbar-track {
	background: #f4f4f0;
	border-radius: 5px;
}
 
/* Handle */
::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 5px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
	background: #555; 
}

.sound-button {
	width: 42px;
	height: 42px;
	margin: 2px;
	border-radius: 21px;
}
#soundbuttons {
	padding-top: 0px;
	padding-bottom: 0px;
	margin-bottom: -1px;
	display: none;
}
#playbackrate {
	padding: 2px;
	width: auto;
	text-align: center;
}
.ie .form-row-paybackrate{
	display: none;
}

#chatlog:focus {
	color: #f4f4f0;
	background-color: #181818;
}

#errorreport{
	float: right;
}

.clearboth{
	clear: both;
}
.in-page-anchor {
	display: block;
	top: -3.4em; /* Matches #mainMenuSpacer*/
	position: relative;
}

.mboverlay{
	position: fixed;
	width: 100%;
	height: 100%;
	background-color: rgba(0,0,0,0.5);
	top: 0px;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1;
}

.mbwindow{
	width: 25em;
	max-width: 75%;
	background-color: #181818;
	color: #f4f4f0;
	padding: 1em;
	border-radius: 1em;
	box-shadow: 0em 0em 1em;
	text-align: center;
	white-space: pre-wrap;
}
.mbinput, .mbError{
	margin: 1em auto;
	display: block;
}

.mbButton{
	margin: 0em 0.5em 0em 0.5em;
	padding: 0.5em 1em;
}

#batterydiv{
	text-align:center;
	visibility: hidden;
}
#battery{
	width: 100%;
	max-width: 500px;
	margin-top: 1em;
	margin-bottom: 1em;
}
#battery{
	width: 100%;
	max-width: 500px;
	margin-top: 1em;
	margin-bottom: 1em;
}
#batterydiv.enabled{
	visibility: visible;
}
#batterydiv.unsupported{
	visibility: visible;
}
#batterydiv.unsupported #batterylevel {
	visibility: hidden;
}
#batterydiv.unsupported #batterycharging {
	visibility: hidden;
}
#batterydiv.unsupported #batterytime {
	visibility: hidden;
}
.codeinline{
	font-family: monospace;
	white-space: pre-wrap;
	-webkit-user-select: all;
	-ms-user-select: all;
	user-select: all;
}
.codeblock{
	font-family: monospace;
	white-space: pre;
	-webkit-user-select: all;
	-ms-user-select: all;
	user-select: all;
	overflow: auto;
	border: 1px solid silver;
	padding: 1em;
	background-color: #ddddcc;
}

#floatingcoffee{
    position: fixed;
    width: 12.4em;
	z-index: 1;
	overflow: hidden;
	background: lightgrey;
    border-top-right-radius: 1em;
    border-bottom-right-radius: 1em;
    box-sizing: border-box;
    box-shadow: 0.1em 0.1em 0.1em;

	transition: left 0.5s, height 0.5s, top 0.5s;

	left: -10.2em; /* -floatingcoffeetext */
	top: 3.4em;
	height: 3.6em;
}
#floatingcoffeeicon{
	position: absolute;
	right: 0px;
	height: 100%;
	background-image: url(/img/ko-fi.webp);
	background-repeat: no-repeat;
	background-position: center;

	transition: background-size 0.5s, width 0.5s;
	
	background-size: 2em;
	width: 2.4em;
}
#floatingcoffeeiconlink{
	visibility: hidden;
	display: block;
	height: 100%;
	width: 100%;
}
#floatingcoffeetext{
    float: left;
	width: 10em;

	transition: font-size 0.5s;

	font-size: 1em;
}
@media only screen and (max-width: 980px) {
	#floatingcoffee{
		top: 4.2em; /* 3.4 + (3.6/2) */
		left: -11.2em; /* -floatingcoffeetext */
		height: 1.2em;
	}
	#floatingcoffeeicon{
		background-size: 1em;
		width: 1.2em;
	}
	#floatingcoffeetext{
		font-size: 0.3em;
	}
}


#floatingcoffee:hover{
	top: 3.4em;
	left: 0em;
	height: 3.6em;
}
#floatingcoffee:hover #floatingcoffeeicon{
	background-size: 2em;
	width: 2.4em;
}
#floatingcoffee:hover #floatingcoffeetext{
	font-size: 1em;
}

#floatingcoffee:hover #floatingcoffeeiconlink{
	visibility: visible;
}
#floatingcoffee:hover a{
	text-decoration: underline;
}

/* Editor stuff */
#editor{
	height: calc(100vh - 7em);
    margin: 0 4em;
    text-align: left;
    font-family: monospace;
    white-space: pre;
    background-color: lightyellow;
    box-shadow: 0.5em 0.5em 2em;
    padding: 1em;
	box-sizing: border-box;
	overflow: auto;
}
#editor.fullscreen{
	height:100%;
	width:100%;
	position: fixed;
	top: 0px;
	left: 0px;
}

.line{
	height: 1.2em;
}

/* Various ways to format content editable to insert 
 * this stuff. Just ignore with styling
 */
#editor u{
	text-decoration: none;
}
#editor b{
	font-weight: normal;
}
#editor i{
	font-style: normal;
}

/* END Editor stuff */

/* START Book stuff */
.book{
	text-align: center;
}
#bookviewer{
	text-align: justify;
	min-height: 100vh;
	background-color: #181818;
	color: #ccc;
	font-family:"Helvetica Neue",sans-serif;
    padding: 8px;
    box-sizing: border-box;
	display: none;
	h2{
		display:block;
		margin: 0px;
	}
}
.showbookviewer{
	overflow: auto;
	#bookviewer{
		display: inline-block;
	}
	.everything{
		display: none;
	}
}
#booksettings{
    display: inline-block;
    width: 100%;
    max-width: 200px;
	pointer-events: auto;
}
#booksettingswrapper{
	position: fixed;
	width:100%;
    top: -150px;
	transition: top .5s;
	width:100%;
	text-align:center;
	pointer-events: none;
}
#booksettingsprev,
#booksettingsnext{
	position:fixed;
	top: 0px;
	width: 92px;
	height: 100%;
	transition: left .5s, right .5s;
    background-repeat: no-repeat;
    background-position: center;
	cursor: pointer;
	background-color: rgba(255, 255, 255, 0.15);
}
#booksettingsprev:hover,
#booksettingsnext:hover{
	background-color: rgba(255, 255, 255, .25);
}
#booksettingsprev{
	left: -92px;
}
#booksettingsnext{
	right: -92px;
}
.bookui{
	#booksettingswrapper{
		top: 10px;
	}
	#booksettingsprev{
		left: 0px;
	}
	#booksettingsnext{
		right: 0px;
	}
}
#booksettingshide, #chapterselect, #booksettingsexit{
	display: block;
	width:100%;
	padding: 10px 0px;
	text-align: center;
}
#booknextchapter, #bookprevchapter {
    background-repeat: no-repeat;
    display: inline-block;
	width: 50%;
	box-sizing: border-box;
	cursor: pointer;
	padding: 10px 0px;
    overflow: hidden;
	text-overflow: ellipsis;
}
#booknextchapter:hover, #bookprevchapter:hover {
	background-color: rgba(255, 255, 255, 0.1);
}
#bookprevchapter{
	background-position: left 10px center;
    text-align: left;
    padding-left: 50px;
}
#booknextchapter{
    background-position: right 10px center;
    text-align: right;
    padding-right: 50px;
}

#montyhall{
	width:100%;
}
.mh-doorset{
	text-align: center;
    max-width: 800px;
    margin: auto;
    margin-top: 1em;
}
#mh-simulate{
	width: 50px;
}
/* The details have a variable number of lines 
 * but we don't want it to affect the height of 
 * the page, so we give a min-height that is
 * responsive to the page width 
 */
#mh-details{
	text-align: center;
	min-height: 55px;
}
@media only screen and (max-width: 865px){
	#mh-details{
		min-height: 70px;
	}
}
@media only screen and (max-width: 475px){
	#mh-details{
		min-height:90px;
	}
}
.door-frame{
	height: 200px;
    width: 120px;
	box-sizing: border-box;
	border: 5px solid saddlebrown;
	border-bottom: none;
	display:inline-block;
	cursor:pointer;
	vertical-align: middle;
	margin: 1em;
	background-position: center;
	background-repeat: no-repeat;
	background-size: 96px;
	background-image:url(/img/pageicons/transparent-16px.webp);
}
.door{
	height: 100%;
	width: 110px; /*door frame - 5*2*/
	background-color: burlywood;
	position: relative;
	transition: width 1s;
	.door-content{
		position: relative;
		top: 60px;
	}
	.door-content::after{
		content:attr(data-name);
	}
}
.door-handle{
	position: absolute;
	right:10px;
	top:100px;
	background-color: gold;
	border: 1px solid black;
	border-radius: 15px;
	width: 15px;
	height:15px;
	transition: right 1s;
}
.door:hover{
	width: 105px; /*door frame - 5*2 - 5*/
}
/* Opened doors*/
.door-frame.goat,
.door-frame.cash{
	cursor: default;
	.door{
		width: 5px;
	}
	.door-content{
		display: none;
	}
	.door-handle{
		right:5px;
	}
}
.door-frame.goat{
	background-image: url(/img/pageicons/montyhall-192px.webp);
}
.door-frame.cash{
	background-image: url(/img/pageicons/cash-192px.webp);
}
.door-frame.selected{
    box-shadow: 0px 0px 5px 5px green;
}

/* Responsive design stuff */
@media only screen and (max-width: 1485px) {
	#mainMenu-kilojools .menuText{
		display: inline;
	}
	#mainMenu-kilojools{
		padding-left: 2.1em;
		background-position-x: 0.4em;
	}
	.menuText {
		display: none;
	}
	.menuChild{
		padding-left: 1.5em;
		background-position-x: center;
	}
	#mainMenu-expand{
		display: inline-block;
	}
	#mainMenu.expanded #mainMenu-dummy-start, #mainMenu.expanded #mainMenu-dummy-end{
		display:none;
	}
	#mainMenu.expanded .menuChildWrapper {
		display: block;
		background: #181818;
	}
	#mainMenu.expanded .menuText {
		display: inline;
	}
	#mainMenu.expanded .menuChild{
		padding-left: 2.1em;
		width:100%;
		border-radius: 0;
		background-position-x: 0.4em;
	}
	#mainMenu.expanded #mainMenu-expand {
		position: absolute;
		right: 0px;
		transform: rotate(180deg);
	}
	#mainMenu.expanded #mainMenu-expand .menuChild {
		padding-left: 1.5em;
		width: 0px;
	}
	#mainMenu-dummy-start{
		margin-left: -1.2em
	}
	#mainMenu-dummy-end{
		margin-right: -1.2em
	}
}
@media only screen and (max-width: 700px) {
	#mainMenu-kilojools .menuText{
		display: none;
	}
	#mainMenu-kilojools{
		padding-left: 1.5em;
		background-position-x: center;
	}
	::-webkit-scrollbar {
		width: 2px;;
	}
}
@media only screen and (max-width: 580px) {
	#menuChildWrapper-main{
		display: inline-block;
	}
	#mainMenu-kilojools{
		padding-left: 2.1em;
		background-position-x: 0.4em;
	}
	#mainMenu-kilojools .menuText{
		display: inline;
	}
	.menuChildWrapper{
		display: none;
	}  
   .menuChildWrapper.before .menuChild, #mainMenu-dummy-start.before .menuChild:hover{
      border-bottom-right-radius: 0px;
   }
}
@media only screen and (max-width: 225px) {
	#menuChildWrapper-main{
		display: inline-block;
	}
	#mainMenu-kilojools{
		padding-left: 1.5em;
		background-position-x: center;
	}
	#mainMenu-kilojools .menuText{
		display: none;
	}
}

.instruction{
	margin-bottom: 1em;
}
.recipes, .ingredients, .notes, .instructions {
    padding-inline-start: 2em;
}
.ingredients, .notes, .instructions{
	margin: 0px;
}

.slideshow, .noslideshow {
	position: relative;
	height: 300px;
	width: 230px;
	overflow: hidden;
	border-radius: 12px;
	float: right;
	margin-left: 1em;
}
.slideshow.landscape, .noslideshow.landscape {
	width: 300px;
	height: 230px;
}
@media only screen and (max-width: 550px) {
	/* -2em counters padding-inline-start */
	.slideshow, .noslideshow, .slideshow.landscape, .noslideshow.landscape {
		float: none;
		width: calc( 100% + 2em );
		margin-left: -2em;
	}
}

.slideshow img, .noslideshow img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: contain;
object-position: top;
}
.slideshow img {
opacity: 0;
animation: fade 8s infinite ease-in-out;
}
  
/* second image starts halfway through */
.slideshow img:nth-child(2) {
animation-delay: 4s;
}

@keyframes fade {
0%   { opacity: 0; }
10%  { opacity: 1; }  /* fade in */
50%  { opacity: 1; }  /* stay visible */
60%  { opacity: 0; }  /* fade out */
100% { opacity: 0; }
}