* {
	box-sizing: border-box;
}

:root {
	--game-width: 896px;
	--game-height: 576px;
	--inventory-width: 200px;

	--accent: #692A03;
}

body {
	width: 100vw;
	height: 100vh;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Coders Crux', 'Micro 5';
	font-size: 1.5em;
	line-height: 0.8;
	background: url(bgs/gamebg.png);
}

#workingOn {
	display: block!important;
}

#workingOn div {
	display: flex!important;
}

h1, h2, h3, h4, h5 {
	font-family: 'Jacquard 12';
}

h2 {
	font-weight: 300;
	margin-bottom: 0;
}

button {
	color: inherit;
   font-family: inherit;
   text-transform: uppercase;
   font-size: inherit;
   margin: 10px auto;
   background: var(--mid-accent);
   border-radius: 1px;
   padding: 3px 6px;
   display: block;
   cursor: pointer;
   transition: 100ms ease;
   padding: 8px 10px 6px;
   border-radius: 6px;
   position: relative;
}

button:not(.game-button):hover, button:not(.game-button):focus, button.focus {
	margin: 12px auto 8px;
	background: var(--bright-accent);
}

#game-wrapper {
	display: flex;
	position: relative;
	width: calc(var(--game-width) + var(--inventory-width) );
}

#page-back {
	margin: 30px;
	display: block;
	position: absolute;
	left: 0;
	top: 0;
	opacity: 0.6;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	text-transform: uppercase;
	transition: 200ms ease all;
}

#page-back:hover, #page-back:focus {
	opacity:1;
}

/********************** Game UI *********************/

/*** Instructional Overlay ***/

#loader {
	position: absolute;
	width: calc(var(--game-width) + var(--inventory-width)) ;
	height: var(--game-height);
	background: var(--black);
	z-index: 1001;
	transition: 200ms ease-out;
	border: 2px solid var(--white);
	display: flex;
   align-items: center;
   justify-content: center;
   flex-direction: column;
}

#wait:before {
	transition: 200ms ease;
   animation: dots 1.8s linear infinite;
   content: '';
 }

@keyframes dots {
    0%, 20% {
      content: '.';
    }
    40% {
      content: '..';
    }
    60% {
      content: '...';
    }
    90%, 100% {
      content: '';
    }
}

#wait.stop:before {
	animation: none;
}

#hidden-load {
	display: block;
	overflow: hidden;
	height: 0;
	width: 0;
	opacity: 0;
}

#load-bar {
	width: 0%;
	height: 100%;
	background: var(--bright-accent);
	transition: 200ms ease;
}

#load-bar-wrap {
	width: 300px;
	height: 20px;
	background: var(--white);
	border-radius: 4px;
	overflow: hidden;
	margin: 10px 10px 5px;
	border: 1px solid var(--mid-accent);
}

#tutorial {
	position: absolute;
	top: 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	left: 0;
	width: var(--game-width);
	height: var(--game-height);
	background: var(--black);
	z-index: 1000;
	text-align: center;
	transition: 200ms ease-out;
	padding: 20px;
}

#tutorial span {
	max-width: 60%;
}

#tutorial-button {
	display: none;
}

.desktop-confirm {
	color:var(--mid-accent);
	margin: 20px;
}

.desktop-confirm button {
	color: var(--white);
}

.game-button {
	background-color: transparent;
	border: none;
	width: 48px;
	height: 48px;
	display: inline-block;
	margin: 2px;
	background-image: url(ui/arrowleft.png);
	background-size: contain;
	user-select: none;
	transition: 200ms ease;
	-webkit-user-select: none;
   -webkit-touch-callout: none;
}

#tutorial .game-button {
	pointer-events: none;
}

.game-button:active {
	filter: brightness(0.6);
	margin: 4px 2px 0;
}

#sprint-button.active {
	filter: brightness(0.6);
	margin: 10px 5px 0 15px;
}

#left-arrow-button {background-image: url(ui/arrowleft.png);}

#right-arrow-button {background-image: url(ui/arrowright.png);}

#up-arrow-button {background-image: url(ui/arrowup.png);}

#down-arrow-button {background-image: url(ui/arrowdown.png);}

#w-button {background-image: url(ui/w.png);}

#a-button {background-image: url(ui/a.png);}

#s-button {background-image: url(ui/s.png);}

#d-button {background-image: url(ui/d.png);}

#q-button {background-image: url(ui/q.png);}

#menu-button {
	background-image: url(ui/menu.png);
   width: 30px;
   height: 30px;
   margin: 10px;
   flex: 0 0 auto;
   display: none;
}

#inventory-arrows, #menu-button {
	display: none;
}

.touch-only #menu-button, .touch-only #inventory.open #inventory-arrows {
	display: flex;
}

#inventory.open #inventory-arrows, #inventory.open #menu-button {
	position: absolute;
}

#inventory.open #menu-button {
   right: 12.5px;
   top: 30px;
}

#inventory.open #inventory-arrows {
   bottom: 50px;
   right: 50px;
}

#shift-button {
	margin: 10px;
	width: 96px;
	background-image: url(ui/shift.png);
}

#space-button {
	margin: 10px;
	width: 96px;
	background-image: url(ui/space.png);
}

#tutorial #shift-button, #tutorial #space-button {
	margin-right: 40px;
}

#health {
	opacity: 0;
	transition: 400ms ease 200ms;
	position: absolute;
   right: var(--inventory-width);
   top: 0;
   margin: 10px;
   height: 20px;
   width: 62px;
   background-image: url(ui/healthbar.png);
   background-size: contain;
   z-index: 1000;
}

/*** Intro Cutscene **/

#game-container > div.cutscene, #game-container > div#endcard {
	width: var(--game-width);
   height: var(--game-height);
   left: 0;
   top: 0;
	z-index: 1001;
   position: absolute;
   background: black;
   transition: 400ms ease;
}

#game-container > div.cutscene.playing {
	display: flex;
}

