
@font-face {
	font-family: 'kenney_miniregular';
	src: url('kenney_mini-webfont.eot');
	src: url('kenney_mini-webfont.eot?#iefix') format('embedded-opentype'),
		 url('kenney_mini-webfont.woff2') format('woff2'),
		 url('kenney_mini-webfont.woff') format('woff'),
		 url('kenney_mini-webfont.ttf') format('truetype'),
		 url('kenney_mini-webfont.svg#kenney_miniregular') format('svg');
	font-weight: normal;
	font-style: normal;
}

html {
	box-sizing: border-box;
}
*, *:before, *:after {
	box-sizing: inherit;
}

body {
	padding: 0;
	margin: 0;
	color: whitesmoke;
	background-color: #111;
	font-family: 'kenney_miniregular', monospace;
	font-size: 18px;
}

@media (max-width: 600px), (max-height: 500px) {
	body {
		font-size: 14px;
	}
	.msg3 { display: none; }
	.msg4 { display: none; }
}

:-webkit-full-screen {
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	background: none;
}

:-ms-fullscreen {
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	background: none;
}

:fullscreen {
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	/* keeps correct aspect ratio and full image visible */
	-o-object-fit: contain; /* Opera 12.1 */
	object-fit: contain;
}

canvas {
	position: absolute;
	z-index: -1;
    image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -o-crisp-edges;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
}

#error {
	position: absolute;
	z-index: 1000;
}

#debug {
	display: none;
	position: fixed;
	right: 0;
	bottom: 0;
	padding: 5px;
	min-width: 110px;
	pointer-events: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

#messages {
	position: fixed;
	bottom: 0;
	max-width: 90%;
	padding: 8px 10px;
	text-shadow: black 0 0 2px;
	background-color: rgba(0, 0, 0, 0.5);
	border-radius: 3px;
	pointer-events: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.msg0 { opacity: 1.0; }
.msg1 { opacity: 0.6; }
.msg2 { opacity: 0.4; }
.msg3 { opacity: 0.3 }
.msg4 { opacity: 0.2; }
.info { }
.warn { color: red; }
.feat { color: green; }

.right { float: right; }
.left { float: left; }
.center { text-align: center; }

#menu-open {
	position: fixed;
	top: 10px;
	right: 10px;
}

h1 {
	font-size: 2em;
	padding: 16px 0 16px 0;
	margin: 0px;
}

.btn {
	display: inline-block;
	height: 48px;
	line-height: 46px;
	margin: 4px;
	text-align: center;
	vertical-align: middle;
	color: #bbb;
	background-color: #222;
	cursor: pointer;
	border: 1px solid black;
	text-decoration: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.btn-selected {
	border: 1px solid white;
}

.btn-no-touch:hover {
	/*border: 1px solid white;*/
	-webkit-transform: scale(1.1);
	-moz-transform: scale(1.1);
	-ms-transform: scale(1.1);
	-o-transform: scale(1.1);
	transform: scale(1.1);
}

.btn:active {
	-webkit-transform: scale(0.85);
	-moz-transform: scale(0.85);
	-ms-transform: scale(0.85);
	-o-transform: scale(0.85);
	transform: scale(0.85);
}

.btn-disabled {
	pointer-events: none;
	color: #444 !important;
}

.btn-square {
	width: 48px;
	font-size: 48px;
}

.btn-text {
	padding-left: 20px;
	padding-right: 20px;
	font-size: 20px;
	width: 180px;
}

.btn-compact {
	font-size: 18px;
	width: 100px;
}

.modal {
	display: none;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: rgba(0,0,0, 0.8);
	z-index: 1000;
	/*opacity: 0;
	-webkit-transition: opacity 200ms ease-in;
	-moz-transition: opacity 200ms ease-in;
	transition: opacity 200ms ease-in;
	pointer-events: none;*/
}

.menu {
	margin: 0 auto;
	padding: 3%;
	width: 90%;
	max-width: 600px;
	height: 100%;
}

#death {
	background-color: rgba(64, 0, 0, 0.7);
	text-align: center;
}
#win {
	background-color: rgba(0, 64, 0, 0.7);
	text-align: center;
}
#death > div { top: 35%; }
#win > div { top: 35%; }

#status {
	position: fixed;
	top: 10px;
	left: 10px;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.sprite {
	background-image: url(../assets/tileset.png);
	background-repeat: no-repeat;
	display: inline-block;
	width: 16px;
	height: 16px;
    image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -o-crisp-edges;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
}
.sprite2x {
	-webkit-transform: scale(2);
	-moz-transform: scale(2);
	-ms-transform: scale(2);
	-o-transform: scale(2);
	transform: scale(2);
	margin: 8px;
}
.sprite3x {
	-webkit-transform: scale(3);
	-moz-transform: scale(3);
	-ms-transform: scale(3);
	-o-transform: scale(3);
	transform: scale(3);
	margin: 16px;
}
.depth { background-position: calc(-16px * 10) calc(-16px * 1); }
.gem { background-position: calc(-16px * 11) calc(-16px * 9); }
.coin { background-position: calc(-16px * 8) calc(-16px * 9); }
.key { background-position: calc(-16px * 8) calc(-16px * 8); }
.heart { background-position: calc(-16px * 14) calc(-16px * 12); }
.altar { background-position: calc(-16px * 8) calc(-16px * 7); }
/*.heart { background: none; font-size: 16px; text-align: center; color: red; }*/
.male { background-position: calc(-16px * 24) calc(-16px * 0); }
.female { background-position: calc(-16px * 27) calc(-16px * 0); }

#shop-details {
	max-width: 400px;
}

@keyframes tada {
	from {
		-webkit-transform: scale3d(1, 1, 1);
		transform: scale3d(1, 1, 1);
	}
	10%, 20% {
		-webkit-transform: scale3d(.8, .8, .8) rotate3d(0, 0, 1, -3deg);
		transform: scale3d(.8, .8, .8) rotate3d(0, 0, 1, -3deg);
	}
	30%, 50%, 70%, 90% {
		-webkit-transform: scale3d(1.2, 1.2, 1.2) rotate3d(0, 0, 1, 3deg);
		transform: scale3d(1.2, 1.2, 1.2) rotate3d(0, 0, 1, 3deg);
	}
	40%, 60%, 80% {
		-webkit-transform: scale3d(1.2, 1.2, 1.2) rotate3d(0, 0, 1, -3deg);
		transform: scale3d(1.2, 1.2, 1.2) rotate3d(0, 0, 1, -3deg);
	}
	100% {
		-webkit-transform: scale3d(1, 1, 1);
		transform: scale3d(1, 1, 1);
	}
}

.tada {
	animation-name: tada;
	animation-duration: 1s;
}

.footer {
	font-size: 10px;
	text-align: center;
	color: #666;
	margin-top: 30px;
}
