* {
	-webkit-overflow-scrolling: touch;
	-moz-overflow-scrolling: touch;
	-ms-overflow-scrolling: touch;
	-o-overflow-scrolling: touch;
	overflow-scrolling: touch;
}

html, body, .board table {
	font-family:Verdana, Helvetica, Arial, sans;

	width:100%;
	height:100%;
	margin:0;
	padding:0;
}

.needs-localstorage { display:none; }

.sets-game, .board {
	width: 100%;
	height: 100%;

	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	-o-box-sizing:border-box;
	box-sizing:border-box;
}

/*
 * can't animate a pseudo element in most browsers, see:
 * http://css-tricks.com/transitions-and-animations-on-css-generated-content/ 
*/
/*#game-area.helping:after,*/
.helping-message { display: none; }
#game-area.helping + .helping-message {
	display: block;
	position: absolute;
	right: 0;
	bottom: 0;
	text-align: center;
	content: 'thinking ...';
	padding: .2em;
	font-size: .75em;
	z-index: 10;

	-webkit-animation: text-pulse 2s infinite;
	-moz-animation:    text-pulse 2s infinite;
	-ms-animation:     text-pulse 2s infinite;
}
@-webkit-keyframes text-pulse {
	0%   { color: #000; }
	50%  { color: #888; }
	100% { color: #000; }
}
@-moz-keyframes text-pulse {
	0%   { color: #000; }
	50%  { color: #888; }
	100% { color: #000; }
}
@-ms-keyframes text-pulse {
	0%   { color: #000; }
	50%  { color: #888; }
	100% { color: #000; }
}

.left { float: left; }
.right { float: right; }
.hide { display: none; }
a, a:hover, a:visited { cursor: pointer; text-decoration: none; }

.scoreboard-display a {
	color: black;
}

.popup {
	position: absolute;
	top: 29%;
	width: 100%;
	padding: 0 2em;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	-o-box-sizing: border-box;
	box-sizing: border-box;
}
.popup div {
	color: white;
	background: rgba(0, 0, 0, .5);
	text-align: center;
	padding: 1em 1em;
	-webkit-border-radius: 1em;
	-moz-border-radius: 1em;
	border-radius: 1em;
}

.lightbox {
	background: #333;
	background:rgba(0, 0, 0, .75);
	position:absolute;
	top: 0;
	z-index:100;
	width:100%;
	height:100%;
	overflow: auto;

	padding: 1em;

	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	-o-box-sizing: border-box;
	box-sizing: border-box;

	color: #555;
	text-shadow: 1px 1px 1px white;
}
.lightbox:target { display: block; }
/*.lightbox a { color: black; }*/
/*.lightbox a:hover { text-decoration: underline; }*/

.lightbox > div {
	background: #F0F0F0;
	-webkit-border-radius: .5em;
	-moz-border-radius: .5em;
	border-radius: .5em;

	border: 1px solid white;
	border-color: white #DADADA #DADADA white;
	padding: .5em 1em;
	clear:both;
	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	-o-box-sizing:border-box;
	box-sizing:border-box;
	max-height:100%;
	overflow:auto;
}
.lightbox > div:after {
	content:'';
	display:block;
	clear:both;
}

.button,
.button:hover,
.button:visited {
	color:white;
	cursor:pointer;
	text-shadow:none;
	text-decoration:none;
}
.button {
	background: rgb(149,149,149); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(149,149,149,1) 0%, rgba(13,13,13,1) 46%, rgba(1,1,1,1) 50%, rgba(10,10,10,1) 53%, rgba(78,78,78,1) 76%, rgba(56,56,56,1) 87%, rgba(27,27,27,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(149,149,149,1)), color-stop(46%,rgba(13,13,13,1)), color-stop(50%,rgba(1,1,1,1)), color-stop(53%,rgba(10,10,10,1)), color-stop(76%,rgba(78,78,78,1)), color-stop(87%,rgba(56,56,56,1)), color-stop(100%,rgba(27,27,27,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(149,149,149,1) 0%,rgba(13,13,13,1) 46%,rgba(1,1,1,1) 50%,rgba(10,10,10,1) 53%,rgba(78,78,78,1) 76%,rgba(56,56,56,1) 87%,rgba(27,27,27,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(149,149,149,1) 0%,rgba(13,13,13,1) 46%,rgba(1,1,1,1) 50%,rgba(10,10,10,1) 53%,rgba(78,78,78,1) 76%,rgba(56,56,56,1) 87%,rgba(27,27,27,1) 100%); /* Opera11.10+ */
	background: -ms-linear-gradient(top, rgba(149,149,149,1) 0%,rgba(13,13,13,1) 46%,rgba(1,1,1,1) 50%,rgba(10,10,10,1) 53%,rgba(78,78,78,1) 76%,rgba(56,56,56,1) 87%,rgba(27,27,27,1) 100%); /* IE10+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#959595', endColorstr='#1b1b1b',GradientType=0 ); /* IE6-9 */
	background: linear-gradient(top, rgba(149,149,149,1) 0%,rgba(13,13,13,1) 46%,rgba(1,1,1,1) 50%,rgba(10,10,10,1) 53%,rgba(78,78,78,1) 76%,rgba(56,56,56,1) 87%,rgba(27,27,27,1) 100%); /* W3C */

	color: white;
	border: 1px solid;
	border-color:#333 #333 #000;
	-webkit-border-radius: .625em;
	-moz-border-radius: .625em;
	border-radius: .625em;
	text-decoration: none;

	line-height: 24px;
	height: 24px;
	display: inline-block;
	padding: 0px 10px;
}
.button:hover,
.button.active {
	background: rgb(76,76,76); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(76,76,76,1) 0%, rgba(89,89,89,1) 12%, rgba(102,102,102,1) 25%, rgba(71,71,71,1) 39%, rgba(44,44,44,1) 50%, rgba(0,0,0,1) 51%, rgba(17,17,17,1) 60%, rgba(43,43,43,1) 76%, rgba(28,28,28,1) 91%, rgba(19,19,19,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(76,76,76,1)), color-stop(12%,rgba(89,89,89,1)), color-stop(25%,rgba(102,102,102,1)), color-stop(39%,rgba(71,71,71,1)), color-stop(50%,rgba(44,44,44,1)), color-stop(51%,rgba(0,0,0,1)), color-stop(60%,rgba(17,17,17,1)), color-stop(76%,rgba(43,43,43,1)), color-stop(91%,rgba(28,28,28,1)), color-stop(100%,rgba(19,19,19,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(76,76,76,1) 0%,rgba(89,89,89,1) 12%,rgba(102,102,102,1) 25%,rgba(71,71,71,1) 39%,rgba(44,44,44,1) 50%,rgba(0,0,0,1) 51%,rgba(17,17,17,1) 60%,rgba(43,43,43,1) 76%,rgba(28,28,28,1) 91%,rgba(19,19,19,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(76,76,76,1) 0%,rgba(89,89,89,1) 12%,rgba(102,102,102,1) 25%,rgba(71,71,71,1) 39%,rgba(44,44,44,1) 50%,rgba(0,0,0,1) 51%,rgba(17,17,17,1) 60%,rgba(43,43,43,1) 76%,rgba(28,28,28,1) 91%,rgba(19,19,19,1) 100%); /* Opera11.10+ */
	background: -ms-linear-gradient(top, rgba(76,76,76,1) 0%,rgba(89,89,89,1) 12%,rgba(102,102,102,1) 25%,rgba(71,71,71,1) 39%,rgba(44,44,44,1) 50%,rgba(0,0,0,1) 51%,rgba(17,17,17,1) 60%,rgba(43,43,43,1) 76%,rgba(28,28,28,1) 91%,rgba(19,19,19,1) 100%); /* IE10+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */
	background: linear-gradient(top, rgba(76,76,76,1) 0%,rgba(89,89,89,1) 12%,rgba(102,102,102,1) 25%,rgba(71,71,71,1) 39%,rgba(44,44,44,1) 50%,rgba(0,0,0,1) 51%,rgba(17,17,17,1) 60%,rgba(43,43,43,1) 76%,rgba(28,28,28,1) 91%,rgba(19,19,19,1) 100%); /* W3C */
}

.views-menubar {
	background: rgb(255,255,255); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(243,243,243,1) 50%, rgba(237,237,237,1) 51%, rgba(255,255,255,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(50%,rgba(243,243,243,1)), color-stop(51%,rgba(237,237,237,1)), color-stop(100%,rgba(255,255,255,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(243,243,243,1) 50%,rgba(237,237,237,1) 51%,rgba(255,255,255,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(243,243,243,1) 50%,rgba(237,237,237,1) 51%,rgba(255,255,255,1) 100%); /* Opera11.10+ */
	background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(243,243,243,1) 50%,rgba(237,237,237,1) 51%,rgba(255,255,255,1) 100%); /* IE10+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */
	background: linear-gradient(top, rgba(255,255,255,1) 0%,rgba(243,243,243,1) 50%,rgba(237,237,237,1) 51%,rgba(255,255,255,1) 100%); /* W3C */

	color: #333;
	text-shadow: 1px 1px 1px white;

	border-bottom:1px solid black;
	width:100%;
	height:2em;
	position:absolute;
	top:0;
	z-index:10;

	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	-o-user-select: none;
	user-select: none;

	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	-o-box-sizing:border-box;
	box-sizing:border-box;
}
.views-menubar p {
	display:block;
	font-size:14px;
	font-weight:bold;
	text-transform:capitalize;
	line-height:24px;

	margin:0;

	position:relative;
	z-index:10;
}
.views-menubar p {
	padding: 4px 8px;
}
.views-menubar .menubar-button {
	margin: 3px 8px;
}

.views-menubar .center {
	position:absolute;
	width:100%;
	text-align:center;
	z-index:-5;

	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	-o-box-sizing:border-box;
	box-sizing:border-box;
}

.dropdown div:target { display:block; }
.dropdown div {
	display:none;
	position:absolute;
	top:0;
	left:0;

	background: #F0F0F0;

	-webkit-border-bottom-right-radius: .5em;
	-moz-border-radius-bottomright: .5em;
	border-bottom-right-radius: .5em;

	border:1px solid black;
	border-top:none;
	border-left:none;
}
.dropdown ul {
	font-size:16px;

	list-style:none;

	padding:.25em 4px;
	margin:0;
	margin-top:-1px;

	min-width:102px;

	top:0;
	z-index:10;
}
.dropdown ul a {
	font-size:14px;
	display:block;
	text-shadow: 1px 1px 1px black;
	padding:.5em 4px;
	-webkit-border-radius:.5em;
	-moz-border-radius:.5em;
	border-radius:.5em;
}
.dropdown ul a:hover {
	background: rgb(76,76,76); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(76,76,76,1) 0%, rgba(89,89,89,1) 12%, rgba(102,102,102,1) 25%, rgba(71,71,71,1) 39%, rgba(44,44,44,1) 50%, rgba(0,0,0,1) 51%, rgba(17,17,17,1) 60%, rgba(43,43,43,1) 76%, rgba(28,28,28,1) 91%, rgba(19,19,19,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(76,76,76,1)), color-stop(12%,rgba(89,89,89,1)), color-stop(25%,rgba(102,102,102,1)), color-stop(39%,rgba(71,71,71,1)), color-stop(50%,rgba(44,44,44,1)), color-stop(51%,rgba(0,0,0,1)), color-stop(60%,rgba(17,17,17,1)), color-stop(76%,rgba(43,43,43,1)), color-stop(91%,rgba(28,28,28,1)), color-stop(100%,rgba(19,19,19,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(76,76,76,1) 0%,rgba(89,89,89,1) 12%,rgba(102,102,102,1) 25%,rgba(71,71,71,1) 39%,rgba(44,44,44,1) 50%,rgba(0,0,0,1) 51%,rgba(17,17,17,1) 60%,rgba(43,43,43,1) 76%,rgba(28,28,28,1) 91%,rgba(19,19,19,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(76,76,76,1) 0%,rgba(89,89,89,1) 12%,rgba(102,102,102,1) 25%,rgba(71,71,71,1) 39%,rgba(44,44,44,1) 50%,rgba(0,0,0,1) 51%,rgba(17,17,17,1) 60%,rgba(43,43,43,1) 76%,rgba(28,28,28,1) 91%,rgba(19,19,19,1) 100%); /* Opera11.10+ */
	background: -ms-linear-gradient(top, rgba(76,76,76,1) 0%,rgba(89,89,89,1) 12%,rgba(102,102,102,1) 25%,rgba(71,71,71,1) 39%,rgba(44,44,44,1) 50%,rgba(0,0,0,1) 51%,rgba(17,17,17,1) 60%,rgba(43,43,43,1) 76%,rgba(28,28,28,1) 91%,rgba(19,19,19,1) 100%); /* IE10+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */
	background: linear-gradient(top, rgba(76,76,76,1) 0%,rgba(89,89,89,1) 12%,rgba(102,102,102,1) 25%,rgba(71,71,71,1) 39%,rgba(44,44,44,1) 50%,rgba(0,0,0,1) 51%,rgba(17,17,17,1) 60%,rgba(43,43,43,1) 76%,rgba(28,28,28,1) 91%,rgba(19,19,19,1) 100%); /* W3C */
}
.dropdown li a {
	color: #333;
	text-shadow: 1px 1px 1px white;
}
.dropdown li:hover a {
	color:white;
	text-shadow:none;
}

.table {
	width: 20.875em;
	margin: .5em 0 1em;
}
.table dt,
.table dd {
	line-height: 1.6em;
}
.table dt {
	width: 16em;
	float:left;
}
.table dd {
	display: block;
	width: 4em;
	margin: 0;
	padding-left: 16.875em;
}
.board {
	background:url('../backgrounds/ipad2-wood-retina-1.jpg') repeat 50% 50%;
	padding-top:2em;
}
.board table {
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	-o-user-select: none;
	user-select: none;

	-webkit-tap-highlight-color:rgba(0,0,0,0) !important;
}
.board td {
	padding:.45em .625em;
	position:relative;
}

.board .card {
	border: 2px solid;
	border-color: white #DADADA #DADADA white;

	-webkit-box-shadow:0 .6em 1em #333;
	-moz-box-shadow:0 .6em 1em #333;
	box-shadow:0 .6em 1em #333;
	-webkit-border-radius:1.5em;
	-moz-border-radius:1.5em;
	border-radius:1.5em;

	-webkit-box-sizing:border-box;
	-moz-box-sizing:border-box;
	-o-box-sizing:border-box;
	box-sizing:border-box;

	background: rgb(255,255,255); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(246,246,246,1) 47%, rgba(237,237,237,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(47%,rgba(246,246,246,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* Opera11.10+ */
	background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* IE10+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
	background: linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%); /* W3C */

	position:relative;
	margin:auto;
	width:100%;
	height:100%;
}
.board .error .card {
	-webkit-box-shadow:0 0 1.5em red;
	-moz-box-shadow:0 0 1.5em red;
	box-shadow:0 0 1.5em red;
	border-color:red;

	-webkit-animation: wiggle .25s 1;
	-moz-animation:    wiggle .25s 1;
	-ms-animation:     wiggle .25s 1;
	-o-animation:      wiggle .25s 1;
	animation:         wiggle .25s 1;
}
.board .is_selected .card {
	-webkit-box-shadow:0 0 1.5em blue;
	-moz-box-shadow:0 0 1.5em blue;
	box-shadow:0 0 1.5em blue;
	border-color:blue;
}
.board .debug-not-possible .card {
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	box-shadow: none;
	border-color: black;
}
.board .not-possible .card {
	opacity:.5;
	-webkit-transition: opacity 1s linear;
	-moz-transition: opacity 1s linear;
	-ms-transition: opacity 1s linear;
	-o-transition: opacity 1s linear;
	transition: opacity 1s linear;
}
.board .found .card {
	-webkit-box-shadow:0 0 1.5em green;
	-moz-box-shadow:0 0 1.5em green;
	box-shadow:0 0 1.5em green;
	border-color:green;

	-webkit-animation: zoom 1s 1;
	-moz-animation:    zoom 1s 1;
	-ms-animation:     zoom 1s 1;
	-o-animation:      zoom 1s 1;
	animation:         zoom 1s 1;
}

@-webkit-keyframes wiggle {
	from { -webkit-transform:rotate(0deg); }
	20% { -webkit-transform:rotate(7deg); }
	60% { -webkit-transform:rotate(-7deg); }
	80% { -webkit-transform:rotate(7deg); }
	to { -webkit-transform:rotate(0deg); }
}
@-moz-keyframes wiggle {
	from { -moz-transform:rotate(0deg); }
	20% { -moz-transform:rotate(7deg); }
	60% { -moz-transform:rotate(-7deg); }
	80% { -moz-transform:rotate(7deg); }
	to { -moz-transform:rotate(0deg); }
}
@-ms-keyframes wiggle {
	from { -ms-transform:rotate(0deg); }
	20% { -ms-transform:rotate(7deg); }
	60% { -ms-transform:rotate(-7deg); }
	80% { -ms-transform:rotate(7deg); }
	to { -ms-transform:rotate(0deg); }
}
@-o-keyframes wiggle {
	from { -o-transform:rotate(0deg); }
	20% { -o-transform:rotate(7deg); }
	60% { -o-transform:rotate(-7deg); }
	80% { -o-transform:rotate(7deg); }
	to { -o-transform:rotate(0deg); }
}
@keyframes wiggle {
	from { transform:rotate(0deg); }
	20% { transform:rotate(7deg); }
	60% { transform:rotate(-7deg); }
	80% { transform:rotate(7deg); }
	to { transform:rotate(0deg); }
}

@-webkit-keyframes zoom {
	from { -webkit-transform:scale(1); opacity:1; }
	50% { -webkit-transform:scale(1.1); opacity:.25; }
	to { -webkit-transform:scale(1); opacity:0;}
}
@-moz-keyframes zoom {
	from { -moz-transform:scale(1); opacity:1; }
	50% { -moz-transform:scale(1.1); opacity:.25; }
	to { -moz-transform:scale(1); opacity:0;}
}
@-ms-keyframes zoom {
	from { -ms-transform:scale(1); opacity:1; }
	50% { -ms-transform:scale(1.1); opacity:.25; }
	to { -ms-transform:scale(1); opacity:0;}
}
@-o-keyframes zoom {
	from { -o-transform:scale(1); opacity:1; }
	50% { -o-transform:scale(1.1); opacity:.25; }
	to { -o-transform:scale(1); opacity:0;}
}
keyframes zoom {
	from { transform:scale(1); opacity:1; }
	50% { transform:scale(1.1); opacity:.25; }
	to { transform:scale(1); opacity:0; }
}

.card canvas {
	position:absolute; top:0; bottom:0; left:0; right:0;
	margin:auto;
}

/* iPad [portrait + landscape] */
@media all and (min-device-width: 768px) and (max-device-width: 1024px) {
	.board .slot { padding:.25em; }
	.board .card {
		-webkit-border-radius:.5em;
		-moz-border-radius:.5em;
		border-radius:.5em;
		-webkit-box-shadow:none !important;
		-moz-box-shadow:none !important;
		box-shadow:none !important;
	}
}
/* iPhone [portrait] WINDOW SIZE */
@media all and (max-width: 480px) {
	.board .slot { padding:.13em .25em; }
	.board .card {
		-webkit-border-radius:.5em;
		-moz-border-radius:.5em;
		border-radius:.5em;
		-webkit-box-shadow:none !important;
		-moz-box-shadow:none !important;
		box-shadow:none !important;
	}
}
/* iPhone [landscape] WINDOW SIZE */
@media all and (max-height:480px) {
	.board .slot { padding:.13em .25em; }
	.board .card {
		-webkit-border-radius:.5em;
		-moz-border-radius:.5em;
		border-radius:.5em;
		-webkit-box-shadow:none !important;
		-moz-box-shadow:none !important;
		box-shadow:none !important;
	}
}

@media all and (orientation:portrait) {
	.card canvas {
		width:100%;
		height:auto;
		-webkit-transform: rotate(0deg);
		-moz-transform: rotate(0deg);
		-ms-transform: rotate(0deg);
		-o-transform: rotate(0deg);
		transform: rotate(0deg);
	}
}
@media all and (orientation:landscape) {
	.card canvas {
		width:auto;
		height:100%;
		-webkit-transform: rotate(-90deg);
		-moz-transform: rotate(-90deg);
		-ms-transform: rotate(-90deg);
		-o-transform: rotate(-90deg);
		transform: rotate(-90deg);
	}
}