.skip {
	position: absolute;
	right: 0;
	bottom: 0;
	opacity: 0;
	margin: 15px 20px;
	transition: 200ms ease;
}

.slide {
	opacity: 0;
	transition: 200ms ease, background-position 10400ms linear;
	display: none;
	width: var(--game-width);
	height: var(--game-height);
	background-size: calc(var(--game-width) + 2vw) auto;
	display: flex;
	align-items: center;
   justify-content: center;
   background-position: -2vw center;
   display: none;
}

.slide.static {
	background-position: left center;
}

.slide div {
	margin-top: 50%;
   padding: 100px;
   text-align: center;
   text-shadow: -1px -1px 0 #000, 0 -1px 0 #000, 1px -1px 0 #000, 1px 0 0 #000, 1px 1px 0 #000, 0 1px 0 #000, -1px 1px 0 #000, -1px 0 0 #000;
}

.slide.s1 {
	background-image: url(bgs/slide1.png);
}

.slide.s2 {
	background-image: url(bgs/slide2.png);
}

.slide.s3 {
	background-image: url(bgs/slide3.png);
}

.slide.s4 {
	background-image: url(bgs/slide4.png);
}

.slide.s5 {
	background-image: url(bgs/slide5.png);
}

.slide.s6 {
	background-image: url(bgs/slide6.png);
}

.slide.s7 {
	background-image: url(bgs/slide7.png);
}

.slide.s8 {
	background-image: url(bgs/slide8.png);
}

.slide.s9 {
	background-image: url(bgs/slide9.png);
}

.slide.s10 {
	background-image: url(bgs/slide10.png);
}

/** Credits & Endcard**/

#credits .slide {
	flex-direction: column;
}

#credits .slide div, #credits .slide h3 {
	margin: 10px;
	padding: 0;
	font-family: inherit;
}

#endcard {
	flex-direction: column;
	align-items: center;
   justify-content: center;
}

#endcard button {
	margin: 16px;
}

/*** Blackout Div ***/

#game-container > div#blackout {
	width: var(--game-width);
   height: var(--game-height);
   left: 0;
   top: 0;
   background: black;
   z-index: 1000;
   position: absolute;
   display: flex;
   align-items: center;
   justify-content: center;
   pointer-events: none;
   transition: 400ms ease;
   opacity: 0;
}

/*** Mobile Controller ***/

#mobile-controls {
	position: absolute;
	right: 0;
	bottom: -5px;
	padding: 10px;
	display: none;
	align-items: center;
   justify-content: center;
   z-index: 999;
   opacity: 0;
   transition: 200ms ease;
}

#sprint-button {
	margin: 5px 5px 5px 15px;
	width: 96px;
	background-image: url(ui/sprint.png);
}

#interact-button {
	margin: 5px 5px 5px 15px;
	width: 96px;
	background-image: url(ui/interact.png);
}

/** touch only stuff **/

.touch-show {
	display: none;
}

body.touch-only #mobile-controls.open {
	opacity: 1;
	display: flex;
}

body.touch-only #tutorial-button, body.touch-only .menu-button.example {
	display: block;
}

body.touch-only .desktop-confirm {
	display: none;
}

body.touch-only .touch-hide {
	display: none;
}

body.touch-only .touch-show {
	display: flex;
}

body.touch-only #shift-button {
	background-image: url(ui/sprint.png);
}

body.touch-only #space-button {
	background-image: url(ui/interact.png);
}

/*** Inventory ***/

#inventory {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	justify-content: center;
	height: var(--game-height);
	width: var(--inventory-width);
	background: red;
	margin: 0;
	padding: 20px;
	background: var(--dark-grey);
	border: 2px solid var(--light-accent);
	transition: 200ms ease all, 0ms ease z-index;
	position: absolute;
   right: 0;
   overflow: hidden;
   z-index: 998;
}

#inventory li#item-viewer {
	background-image: none;
	display: none;
	text-align: center;
}

#item-viewer img {
	width: 150px;
	margin: 20px auto;
}

#inventory .description {
	padding: 20px;
}

#item-viewer span {
	display: none;
}

#item-viewer span.viewing {
	display: flex;
	flex-direction: column;
}

#inventory.open {
	width: 100%;
	z-index: 1000;
}

#inventory.open li#item-viewer {
	display: flex;
	width: 100%;
	height: 340px;
	order: -1;
}

#inventory li {
	list-style: none;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	width: 60px;
	height: 60px;
	margin: 6px;
	border: 2px solid var(--accent);
   padding: 4px;
   border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--black);
	background-color: var(--white);
	transition: 200ms ease;
	position: relative;
}

#inventory.open li {
	width: 100px;
	height: 100px;
	margin: 6px 12px;
}

#inventory li.collected {
	order: -1;
}

#inventory li span {
	min-height: 60px;
	min-width: 100%;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
	background-image: url(ui/questionmark.png);
}

#inventory li#item-viewer span {
	background-image: none;
}

#inventory li#item-viewer span#Default {
	display: block;
	min-height: 0;
}

#inventory.open li.collected span {
	display: block;
   margin: 20px -20px;
   min-width: 50px;
   min-height: 50px;
}

#inventory.open li.collected.viewing span {
	min-width: 100px;
   min-height: 100px;
}

#inventory.open li.collected.viewing {
	width: 100%;
   height: unset;
   padding: 30px;
}

#inventory.open li.focus:before, #endcard button.focus:before {
	background-image: url(ui/arrow.png);
   content: "";
   width: 12px;
   height: 20px;
   position: absolute;
   left: -20px;
   top: calc(50% - 10px);
   animation: bounceHorizontal 1s infinite 500ms;
   background-size: contain;
}

#inventory li .title {
	font-family: 'Jacquard 12';
   font-size: 1.5em;
}

#inventory h3 {
	font-size: 2.4em;
	margin: 10px;
	width: 100%;
	text-align: center;
	font-weight: 300;
	order: -2;
	display: flex;
	align-items: center;
   justify-content: center;
}

/********************** Dialogue Pop-Up *********************/

.dialogue-popup {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(5px);
	z-index: 999;
}

