* {
	padding: 0;
	margin: 0;
	font-family: monospace;
}

body {
	overflow: hidden;
	position: relative;
	-webkit-overflow-scrolling: touch;
}

.eyedropper {
	cursor: url(http://www.rw-designer.com/cursor-extern.php?id=119713) 2 2, auto;
}

#rule-wrapper {
  padding-top: 18px;
}

#rule-wrapper p {
  background-color: #f2f7fe;
  border: 2px solid #dfe6ef;
  border-radius: 7px;
  text-align: left;
  height: 40px;
  align-content: center;
  padding-left: 15px;
}

#rule-alert {
  font-style: italic;
  font-size: 12px;
}

#viewport-canvas {
	position: absolute;
	top: 0;
	left: 0;
	image-rendering: pixelated;
	width: 100vw;
	height: 100vh;
	background-color: #e0e0e0;
}

#ui-wrapper {
	position: fixed;
	bottom: top;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #ffffff;
	transition: background 1s;
}

#ui-wrapper>#color-wrapper,
#zoom-wrapper {
	visibility: hidden;
}


#ui-wrapper[hide=true] {
	pointer-events: none;
	background: none;
}

#ui-wrapper[hide=true]>#color-wrapper,
#zoom-wrapper {
	visibility: visible;
}


#color-swatch {
	width: 30px;
	height: 30px;
	background-color: #000000;
	position: absolute;
}

#color-field {
	font-size: 16px;
	height: 30px;
	padding: 1px;
	border: none;
	outline: none;
	pointer-events: all;
}

#loading-p {
	position: absolute;
	top: 50%;
	left: 50%;
	font-size: 1.4em;
	transform: translate(-50%, -50%);
}

#paint-wrapper {
	height: 100%;
	display: flex;
    align-items: flex-end;
    justify-content: center;
}

#paint-icon {
	width: 26px;
	height: 26px;
	margin-right: 8px;
	pointer-events: none;
	user-select: none;
}

.paint-button {
	font-weight: 600;
	background-color: oklch(0.5686 0.255 257.57);
	color: white;
	border: none;
	border-radius: 50px;
	cursor: pointer;
	pointer-events: all;
	user-select: none;
	display: flex;
	gap: 8px;
	align-items: center;
	z-index: 900;
}

@media screen and (max-width: 600px) {
  #eyedropper-button {
   display: none;
  }
  
  #rule-wrapper p {
  font-size:12px;
  }
  
	#account-wrapper {
		font-size: 14px;
		padding: 6px 12px;
		top: 40px;
		right: 8px;
	}
	
	#help-button {
		top: 40px;
	}

	#utility-buttons {
		margin-bottom: 6px;
	}
	.paint-button {
		font-size: 20px;
		padding: 8px 20px;
		margin-bottom: 10px;
	}
	#paint-popup {
		height: 40%;
		padding: 15px;
	}
	#color-palette-list {
		gap: 3px;
		justify-content: center;
	}
	.palette-swatch {
    	width: calc(100% / 9);
		border-radius: 5px;
		border: 1px solid #ccc;
		height: 1.2em;
	}
}
@media screen and (min-width: 600px) {
	#account-wrapper {
		padding: 10px 20px;
		font-size: 18px;
		top: 10px;
		right: 16px;
	}
	
	#rule-wrapper p {
  font-size:17px;
  }
  
	#help-button {
		top: 10px;
	}
	#utility-buttons {
  		margin-bottom: 12px;
	}
	.paint-button {
		padding: 10px 30px;
		font-size: 26px;
		margin-bottom: 16px;
	}
	#paint-popup {
		height: 35%;
		padding: 20px;
	}
	#color-palette-list {
		gap: 8px;
		justify-content: left;
	}
	.palette-swatch {
		width: calc(100% / 29);
		border: 2px solid #ccc;
		border-radius: 8px;
		height: 2em;
	}
}

#paint-popup {
	font-size: 16px;
	position: absolute;
	z-index: 800;
    width: 100%;
    width: -moz-available;          /* WebKit-based browsers will ignore this. */
    width: -webkit-fill-available;  /* Mozilla-based browsers will ignore this. */
    width: fill-available;
	bottom: 0;
	border-top-left-radius: 50px;
	border-top-right-radius: 50px;
	background-color: #ffffff;
	border: 2px solid oklch(0.5686 0.255 257.57 / 50%);
	text-align: center;
	pointer-events: all;
}

#color-wrapper {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	margin-bottom: 10px;
}

#color-palette-list {
	display: flex;
	flex-direction: row;
	align-items: center;
	margin-bottom: 10px;
	flex-wrap: wrap;
  	width: 100%;
}
.palette-swatch {
    cursor: pointer;
	pointer-events: all;
}

.palette-swatch.active {
    border: 2px solid #333;
}

#zoom-wrapper {
	position: absolute;
	top: 90px;
	left: 16px;
	display: flex;
	flex-direction: column-reverse;
	gap: 10px;
}

.zoom-button {
	width: 40px;
	height: 40px;
	border: none;
	background: none;
	outline: none;
	background-color: red;
	font-size: 24px;
	background-color: #ffffff;
	border: 2px solid oklch(0.5686 0.255 257.57 / 50%);
	border-radius: 50%;	
	cursor: pointer;
	pointer-events: all;
	user-select: none;
	padding-bottom: 3px;
}

#help-button {
	left: 16px;
  width: 40px;
  height: 40px;
	padding: 7px;
	position: absolute;
	z-index: 900;
	background-color: #ffffff;
	border: 2px solid oklch(0.5686 0.255 257.57 / 50%);
	border-radius: 50%;	
	cursor: pointer;
}

#help-icon {
	width: 20px;
	height: 20px;
	pointer-events: none;
	user-select: none;
}

#help-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	min-height: 100vh;
	width: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 900;
	pointer-events: all;
}

#help-popup {
	font-size: 16px;
	z-index: 1000;
	width: 800px;
	max-width: calc(100vw - 60px);
	padding: 20px;
	background-color: #ffffff;
	border-radius: 50px;
	border: 2px solid oklch(0.5686 0.255 257.57 / 50%);
}

#close-help-popup {
	font-size: inherit;
	text-decoration: underline;
	cursor: pointer;
	background: none;
	border: none;
}

#help-text-mobile {
	display: none;
}

@media (hover: none) {
	#help-text-desktop {
		display: none;
	}

	#help-text-mobile {
		display: inline;
	}
}

#account-wrapper {
	position: absolute;
	background-color: #ffffff;
	border: 2px solid oklch(0.5686 0.255 257.57 / 50%);
	border-radius: 50px;
	font-weight: 600;
	color: oklch(0.5686 0.255 257.57);
	user-select: none;
	pointer-events: none;
}

#utility-buttons {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: flex-end;
}

.utility-button {
	width: 30px;
	height: 30px;
	background-color: #ffffff;
	border: 2px solid oklch(0.5686 0.255 257.57 / 50%);
	border-radius: 50%;	
	cursor: pointer;
	padding: 7px;
	pointer-events: all;
}

.utility-icon {
	width: 100%;
	height: 100%;
	pointer-events: none;
	user-select: none;
}
