@font-face {
    font-family: 'yekan';
    font-style: normal;
	font-weight: 300;
    src:url(fonts/yekan.eot?#) format('embedded-opentype'),    
          url(fonts/yekan.woff) format('woff'),
          url(fonts/yekan.ttf) format('truetype'); 
}

body, input, select, textarea {
    font-family: yekan;
    color: #333333;
}

div#main {
    width: 400px;
    margin: auto;
    background-color: #eafbf1;
}

div#multiple {
    width: 90%;
    height: 100px;
    margin: auto;
    display: block;
    background-color: #f7e9e9;
    margin-bottom: 5px;
    text-align: center;
    font-size: 45px;
}

div#result {
    width: 90%;
    height: 100px;
    margin: auto;
    display: block;
    background-color: #dcdcdc;
    margin-bottom: 15px;
    text-align: center;
    font-size: 45px;
}

div.rw {
	margin-left: 15px;
}

div.cl {
    display: inline-block;
    width: 29%;
    margin-left: 1%;
    margin-right: 1%;
    margin-bottom: 5px;
    margin-top: 5px;
    background-color: beige;
    text-align: center;
    border: 1px solid #e0c0c0ba;
    border-radius: 5px;
    cursor: pointer;
}

div#result.err {
    color: red;
}

div.popup {
	position: fixed;
	top: 0;
	left: 0;
	height: 100%;
	width:100%;
	background-color: rgba(0, 0, 0, 0.3);
	margin: 0;
	display: none;
	z-index: 200;
}


div.popuptop {
	direction: rtl;
	border: 6px #808080 solid;
	border-radius: 20px;
	background-color: #f9f9f9;
	position: fixed;
	left: 50%;
	top: 50%;
	z-index: 100;
	height: 320px;
	margin-top: -160px;
	width: 400px;
	margin-left: -200px;
	padding-bottom: 20px;
}

div#selector > div:first-child {
    margin-top: 20px;
}
div#selector > div {
    margin-right: 20px;
}

div.boxbutton {
    position: absolute;
    margin-top: 0;
}

div.button {
	min-width: 4em;
	text-align: center;
	padding: 1px 6px;
	background-color: buttonface;
	color: #5d5d5d;
	border: 2px solid #cacaca;
	border-radius: 5px;
	float: right;
	cursor: pointer;
	margin-left: 5px;
}

div.button:hover {
	background: #808080;
	color: #eaeaea;
	border: 2px solid #808080;
}

img.menu {
	height: 20px;
}

@media only screen and (orientation: portrait) {
	div#main {
	    width: 100%;
	}

	div#multiple {
		height: 150px;
		font-size: 75px;
	}

	div#result {
		height: 150px;
		font-size: 75px;
	}

	div.cl {
		height: 200px;
		font-size: 40px;
		vertical-align: middle;
		font-size: 75px;
		vertical-align: middle;
	}

	img.menu {
		height: 100px !important;
		width: 100%;
	}

	div.popuptop {
		border: 6px #808080 solid;
		border-radius: 20px;
		position: fixed;
		left: 50%;
		top: 50%;
		z-index: 100;
		height: 80%;
		margin-top: -60%;
		width: 80%;
		margin-left: -40%;
		padding-bottom: 0;
	}
	div#selector > div {
	    height: 10%;
	}

	div#selector > div span {
		font-size: 75px;
	}

	div.button {
		min-width: 7em;
		font-size: 2em;
	}

	div#selector > div input:checked + span {
		color: red;
	}
}