#Gnash-talking.dialogue-popup {
	background-color: rgb(168 130 130 / 10%);
}

.dialogue-wrap {
	display: flex;
	margin: calc(50% - 40px) auto auto;
	align-items: center;
}

#dialogue-loader {
	padding: 10px;
	display: flex;
   flex-direction: column;
   height: calc(100% - 20px);
}

#dialogue-loader button {
	font-family: 'Coders Crux';
   margin: 10px;
   position: relative;
   padding: 8px 12px 6px;
   background: #bab6b6;
   border: 1px solid var(--accent);
   border-radius: 4px;
   transition: 400ms ease;
   text-transform: none;
}

#dialogue-loader #option-7 button {
   opacity: 0;
}

#dialogue-loader button:not(:first-child) {
	margin-left: 26px;
}

#Gnash-talking #dialogue-loader button {
	background: #801c1c;
   margin: 18px;
}

#dialogue-loader button img {
	width: 50px;
	height: auto;
}

.daisy-button, .hair-button, .feather-button, .bone-button, .drawing-button  {
	display: none;
	height: 70px;
	width: 70px;
}

.option-daisy .daisy-button, .option-hair .hair-button, .option-feather .feather-button, .option-bone .bone-button, .option-drawing .drawing-button  {
	display: block;
}

#dialogue-loader button.active {
	background-color: #ee8484;
}

#Gnash-talking #dialogue-loader button.active {
	background-color: #490808;
}

#dialogue-loader button.active:before {
	background-image: url(ui/arrow.png);
   content: "";
   width: 12px;
   height: 20px;
   position: absolute;
   left: -20px;
   top: calc(50% - 10px);
   animation: bounceHorizontal 1s infinite 500ms;
   filter: invert(1);
   background-size: contain;
}

#Gnash-talking #dialogue-loader button.active:before {
	filter: none;
}

#dialogue-loader .flex-row {
	justify-content: center;
	flex-grow: 1;
}

@keyframes bounceHorizontal { 
	0% { transform: translateX(0);}
	25% { transform: translateX(-5px);}
	50% { transform: translateX(0);}
}

#dialogue-loader:has(button) + #dialogue-arrow {
	display: none;
}

#speech-bubble {
	width: 550px;
	height: 140px;
	background: var(--white);
	color: var(--black);
	padding: 20px;
	border: 2px solid black;
	position: relative;
	margin: 10px;
}

#Gnash-talking #speech-bubble {
	background: var(--black);
	color: var(--white);
	font-family: 'DoubleHomicide';
}

.dialogue-popup {
	flex-direction: column;
}

.dialogue-popup #speech-bubble {
	width: 670px;
}

#speech-bubble h3 {
	margin: 0;
}

#dialogue-arrow {
	position: absolute;
	margin: 5px 10px;
	right: 0;
	bottom: 0;
	animation: bounce 1s infinite 500ms;
	cursor: pointer;
}

@keyframes bounce { 
	0% { transform: translateY(0);}
	25% { transform: translateY(-5px);}
	50% { transform: translateY(0);}
}

#interact-display {
	width: 300px;
	left: calc(50% - 150px);
	top: 60px;
	position: absolute;
}

.dialogue-popup:not(.item-text) #interact-display {
	width: 100%;
	max-width: unset;
	left: 0;
	top: 0;
	position: absolute;
}

.whisper {
	font-size: 90%;
   opacity: 0.6;
}

/********************** Game Container *********************/

#game-container {
	background-image: url(background11.png);
	background-size: cover;
	background-position: top left;
	max-height: 100%;
	max-width: 100%;
	height: var(--game-height);
	width: var(--game-width);
	position: relative;
	overflow:hidden;
	border: 2px solid var(--light-accent);
	aspect-ratio: 896 / 576;
   flex: 0 0 auto;
}

#gradient {
	position: absolute;
   left: 0;
   top: 0;
   height: 100%;
   width: 100%;
   background: linear-gradient(#8972e4, #ffda9f);
   display: block !important;
   z-index: 899;
   mix-blend-mode: soft-light;
   opacity: 0.45;
   transition: 300ms ease;
}

.inForest #gradient {
	background: linear-gradient(#760b39, #9ffffc);
}

#clouds {
	display: none;
}

#game-container:not(.left-3) #clouds {
	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	background-image: url(bgs/clouds.gif);
	background-size: 100%;
	z-index: 999;
	pointer-events: none;
	mix-blend-mode: multiply;
	opacity: 0.25;
	transform: scaleX(-1);
	transition: 300ms ease;
}

#game-container.initial-screen:after,
#game-container.left-1:after,
#game-container.up-1:not(.left-1,.left-2,.left-3,.right-3):after, 
#game-container.right-1:after,
#game-container.right-2:after,
#game-container.right-3:after,
#game-container.down-1:not(.left-2,.left-3):after {
	display: block;
	content:"";
	width: 100%;
	height: 100%;
	position: absolute;
	background-image: url(obstacles/leavesfull.png);
	background-size: 100%;
	z-index: 998;
	pointer-events: none;
}

#screen-display {
	display: flex;
	padding: 10px 20px;
	text-transform: capitalize;
	background: var(--white);
	color: var(--black);
	width: fit-content;
	z-index: 1000;
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0.9;
	border-bottom-right-radius: 4px;
}

#game-container > div {
	display: none;
}

#game-container > div#test-character {
	display: flex;
}

/*** Level 1 ***/
	

/** screen 1 **/
#game-container.left-3.up-1 {background-image: url(bgs/background1.png);}
#game-container.left-3.up-1 > div.left-3.up-1 {display: flex;}

/** screen 2 **/
#game-container.left-2.up-1 {background-image: url(bgs/background2.png);}
#game-container.left-2.up-1 > div.left-2.up-1 {display: flex;}

/** screen 3 **/
#game-container.left-1.up-1 {background-image: url(bgs/background3.png);}
#game-container.left-1.up-1 > div.left-1.up-1 {display: flex;}

