@keyframes roll {
	0% {opacity:0; transform:scale(1.5);}
	50% {transform:scale(1.25) rotate(180deg);}
	100% {opacity:1; transform:scale(1) rotate(360deg);}
}
/*
.number {
	background-color: #ffffff;
	color: var(--green);
	border-radius: 50%;
	background-image: radial-gradient(circle at top left, white 35%, var(--yellow));
	box-shadow: 2px 2px 10px 5px rgba(0,0,0,0.3);
}
*/
:root {
	--dark: #212121;
	--light: #cccccc;
	--yellow: #ffff66;
	--green: #04aa6d;
}
* {
	border: 0;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	font-family: Arial, sans-serif;
	font-size: 16px;
	font-weight: normal;
	line-height: 1.4;
	background-color: #ffffff;
	color: #666666;
	text-align: center;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
}
header, section, footer p {
	margin: 2em 1em;
}
header {
	margin-top: 0.5em;
}

footer {
	background-color: var(--dark);
	color: var(--light);
	padding: 1px 0; /*otherwise margin of <p> moves footer*/
}
a {
	text-decoration: none;
}
#top {
	text-align:left;
	position: relative;
	margin-bottom: 1.5em;
}
#install {
	position: absolute;
	top:0;
	right:0;
	visibility: hidden;
}
#icon {
	border-radius: 0.5em;
	vertical-align: middle;
	margin-right: 0.5em;
}
#ndx {
	color: var(--green);
	font-size: 1.5em;
	vertical-align: middle;
}
h1 {
	font-size: 1em;
	color: var(--dark);
}
#draw {
	position: relative;
	display: grid;
	gap: 1em 1em;
	justify-items: stretch;
	align-items: stretch;
	justify-content: center;
	align-content: center;
	background-color: var(--green);
	border-radius: 2em;
	background-image: linear-gradient(rgba(0,0,0,0.3), var(--green)), url(waves2.svg);
	background-size: cover, cover;
	background-position: center, center;
	background-repeat: no-repeat, no-repeat;
	padding: 3em 1em;
	margin-bottom: 3em;
	box-shadow: 2px 2px 15px 0 rgba(0,0,0,0.3);
}
#draw::after {
	position: absolute;
	bottom: -2em;
	left: calc(50% - 1em);
	content: ' ';
	width: 1px;
	height: 1px;
	border-top: 1em solid var(--green);
	border-left: 1em solid transparent;
	border-right: 1em solid transparent;
	border-bottom: 1em solid transparent;
}
.number {
	display: inline-block;
	background-color: #ffffff;
	color: var(--green);
	border-radius: 50%;
	background-image: radial-gradient(circle at top left, white 35%, var(--yellow));
	box-shadow: 2px 2px 10px 5px rgba(0,0,0,0.3);
}
.number {
	font-size: 2em;
	line-height: 4rem; /* same as grid-template-columns or - rows! */
	cursor: pointer;
}
.number:nth-child(2) {
	position: relative;
	top: -1.5rem;
}
.number:nth-last-child(2) {
	position: relative;
	top: 1.5rem;
}
.fixed {
	transform: scale(0.9);
	background-image: radial-gradient(white 30%, var(--light) 95%);
	color: var(--light);
}
.animate {
	animation-name: roll;
	/* animation-delay: 0; */
	animation-duration: 0.5s;
	animation-iteration-count: 1;
	animation-direction: normal;
	animation-timing-function: linear;
	animation-fill-mode: backwards;
	
}
.smaller {
	font-size: 0.875em;
}
button {
	display: inline-block;
	background-color: var(--yellow);
	color: var(--dark);
	/* font-size: 0.75em; */
	border-radius: 1em;
	padding: 0.5em 1em;
	text-align: center;
	margin-right: 0.5em;
	margin-bottom: 1em;
	box-shadow: 2px 2px 10px 0px var(--light);
	cursor: pointer;
}
button:disabled {
	opacity: 0.5;
}
.yellow {
	color: var(--yellow);
}
.white {
	color: #ffffff;
}
.mini {
	height:14px;
	vertical-align:middle;
}
#savedDraws {
	display: none;
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: #ffffff;
	border-radius: 1em;
	box-shadow: -5px -5px 20px 0 rgba(0,0,0,0.5);
	text-align: left;
	overflow: auto;
	transform: scale(0.5) translateY(2em);
	opacity: 0;
	transition: all 0.5s;
}
#title {
	background-color: var(--dark);
	color: var(--light);
	padding: 1em;
	line-height: 1;
}
#close {
	position: absolute;
	right: 1rem;
	top: 0.5rem;
	font-size: 2em;
	color: inherit;
}
#draws {
	/* padding: 1em; */
}
.savedDraw {
	padding-bottom: 0.5em;
	border-bottom: 1px solid var(--light);
	margin: 0.5em 1em;
}
.savedDraw * {
	vertical-align: middle;
}
.date {
	display: block;
}
.smallNumber {
	display: inline-block;
	width: 2em;
	height: 2em;
	line-height: 2em;
	border-radius: 50%;
	text-align: center;
	background-color: var(--green);
	color: var(--yellow);
}
.deleteDraw {
	font-size: 2em;
	line-height: 1;
	color: red;
	float: right;
}
.share {
	width: 2.5em;
	height: 2.5em;
	margin: 0 0.1em;
}
#cover, #afterInstall {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	background-color: var(--green);
	color: #ffffff;
	padding: 2em;
}
#afterInstall {
	display: none;
	overflow:auto;
}
@media only screen and (orientation: portrait) {
	body {
		min-width: 22.5em; /*360px*/
	}
	#draw {
		grid-template-columns: repeat(3, 4em);
		grid-template-rows: repeat(2, 4em);
		width: 18em;
		margin-left: auto;
		margin-right: auto;
	}
}

@media only screen and (orientation: landscape) {
	body {
		min-width: 37.5em; /*600px*/
	}
	#draw {
		grid-template-columns: repeat(6, 4em);
		grid-template-rows: repeat(1, 4em);
		width: 33em;
		margin-left: auto;
		margin-right: auto;
	}

}