
@font-face {
	font-family: 'CompassPro';
	src: url('CompassPro.eot');
	src: url('CompassPro.eot?#iefix') format('embedded-opentype'),
		 url('CompassPro.woff') format('woff'),
		 url('CompassPro.ttf') format('truetype'),
		 url('CompassPro.svg#CompassPro') format('svg');
	font-weight: normal;
	font-style: normal;
}

html {
	box-sizing: border-box;
}
*, *:before, *:after {
	box-sizing: inherit;
}

body {
	padding: 0;
	margin: 0;
	color: antiquewhite;
	background-color: #111;
	font-family: 'CompassPro', monospace;
	font-size: 24px;
}

@keyframes bg-scroll {
	from {
		background-position: 0 0;
	}
	to {
		background-position: -2560px 0;
	}
}

.bg-stars {
	background-color: #111 !important;
	background-image: url('../assets/stars.png');
	background-repeat: repeat;
	background-attachment: fixed;
}

.bg-scroll {
	animation-name: bg-scroll;
	animation-duration: 10.0s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
}

a {
	color: antiquewhite;
}

::placeholder {
	font-family: 'CompassPro', monospace;
}

input[type="text"] {
	font-family: 'CompassPro', monospace;
}

#wait-gameid {
	font-family: monospace;
}

@media (max-width: 600px), (max-height: 500px) {
	body {
		font-size: 16px;
	}
	.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;
}

.hidden {
	display: none !important;
}

#error {
	position: absolute;
	white-space: pre;
	z-index: 1000;
}

#debug {
	display: none;
	position: fixed;
	right: 0;
	bottom: 0;
	padding: 5px;
	min-width: 110px;
}

#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;
	font-size: 32px;
}

.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; }

.corner {
	position: fixed;
	top: 10px;
	right: 10px;
}

#controls {
	position: fixed;
	width: 100%;
	bottom: 70px;
	text-align: center;
}

h1 {
	font-size: 3em;
	padding: 16px 0 16px 0;
	margin: 0px;
	color: #639bff; /* THEME COLOR */
}

h2 {
	margin: 16px 0;
}

table {
	display: inline-block;
	margin-bottom: 6px;
	margin-right: 10px;
}

th {
	text-align: left;
}

td {
	min-width: 100px;
	padding-right: 20px;
}

.disable-text-select {
	-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;
	pointer-events: none;
}

.btn {
	display: inline-block;
	height: 48px;
	line-height: 47px;
	margin: 4px;
	text-align: center;
	vertical-align: middle;
	color: #210;
	cursor: pointer;
	border-image: url('../assets/ui/grey.png') 16 fill repeat;
	border-image-width: 16px;
	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-image: url('../assets/ui/tan_pressed.png') 16 fill repeat;
	border-image-width: 16px;
}

.btn-no-touch:hover {
	border-image: url('../assets/ui/tan.png') 16 fill repeat;
	border-image-width: 16px;
}

.btn:active {
	border-image: url('../assets/ui/tan_pressed.png') 16 fill repeat;
	border-image-width: 16px;
}

.btn-disabled {
	pointer-events: none;
	color: #666 !important;
}

.btn-square {
	width: 48px;
	font-size: 48px;
}

.btn-item {
	width: 70px;
	height: 56px;
	font-size: 48px;
}

.btn-text {
	padding-left: 20px;
	padding-right: 20px;
	font-size: 22px;
	width: 200px;
}

.btn-text-thin {
	padding-left: 20px;
	padding-right: 20px;
	font-size: 22px;
	width: 200px;
	line-height: 30px;
	height: 32px;
}

.btn-compact {
	font-size: 18px;
	width: 100px;
}

.input-box {
	display: block;
	font-size: 20px;
	width: 200px;
	height: 32px;
	line-height: 46px;
	margin: 4px auto;
	text-align: center;
	vertical-align: middle;
	color: #210;
	cursor: pointer;
	border-image: url('../assets/ui/brown_pressed.png') 16 fill repeat;
	border-image-width: 16px;
	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;
}

.input-box::placeholder {
	color: #420;
	font-size: 16px;
}

.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%;
}

#end {
	background-color: rgba(0, 0, 0, 0.7);
	text-align: center;
	font-size: 22px;
}
#end > div {
	position: relative;
	top: 10%;
}

#status {
	position: fixed;
	top: 10px;
	width: 100%;
	font-size: 36px;
	text-align: center;
}

.status-item {
	display: inline-block;
	padding: 0 24px;
	width: max-content;
}

#map-title {
	position: fixed;
	top: 10px;
	width: 100%;
	text-align: center;
}

#inventory-details {
	margin: 10px 0;
}

#inv {
	position: fixed;
	bottom: 10px;
	right: 10px;
	font-size: 42px;
	text-align: right;
}

@media (max-width: 600px), (max-height: 500px) {
	#status {
		font-size: 24px;
		text-align: left;
		width: auto;
	}
	.status-item {
		display: block;
		padding: 0 10px;
	}
	.modal {
		background-color: rgba(0,0,0, 0.95);
	}
	#map-title {
		display: none;
	}
	#messages {
		font-size: 1em;
	}
	#inv {
		font-size: 20px;
	}
	#equipped {
		display: block;
	}
	#new-host-only {
		display: none;
	}
}

.star {
	background-image: url(../assets/star.png);
	background-repeat: no-repeat;
	display: inline-block;
	width: 72px;
	height: 72px;
}

.star-dim {
	background-image: url(../assets/star-dim.png);
	background-repeat: no-repeat;
	display: inline-block;
	width: 72px;
	height: 72px;
}

.sprite16 {
	background-image: url(../assets/tileset.png);
	background-repeat: no-repeat;
	display: inline-block;
	vertical-align: middle;
	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;
}
.sprite32 {
	background-image: url(../assets/tileset-scifi-32.png);
	background-repeat: no-repeat;
	display: inline-block;
	vertical-align: middle;
	width: 32px;
	height: 32px;
	margin: 8px;
	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;
}
.sprite-inline {
	margin: 2px 0;
}
.health { background-position: calc(-32px * 0) calc(-32px * 3); }
.money { background-position: calc(-32px * 1) calc(-32px * 3); }
.key { background-position: calc(-32px * 2) calc(-32px * 2); }
.goal { background-position: calc(-32px * 2) calc(-32px * 6); }

.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_old { background-position: calc(-16px * 8) calc(-16px * 8); }
.heart { background-position: calc(-16px * 14) calc(-16px * 12); }
/*.heart { background: none; font-size: 16px; text-align: center; color: red; }*/
.altar { background-position: calc(-16px * 8) calc(-16px * 7); }
.amulet1 { background-position: calc(-16px * 0) calc(-16px * 13); }
.amulet2 { background-position: calc(-16px * 1) calc(-16px * 13); }
.amulet3 { background-position: calc(-16px * 2) calc(-16px * 13); }
.amulet4 { background-position: calc(-16px * 3) calc(-16px * 13); }
.no-amulet1 { background-position: calc(-16px * 4) calc(-16px * 13); opacity: 0.25; }
.no-amulet2 { background-position: calc(-16px * 5) calc(-16px * 13); opacity: 0.25; }
.no-amulet3 { background-position: calc(-16px * 6) calc(-16px * 13); opacity: 0.25; }
.no-amulet4 { background-position: calc(-16px * 7) calc(-16px * 13); opacity: 0.25; }
.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: 0.5s;
}

.footer {
	font-size: 10px;
	text-align: center;
	color: #666;
	margin-top: 30px;
}