/** screen 4 **/
#game-container.up-1 {background-image: url(bgs/background4.png);}
#game-container.up-1:not(.left-1,.left-2,.left-3,.right-1,.right-2,.right-3) > div.up-1:not(.left-1,.left-2,.left-3,.right-1,.right-2,.right-3) {display: flex;}

/** screen 5 **/
#game-container.right-1.up-1 {background-image: url(bgs/background5.png);}
#game-container.right-1.up-1 > div.right-1.up-1 {display: flex;}

/** screen 6 **/
#game-container.right-2.up-1 {background-image: url(bgs/background6.png);}
#game-container.right-2.up-1 > div.right-2.up-1 {display: flex;}

/** screen 7 **/
#game-container.right-3.up-1 {background-image: url(bgs/background7.png);}
#game-container.right-3.up-1 > div.right-3.up-1 {display: flex;}

/** screen 8 **/
#game-container.left-3 {background-image: url(bgs/background8.png);}
#game-container.left-3:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) > div.left-3:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) {display: flex;}

/** screen 9 **/
#game-container.left-2 {background-image: url(bgs/background9.png);}
#game-container.left-2:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) > div.left-2:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) {display: flex;}

/** screen 10 **/
#game-container.left-1 {background-image: url(bgs/background10.png);}
#game-container.left-1:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) > div.left-1:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) {display: flex;}

/** screen 11  || INTITIAL SCREEN **/
#game-container {background-image: url(bgs/background11.png);}
#game-container.initial-screen > div.initial-screen {display: flex;}

/** screen 12 **/
#game-container.right-1 {background-image: url(bgs/background12.png);}
#game-container.right-1:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) > div.right-1:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) {display: flex;}

/** screen 13 **/
#game-container.right-2 {background-image: url(bgs/background13.png);}
#game-container.right-2:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) > div.right-2:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) {display: flex;}

/** screen 14 **/
#game-container.right-3 {background-image: url(bgs/background14.png);}
#game-container.right-3:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) > div.right-3:not(.up-1,.up-2,.up-3,.down-1,.down-2,.down-3) {display: flex;}

/** screen 15 **/
#game-container.left-3.down-1 {background-image: url(bgs/background15.png);}
#game-container.left-3.down-1 > div.left-3.down-1 {display: flex;}

/** screen 16 **/
#game-container.left-2.down-1 {background-image: url(bgs/background16.png);}
#game-container.left-2.down-1 > div.left-2.down-1 {display: flex;}

/** screen 17 **/
#game-container.left-1.down-1 {background-image: url(bgs/background17.png);}
#game-container.left-1.down-1 > div.left-1.down-1 {display: flex;}

/** screen 18 **/
#game-container.down-1 {background-image: url(bgs/background18.png);}
#game-container.down-1:not(.left-1,.left-2,.left-3,.right-1,.right-2,.right-3) > div.down-1:not(.left-1,.left-2,.left-3,.right-1,.right-2,.right-3) {display: flex;}

/** screen 19 **/
#game-container.right-1.down-1 {background-image: url(bgs/background19.png);}
#game-container.right-1.down-1 > div.right-1.down-1 {display: flex;}

/** screen 20 **/
#game-container.right-2.down-1 {background-image: url(bgs/background20.png);}
#game-container.right-2.down-1 > div.right-2.down-1 {display: flex;}

/** screen 21 **/
#game-container.right-3.down-1 {background-image: url(bgs/background21.png);}
#game-container.right-3.down-1 > div.right-3.down-1 {display: flex;}

/********************** /Game Container *********************/

/************************* Character ************************/

#test-character {
	height: 88px;
	width: 88px;
	position: absolute;
	left: 0;
	top: 0;
	transition: 100ms ease, transform 400ms ease, filter 1s ease ;
}

#test-character:after {
	height: 98px;
	width: 128px;
	content:"";
	position: absolute;
	left: 0;
	bottom: 0;
	background-position: left center;
	background-image: url(charactersprites/standleft.png);
	background-repeat: no-repeat;
	background-size: contain;
}

/** this allows for finer control for some interactions **/
#nose {
	display: block;
	position: relative;
   top: 4px;
   right: 2px;
   height: 50%;
   width: 30px;
}

#test-character.moving:after {
	background-image: url(charactersprites/walkleft.png);
	background-size: contain;
	background-repeat: no-repeat;
}

#test-character.moving.sprint:after {
	background-image: url(charactersprites/lopeleft.png);
	background-size: contain;
	background-repeat: no-repeat;
}

#test-character.face-right {
	transform: scaleX(-1);
}

/************* Obstacles, Decorations, & Objectives *************/

/** General **/

.test-decoration, .obstacle, .objective {
	display: flex;
	align-items: center;
	justify-content: center;
	background-position: center bottom;
	background-size: contain;
	background-repeat: no-repeat;
	position: absolute;
}

@keyframes wiggle {
   0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(0eg); }
  75% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

#forest-entry {
	height: 130px;
   width: 1px;
   position: absolute;
   left: 480px;
   top: 248px;
}

#church-entrance {
	height: 100px;
   width: 298px;
   position: absolute;
   left: 592px;
   top: 188px;
}

/**** Obstacles ****/

.obstacle {
	height: 108px;
	width: 108px;
	margin: -16px 0 0;
	z-index: 1;
}

/** water **/
.water {
	 margin: 0;
	 position: absolute;
	 background-image: url(water.gif);
    left: 0;
    top: 0;
    background-size: 64px;
    width: 100%;
    height: 100%;
}

.water.left-1.down-1 {
	top: 1px;
	mask: url(obstacles/watermask17.png);
   mask-repeat: no-repeat;
   mask-size: 100% 100%;
}

.water.down-1:not(.right-1):not(.left-1):not(.right-2) {
	top: 1px;
	mask: url(obstacles/watermask18.png);
	mask-repeat: no-repeat;
   mask-size: 100% 100%;
}

.water.right-1.down-1 {
	top: 1px;
	mask: url(obstacles/watermask19.png);
   mask-repeat: no-repeat;
   mask-size: 100% 100%;
}

.water.right-2.down-1 {
	top: 1px;
	mask: url(obstacles/watermask20.png);
   mask-repeat: no-repeat;
   mask-size: 100% 100%;
}

.waterBlock {
	z-index: 1!important;
}

/** fence style; obstacles with a solid base but open top/bottom have the fence class **/
.obstacle.fence {
	background-color: transparent;
	height: 48px;
	margin-top: 64px;
}

.obstacle.fence.grass:after {
	content: "";
   background: url(obstacles/grass.png);
   background-size: 54px auto;
   height: 26px;
   width: 100%;
   bottom: 11px;
   position: relative;
}

.obstacle.fence.tree:after {
	left: 25%;
	bottom: 0;
}

/** flip each odd number tree, for variation **/
.tree:nth-child(odd), .churchpew:nth-child(odd)  {
	transform: scaleX(-1);
}

.churchpew.bible:nth-child(odd) div:after  {
	transform: scaleX(-1);
}

/** default fence **/
.obstacle.fence div {
	background-size: contain;
	background-image: url(obstacles/fence.png);
	height: 96px;
	width: 100%;
	position: absolute;
	bottom: 24px;
}

/** vertical fence **/
.obstacle.fencevertical {
	background-color: transparent;
	height: 108px;
	width: 32px;
	position: absolute;
}

.obstacle.fencevertical div {
	height: calc(100% + 92px);
	width: 32px;
	background-image: url(obstacles/fencevertical.png);
	background-position: 16px 0;
	background-repeat: repeat-y;
	background-size: 10px auto;
	position: absolute;
	top: -36px;
}

/** wooden fence **/
.obstacle.woodenfence {
	width: 234px;
	height: 40px;
}

.obstacle.woodenfence div {
	background-size: contain;
	background-image: url(obstacles/fencewood.png);
	background-position: 72px;
	height: 56px;
	width: 100%;
	position: absolute;
	bottom: 24px;
}

/** tombstone **/
.obstacle.fence.tombstone {
	height: 34px;
	width: 16px;
	margin-top: 54px;
}

.obstacle.fence.tombstone div {
	background-size: contain;
	background-image: url(obstacles/tombstone1.png);
	height: 60px;
	width: 16px;
	position: absolute;
	bottom: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	bottom: 8px;
	margin-top: 80px;
}

.obstacle.fence.tombstone.dirt:before {
	content: "";
	flex: 0 0 74px;
	height: 24px;
	background-image: url(obstacles/dirtpatch.png);
	background-size: contain;
	position: relative;
	top: 25%;
}

.obstacle.fence.t1 div {width: 46px;}
.obstacle.fence.t1 .tombstone-text {bottom: 110%;}
.obstacle.fence.t1 div {height: 58px;background-image: url(obstacles/tombstone1.png);}

.obstacle.fence.t2 div {width: 50px;}
.obstacle.fence.t2 .tombstone-text {bottom: 120%;}
.obstacle.fence.t2 div {height: 66px;background-image: url(obstacles/tombstone2.png);}

.obstacle.fence.t3 div {width: 50px;}
.obstacle.fence.t3 .tombstone-text {bottom: 125%;}
.obstacle.fence.t3 div {height: 56px;background-image: url(obstacles/tombstone3.png);}

.obstacle.fence.t4 div {width: 50px;}
.obstacle.fence.t4 .tombstone-text {bottom: 110%;}
.obstacle.fence.t4 div {height: 72px;background-image: url(obstacles/tombstone4.png);}

.obstacle.fence.t5 div {width: 46px;}
.obstacle.fence.t5 .tombstone-text {bottom: 120%;}
.obstacle.fence.t5 div {height: 64px;background-image: url(obstacles/tombstone5.png);}

.obstacle.fence.t6 div {width: 46px;}
.obstacle.fence.t8 .tombstone-text {bottom: 105%;}
.obstacle.fence.t6 div {height: 70px;background-image: url(obstacles/tombstone6.png);}

.obstacle.fence.t7 div {width: 56px;}
.obstacle.fence.t7 .tombstone-text {bottom: 95%;}
.obstacle.fence.t7 div {height: 82px;background-image: url(obstacles/tombstone7.png);}

.obstacle.fence.t8 div {width: 46px;}
.obstacle.fence.t8 .tombstone-text {bottom: 110%;}
.obstacle.fence.t8 div {height: 64px;background-image: url(obstacles/tombstone8.png);}

.obstacle.fence.t9 div {width: 50px;}
.obstacle.fence.t9 .tombstone-text {bottom: 125%;}
.obstacle.fence.t9 div {height: 56px;background-image: url(obstacles/tombstone9.png);}

.obstacle.fence.t10 div {width: 46px;}
.obstacle.fence.t10 .tombstone-text {bottom: 110%;}
.obstacle.fence.t10 div {height: 58px;background-image: url(obstacles/tombstone10.png);}

.tombstone-text {
	line-height: 0.8;
   opacity: 0;
   position: relative;
   display: block;
   background: black;
   padding: 8px 16px;
   border-radius: 8px;
   transition: 200ms ease opacity;
   text-align: center;
   width: fit-content;
}

.tombstone.active .tombstone-text {
	opacity: 1;
}

.tombstone-text:after {
  content: " ";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}

.tombstone .flower1, .tombstone .flower2, .tombstone .flower3 {
	margin-top: 10px;
}

/** altar **/
.obstacle.fence.altar {
	width: 104px;
}

.obstacle.fence.altar div {
	background-size: contain;
	background-image: url(obstacles/altar.png);
	height: 94px;
	width: 114px;
	position: absolute;
	bottom: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	bottom: 8px;
	right: 0;
	margin-top: 80px;
}

/** pots **/
.obstacle.fence.pot1, .obstacle.fence.pot2  {
	width: 80px;
}

.obstacle.fence.pot1 div {
	background-size: contain;
	background-image: url(obstacles/pot1.png);
	height: 92px;
	width: 80px;
	position: absolute;
	bottom: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	bottom: 8px;
	margin-top: 80px;
}

.obstacle.fence.pot2 div {
	background-size: contain;
	background-image: url(obstacles/pot2.png);
	height: 82px;
	width: 80px;
	position: absolute;
	bottom: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	bottom: 8px;
	margin-top: 80px;
}

/** church deck **/
.churchdeck {
	width: 328px;
	background-size: contain;
	background-image: url(obstacles/churchdeck.png);
	height: 104px;
	position: absolute;
	margin-top: 60px;
}

/** cliff **/
.obstacle.cliff {
	width: 68px;
	background-repeat: repeat-y;
	background-image: url(obstacles/cliff.png);
}

/** tall trunk **/
.obstacle.fence.talltrunk {
	width: 70px;
	margin-left: 54px;
}

.obstacle.fence.talltrunk div {
	background-size: contain;
	background-image: url(obstacles/talltrunk.png);
	background-position: bottom center;
	background-repeat: no-repeat;
	height: 600px;
	width: 154px;
	position: absolute;
	left: -39px;
	bottom: 9px;
}

/** dead pine **/
.obstacle.deadpine, .obstacle.deadpinesm {
	width: 24px;
	margin-top: 70px;
}

.obstacle.deadpine div {
	height: 200px;
	width: 90px;
	background-image: url(obstacles/pinelg.png);
	background-size: contain;
   flex: 0 0 auto;
   left: -26px;
}

.obstacle.deadpinesm div {
	height: 160px;
	width: 58px;
	background-image: url(obstacles/pinesm.png);
	background-size: contain;
   flex: 0 0 auto;
   left: -18px;
}

/** haunted tree 1 **/
.obstacle.fence.hauntedtree1 {
	margin-top: 26px;
	width: 128px;
}

.obstacle.fence.hauntedtree1 div {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background-size: contain;
	background-image: url(obstacles/hauntedtree1.png);
	background-position: bottom center;
	background-repeat: no-repeat;
	height: 372px;
	width: 268px;
	position: absolute;
	left: -30px;
   bottom: -32px;
}

/** haunted tree 2 **/
.obstacle.fence.hauntedtree2 {
	margin-top: 48px;
   width: 126px;
}

.obstacle.fence.hauntedtree2 div {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background-size: contain;
	background-image: url(obstacles/hauntedtree2.png);
	background-position: bottom center;
	background-repeat: no-repeat;
	height: 316px;
	width: 304px;
	position: absolute;
	left: -88px;
   bottom: -4px;
}

/** brambles **/

/** normal version **/
.obstacle.brambles {
	width: 64px;
	height: 64px;
	margin-top: -8px;
}

/** fence version **/
.obstacle.brambles.fence {
	width: 142px;
	margin-top: 64px;
}

.obstacle.brambles:nth-child(odd) div {
	background-image: url(obstacles/brambles2.png);
}

/** border wall **/
.obstacle.brambleswall {
	margin-top: 0;
	width: 81.5px;
	background-repeat: repeat-y;
	background-image: url(obstacles/brambleswall.png);
}

/** border wall horizontal **/
.obstacle.brambleswallhorizontal {
	margin-top: 0;
	height: 81.5px;
	background-repeat: repeat-x;
	background-image: url(obstacles/brambleswallhorizontal.png);
}

/** solid version **/
.obstacle.brambles div {
	width: 211px;
	height: 131px;
	background-size: contain;
	background-image: url(obstacles/brambles.png);
	display: block;
	flex: 0 0 211px;
	margin-left: 25%;
	margin-left: 64px;
}

/** big maps **/

.vinemap1, .vinemap2 {
	position: absolute;
	left: 0;
	top: 0;
	width: var(--game-width);
	height: var(--game-height);
	background-size: contain;
}

.vinemap1 {
	background-image: url(obstacles/vinemap1.png);
}

.vinemap2 {
	background-image: url(obstacles/vinemap2.png);
}

.left-2 .obstacle.brambleswallhorizontal, .left-3 .obstacle.brambleswallhorizontal, .left-1.up-1 .obstacle.brambleswallhorizontal,
.left-2 .obstacle.brambleswall, .left-3 .obstacle.brambleswall, .left-1.up-1 .obstacle.brambleswall, 
.left-3 .obstacle.brambles, .vinemap1, .vinemap2 {
	filter: brightness(0.6);
}


/** dead tree **/
.obstacle.fence.deadtree {
	width: 32px;
}

.obstacle.fence.deadtree div {
	background-size: contain;
	background-image: url(obstacles/deadtree.png);
	background-position: bottom center;
	background-repeat: no-repeat;
	height: 154px;
	width: 156px;
	position: absolute;
	bottom: 20px;
}

/** hollow tree **/
.obstacle.fence.hollowtree {
	width: 56px;
}

.obstacle.fence.hollowtree div {
	background-size: contain;
	background-image: url(obstacles/hollowtree.png);
	background-position: bottom center;
	background-repeat: no-repeat;
	height: 160px;
	width: 192px;
	position: absolute;
	bottom: 8px;
   left: -83px;
}

/** big tree **/
.obstacle.bigtreeorange, .obstacle.bigtreegreen, .obstacle.bigtreeyellow {
	width: 192px;
}

.obstacle.fence.bigtreeorange, .obstacle.fence.bigtreegreen, .obstacle.fence.bigtreeyellow {
	width: 32px;
}

.obstacle.bigtreeorange div, .obstacle.bigtreegreen div, .obstacle.bigtreeyellow div {
	background-size: contain;
	background-position: bottom center;
	background-repeat: no-repeat;
	height: 240px;
	width: 298px;
	position: absolute;
	bottom: -80px;
	margin-left: 10px;
}

.obstacle.fence.bigtreeorange div, .obstacle.fence.bigtreegreen div, .obstacle.fence.bigtreeyellow div {
	bottom: 16px;
}

.obstacle.bigtreeorange div {
	background-image: url(obstacles/bigtreeorange.png);
}

.obstacle.bigtreegreen div {
	background-image: url(obstacles/bigtreegreen.png);
}

.obstacle.bigtreeyellow div {
	background-image: url(obstacles/bigtreeyellow.png);
}

/** tree block **/

.obstacle.treeblock {
	height: 64px;
}

.obstacle.treeblock div {
	background-image: url(obstacles/treeblock.png);
	background-size: contain;
	height: 64px;
	width: 100%;
	position: absolute;
	bottom: -40px;
	margin-left: 10px;
}

/** fog left 2 down 1 **/

.fog {
	background: url(obstacles/smoke.gif);
	background-size: 64px;
   height: 100%;
   width: 100%;
   position: absolute;
   left: 0;
   top: 0;
   z-index: 500;
   opacity: 0.95;
   display: block;
   mask: url(obstacles/fogleft2down1.png);
   mask-repeat: no-repeat;
   mask-size: 100% 100%;
   pointer-events: none;
   transition: 400ms ease-in;
}

.fog .obstacle.fence.hauntedtree2 div {
	background-image: url(obstacles/fogtree.png);
}

.fog.left-2:not(.down-1){
   mask: url(obstacles/fogleft2.png);
   mask-repeat: no-repeat;
   mask-size: 100% 100%;
}

.fog.up-1:not(.left-1):not(.left-2) {
   mask: url(obstacles/fogup1.png);
   mask-size: 100% 100%;
}

.fog.left-2.up-1 {
   mask: url(obstacles/fogleft2up1.png);
   mask-repeat: no-repeat;
   mask-size: 100% 100%;
}

.fog.left-1.up-1 {
   mask: url(obstacles/fogleft1up1.png);
   mask-repeat: no-repeat;
   mask-size: 100% 100%;
}

/** church pew **/
.obstacle.churchpew {
	height: 56px;
	width: 146px;
}

.obstacle.churchpew div {
	background-image: url(obstacles/churchpew.png);
	background-size: contain;
	background-position: bottom center;
	background-repeat: no-repeat;
	height: 66px;
	width: 146px;
	position: absolute;
	bottom: 8px;
}

.obstacle.churchpew.bible div:after {
	display: block;
	content:"";
	background-image: url(obstacles/churchpewbible.png);
	background-size: contain;
	width: 100%;
	height: 100%;
}


.obstacle.small {
	height: 32px;
	width: 32px;
}

/**** Decorations ****/

.decoration {
	position: absolute;
}

.cattail {
	height: 54px;
	width: 46px;
	background-image: url(obstacles/cattail.png);
	margin: -16px 0 0;
	background-size: contain;
	margin-top: 35px;
}

/**** Ripples go under cattails, but in the water div ***/
.ripples {
	 background-image: url(obstacles/ripples.png);
    width: 22px;
    height: 10px;
    margin-top: 83px;
    margin-left: 12px;
    background-size: contain;
    opacity: 60%;
}

.tree .ripples {
	margin-left: 4px;
   margin-top: -2px;
}

.leaves {
	background-image: url(obstacles/leavesflat1.png);
   background-size: 56px 44px;
   background-position: center center;
   position: absolute;
   width: 56px;
   height: 44px;
   border: 26px solid transparent;
   background-clip: padding-box,border-box;
   border-image: url(obstacles/leavesflatborder.png);
   border-image-slice: 55 55 55 55;
   border-image-width: 26px 26px 26px 26px;
   border-image-repeat: repeat repeat;
   z-index: 1;
}

/** leafsprawl is in its own fucking place man too long, new CSS file **/

.leavesround {
	background-image: url(obstacles/leavesflatround.png);
   background-size: contain;
   background-position: top left;
   position: absolute;
   width: 116px;
   height: 115px;
   border: none;
}

/** Flowers in ground **/

.flowers1, .flowers2, .flowers3 {
	margin-top: 68px;
	position: absolute;
	background-position: left bottom;
	background-size: auto 22px;
	width: 38px;
	height: 22px;
}

.flowers1 {
	background-image: url(obstacles/flowers1.png);
}

.flowers2 {
	background-image: url(obstacles/flowers2.png);
}

.flowers3 {
	background-image: url(obstacles/flowers3.png);
}

/** Flowers picked **/

.flower1, .flower2, .flower3 {
	margin-top: 68px;
	position: absolute;
	background-position: left bottom;
	background-size: contain;
	width: 24px;
	height: 10px;
}

.flower1 {
	background-image: url(obstacles/flower1.png);
}

.flower2 {
	background-image: url(obstacles/flower2.png);
}

.flower3 {
	background-image: url(obstacles/flower3.png);
}

#Daisy {
	position: absolute;
	background-image: url(objectives/daisy.png);
}

/** Clover Patch **/

.clovers {
	background-image: url(obstacles/clovers.png);
	position: absolute;
	background-position: left bottom;
	background-size: contain;
	width: 258px;
	height: 112px;
}

/** Bones **/
.decoration.bones {
	background-image: url(obstacles/bones.png);
	background-size: contain;
	margin-top: 62px;
	height: 30px;
	width: 62px;
}

/**Church Top (this has a smaller base, to change when it fades**/
.churchtop {
	width: 544px;
	height: 750px;
	position: absolute;
	left: 548px;
   top: -558px;
   z-index: 237;
   position: absolute;
   transition: 400ms ease;
}

.churchtop div {
	width: 544px;
	height: 882px;
	background-size: contain;
	background-image: url(obstacles/churchtop.png);
	background-position: bottom center;
	background-repeat: no-repeat;
	position: absolute;
   left: -14px;
   bottom: -129px;
}

/** inner wall vertical **/
.innerwall {
	background-color: transparent;
	height: 108px;
	width: 40px;
	position: absolute;
}

.obstacle.innerwall div {
	height: calc(100% + 116px);
	width: 34px;
	background-image: url(obstacles/innerwall.png);
	background-position: center bottom;
	background-repeat: repeat-y;
	background-size: 100% auto;
	position: absolute;
	top: -36px;
	right: 0;
}

/** inner wall horizontal **/

.obstacle.innerwallhorizontal {
	margin-top: 72px;
	height: 40px;
	width: 400px;
}

.obstacle.innerwallhorizontal div {
	background-size: auto 34px;
	background-image: url(obstacles/innerwallhorizontal.png);
	height: 34px;
	width: 100%;
	position: absolute;
	bottom: 17px;
	border: 1.5px solid #221022;
   border-top: none;
   border-bottom: none;
}

/******* Objectives *******/

.objective {
	height: 32px;
	width: 32px;
	border: 10px solid transparent;
	box-sizing: content-box;
	animation: wiggle 500ms infinite;
}

.objective.collected {
	position: unset;
	display: none;
}

.collected.given span {
	transition: 300ms ease;
	opacity: 0.5;
}

#inventory.open li.focus {
	background-color: #d34949;
    border-color: #eee;
}

#CandyApple, #CandyAppleInventory.collected span {
	background-image: url(objectives/candyapple.png);
}

#Drawing.objective, #Hair.objective {
	height: 46px;
	width: 46px;
}

#Drawing, #DrawingInventory.collected span {
	background-image: url(objectives/drawing.png);
}

#Feather, #FeatherInventory.collected span {
	background-image: url(objectives/feather.png);
}

#DaisyInventory.collected span {
	background-image: url(objectives/daisy.png);
}

#Hair, #HairInventory.collected span {
	background-image: url(objectives/hair.png);
}

#Bone.objective {
	height: 32px;
	width: 44px;
}

#Bone, #BoneInventory.collected span {
	background-image: url(objectives/bone.png);
}

#Bone-talking #interact-display {
	margin-top: 40px;
}

#Clover, #CloverInventory.collected span {
	background-image: url(objectives/clover.png);
}

#Clover.objective {
	height: 32px;
	width: 32px;
}

/** NPCs **/

.npc {
	height: 100px;
	width: 100px;
	position: absolute;
	background-size: contain;
}

#Terracotta.npc {
	width: 140px;
	height: 66px;
	background-image: url(charactersprites/terracottapix.png);
}

#Terracotta:before {
	content: "";
   background: #221022;
   height: 12px;
   width: 70%;
   position: relative;
   bottom: -89%;
   left: 15%;
   border-radius: 100%;
   mix-blend-mode: darken;
   opacity: 40%;
}

#Quincy.npc {
	margin-top: -10px;
	width: 110px;
	height: 100px;
	background-image: url(charactersprites/quincypix.png);
}

#Crow.npc {
	/** he has some extra code bc he's so small, so he gets padding for easier interaction, and a dif z index to be above his stone **/
	background-image: url(charactersprites/crowpix.png);
   height: 66px;
   width: 68px;
   padding: 0 0 20px 20px;
   background-clip: content-box;
   background-size: 48px 46px;
   background-position: right top;
   z-index: 285 !important;
}

#Crow-talking #dialogue-loader {
	font-family: 'SD Auto Pilot';
	font-size: 1.8em;
	display: flex;
   align-items: center;
   gap: 20px;
   flex-wrap: wrap;
}

.crow-scream {
	font-size: 2.5em;
	margin-top: -25px;
}

#Crow.npc.call {
	background-image: url(charactersprites/crowCaw.png);
}

#Acacia.npc {
	margin-top: -10px;
	width: 88px;
	height: 86px;
	background-image: url(charactersprites/acaciapix.png);
}

#Duck {
	width: 62px;
	height: 48px;
	background-size: contain;
	background-image: url(charactersprites/duck.png);

	left: 644px;
	transition: 6000ms linear, transform 400ms ease;
	transform: scaleX(-1.0);
}

#Duck.left {
	left: 274px;
	transform: scaleX(1);
}

#Cain.npc {
	width: 124px;
	height: 68px;
	background-image: url(charactersprites/cainpix.png);
}

#Vatra.npc {
	width: 80px;
	height: 84px;
	background-image: url(charactersprites/vatrapix.png);
}

/* Gnash is a bit different, since we want him to approach the player. SO we treat his trigger like the NPC instead */

#GnashPix {
	margin-top: -10px;
	width: 160px;
	height: 93px;
	background-image: url(charactersprites/gnashwalk.png);
	transition: 200ms ease, 6s linear left;
	background-position: bottom right;
	background-repeat: no-repeat;
	filter: contrast(0.95) brightness(1.5);
}

#Gnash.npc, #Gnash2.npc {
    height: 190px;
    margin-top: 0;
    width: 32px;
    top: 180px;
    left: 482px;
    position: absolute;
}


/****************************************** Media Queries ******************************************/

@media (max-width: 1100px) {

	body {
		height: 90vh;
	}

	#game-wrapper {
		width: calc(var(--game-width));
		flex-direction: column;
		height: calc(var(--game-height) + var(--inventory-width) / 2);
	}

	#inventory:not(.open) h3 {
		width: auto;
	}

	#inventory {
		position: unset;
      width: auto;
      height: 120px;
      flex: 0 0 auto;
      flex-direction: row;
      justify-content: flex-start;
	}

	#mobile-controls {
	    bottom: -28px;
	 }

	#inventory.open {
		justify-content: center;
		position: absolute;
		top: 0;
		left: 0;
		height: 676px;
	}
}

@media (max-width: 915px) {

	body.touch-only {
		align-items: flex-end;
		margin: 20px 0 0;
	}

	body.touch-only #game-wrapper {
		width: calc(var(--game-width) + var(--inventory-width));
		flex-direction: row;
		height: calc(var(--game-height));
		margin-top: 40px;
	}

	body.touch-only #inventory {
		position: absolute;
      width: var(--inventory-width);
      height: 100%;
      flex: 0 0 auto;
      justify-content: center;
	}

	body.touch-only #mobile-controls {
	    bottom: -5px;
	 }

	body.touch-only #inventory.open {
		justify-content: center;
		position: absolute;
		top: 0;
		left: 0;
		height: calc(var(--game-height);
	}
}


