*, *:before, *:after {
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}
html, body {
	background-color: black;
	width: 100%;
	height: 100%;
}
body {
	margin: 0;
	padding: 0;
	line-height: 0;
	font-size: 0;
	overflow: hidden;
}
canvas {
	cursor: pointer;
	position: relative;
}
html.drawing canvas {
	cursor: crosshair;
}

html.music-playing canvas,
html.prompt-open canvas,
html.menu-open canvas {
	cursor: default;
}

#label {
	position: fixed;
	z-index: 999;
	left: 0;
	top: 0;
	background: white;
	color: black;
	font-family: monospace;
	font-size: 12px;
	line-height: 1;
	padding: 5px 10px;
	width: auto;
}

a[rel="license"],
.visuallyhidden {
	border: 0 !important;
	clip: rect(0 0 0 0) !important;
	height: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	width: 1px !important;
}

.button,
button {
	text-decoration: none;
	border-radius: 0;
	background: none;
	background-color: transparent;
	border: none;
	text-align: center;
	cursor: pointer;
	padding: 0;
}

#menu_btn {
	position: fixed;
	right: 0;
	top: 0;
	z-index: 998;
	width: 60px;
	height: 60px;
	-webkit-transition: background-color 0.3s, opacity 0.3s;
	transition: background-color 0.3s, opacity 0.3s;
}

/*
html.iframed #menu_btn {
	display: none !important;
	pointer-events: none !important;
}
*/
html.iframed button[id*="save"],
html.iframed .button[id*="save"] {
	display: none !important;
	pointer-events: none !important;
}


#menu_btn .icon {
	display: inline-block;
	position: relative;
}
#menu_btn .icon:before,
#menu_btn .icon:after {
	content: ' ';
	display: block;
	position: absolute;
	-webkit-transition: background-color 0.2s, border-color 0.2s;
	transition: background-color 0.2s, border-color 0.2s;
}


#menu_btn[aria-expanded="false"] {
	cursor: context-menu;
	background-color: white;
	opacity: 0;
}
#menu_btn[aria-expanded="false"]:hover {
	background-color: white;
	opacity: 1;
}
#menu_btn[aria-expanded="false"] .icon {
	width: 35px;
	height: 38px;
}
#menu_btn[aria-expanded="false"] .icon:before,
#menu_btn[aria-expanded="false"] .icon:after {
	background-color: transparent;
	width: 100%;
}
#menu_btn[aria-expanded="false"] .icon:before {
	left: 0;
	top: 5px;
	height: 30px;
	border-top: 2px solid black;
	border-bottom: 2px solid black;
}
#menu_btn[aria-expanded="false"] .icon:after {
	left: 0;
	top: 11px;
	height: 10px;
	border-bottom: 2px solid black;
}



#menu_btn[aria-expanded="true"] {
	background-color: white;
	cursor: pointer;
}
#menu_btn[aria-expanded="true"]:hover,
#menu_btn[aria-expanded="true"]:active {
	background-color: black;
}
#menu_btn[aria-expanded="true"] .icon {
	width: 38px;
	height: 38px;
}
#menu_btn[aria-expanded="true"] .icon:before,
#menu_btn[aria-expanded="true"] .icon:after {
	left: 18px;
	top: -5px;
	height: 52px;
	width: 2px;
	background-color: black;
}
#menu_btn[aria-expanded="true"] .icon:before {
	-webkit-transform: rotate(45deg);
	transform: rotate(45deg);
}
#menu_btn[aria-expanded="true"] .icon:after {
	-webkit-transform: rotate(-45deg);
	transform: rotate(-45deg);
}
#menu_btn[aria-expanded="true"]:hover .icon:before,
#menu_btn[aria-expanded="true"]:hover .icon:after,
#menu_btn[aria-expanded="true"]:active .icon:before,
#menu_btn[aria-expanded="true"]:active .icon:after {
	background: white;
}


#menu {
	position: fixed;
	left: 50%;
	top: 50%;
	-webkit-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
	text-align: center;
	z-index: 999;
	background: white;

	list-style: none;
	margin: 0;
	padding: 0;
	-webkit-box-shadow: 5px 5px 40px 0 rgba(0,0,0,0.3);
	box-shadow: 5px 5px 40px 0 rgba(0,0,0,0.3);

	-webkit-transition: opacity 0.2s, margin 0.2s;

	transition: opacity 0.2s, margin 0.2s;
}
#menu_btn[aria-expanded="false"] ~ #menu {
	opacity: 0;
	margin-top: 20px;
	pointer-events: none;
}

#menu li {
	display: block;
}

#menu li:not(:last-child) {
	border-bottom: 2px solid lightgrey;
}

#menu button,
#menu .button {
	width: 100%;
	text-align: center;
	font-family: monospace;
	color: black;
	background: white;
	font-size: 14px;
	padding: 10px 20px;
	-webkit-transition: background-color 0.2s, color 0.2s;
	transition: background-color 0.2s, color 0.2s;
}
#menu button:hover,
#menu button:active,
#menu .button:hover,
#menu .button:active {
	color: white;
	background: black;
}
#menu button.disabled,
#menu button[disabled],
#menu .button.disabled {
	color: #9f9e9e;
	cursor: default;
	pointer-events: none;
}


#prompt {
	position: fixed;
	left: 50%;
	top: 50%;
	-webkit-transform: translate(-50%,-50%);
	transform: translate(-50%,-50%);
	border-radius: 10px;
	background: white;
	z-index: 999;
	width: 260px;

	-webkit-box-shadow: 5px 5px 40px 0 rgba(0,0,0,0.3);

	box-shadow: 5px 5px 40px 0 rgba(0,0,0,0.3);
	-webkit-transition: opacity 0.2s, margin 0.2s;
	transition: opacity 0.2s, margin 0.2s;
}
#prompt:not(.active) {
	opacity: 0;
	margin-top: 20px;
	pointer-events: none;
}

#prompt figure {
	width: 100%;
	margin: 0;
	text-align: center;
	padding: 20px;
}

#prompt img {
	width: 30%;
	height: auto;
	display: inline-block;
}

#prompt div {
	font-size: 12px;
	padding: 0 20px 20px;
	text-align: center;
	line-height: 1.3;
	font-family: monospace;
	color: black;
}

#prompt button,
#prompt .button {
	display: block;
	text-align: center;
	width: 100%;
	font-family: monospace;
	font-size: 14px;
	padding: 10px 20px;
	border-top: 1px solid lightgrey;
	-webkit-transition: background-color 0.2s, color 0.2s;
	transition: background-color 0.2s, color 0.2s;
}
#prompt button:last-child,
#prompt .button:last-child {
	border-bottom-left-radius: 10px;
	border-bottom-right-radius: 10px;
}

#prompt button:hover,
#prompt button:active,
#prompt .button:hover,
#prompt .button:active {
	color: white;
	background: black;
}


#picker_dialog {
	position: fixed;
	z-index: 999;
	left: 0;
	top: 0;
	background-color: white;
	padding: 4px;
	-webkit-box-shadow: 5px 5px 40px 0 rgba(0,0,0,0.3);
	box-shadow: 5px 5px 40px 0 rgba(0,0,0,0.3);
}
#picker_dialog:not(.active) {
	display: none;
	pointer-events: none;
}

#picker {
	padding: 20px 10px 0;
}

#picker_handle {
	display: block;
	height: 30px;
	background-color: #ccc;
	cursor: -webkit-grab;
	cursor: grab;
}

#picker_actions {
	width: 100%;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: horizontal;
	-webkit-box-direction: normal;
	-ms-flex-direction: row;
	flex-direction: row;
	-webkit-box-align: start;
	-ms-flex-align: start;
	align-items: flex-start;
	-webkit-box-pack: stretch;
	-ms-flex-pack: stretch;
	justify-content: stretch;
	padding-top: 20px;
}

#picker_actions button,
#picker_actions .button {
	display: inline-block;
	text-align: center;
	width: 100%;
	font-family: monospace;
	font-size: 14px;
	padding: 10px 20px;
	-webkit-transition: background-color 0.2s, color 0.2s;
	transition: background-color 0.2s, color 0.2s;
}
#picker_actions button:hover,
#picker_actions button:active,
#picker_actions .button:hover,
#picker_actions .button:active {
	color: white;
	background: black;
}


.icon-menu,
.menu {
	position: fixed;
	z-index: 999;
	right: 20px;
	top: 20px;
}
.menu:not(.active) {
	display: none;
}
html:not(.ready) .icon-menu {
	display: none;
}

.icon-menu {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	transition: opacity 0.2s linear;
}
.icon-menu button,
.icon-menu .button {
	pointer-events: none;
}
html.menu-reveal:not(.menu-open) .icon-menu,
html:not(.menu-open) .icon-menu:hover {
	opacity: 1;
}
html.menu-reveal:not(.menu-open) .icon-menu button,
html:not(.menu-open) .icon-menu:hover button,
html.menu-reveal:not(.menu-open) .icon-menu .button,
html:not(.menu-open) .icon-menu:hover .button {
	pointer-events: all;
}

.icon-menu li:not(:last-child) {
	margin-bottom: 10px;
}
.icon-menu button,
.icon-menu .button {
	background-color: white;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	-webkit-transition: -webkit-transform 0.2s;
	transition: -webkit-transform 0.2s;
	transition: transform 0.2s;
	transition: transform 0.2s, -webkit-transform 0.2s;
	-webkit-transform: scale(0.9);
	transform: scale(0.9);
	-webkit-transform-style: preserve-3d;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
.icon-menu button:hover,
.icon-menu .button:hover {
	-webkit-transform: scale(1);
	transform: scale(1);
}
.icon-menu button .sprite,
.icon-menu .button .sprite {
	width: 26px;
	height: 26px;
	-webkit-transform-style: preserve-3d;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

.menu {
	background-color: white;
	color: black;
	padding: 20px;
	width: 240px;
	max-width: calc(100% - 40px);
}
.menu-close {
	position: absolute;
	right: 10px;
	top: 10px;
	cursor: pointer;
}
.menu-close .icon {
	display: block;
	width: 20px;
	height: 20px;
}
.menu-close .icon:before,
.menu-close .icon:after {
	content: ' ';
	display: block;
	position: absolute;
	left: 9px;
	top: -2px;
	height: 22px;
	width: 2px;
	background-color: black;
}
.menu-close .icon:before {
	-webkit-transform: rotate(45deg);
	transform: rotate(45deg);
}
.menu-close .icon:after {
	-webkit-transform: rotate(-45deg);
	transform: rotate(-45deg);
}


.menu-title {
	font-family: monospace;
	font-weight: normal;
	text-transform: uppercase;
	font-size: 16px;
	letter-spacing: 1px;
	margin: 0 10px 15px 30px;
}
.menu-title .sprite {
	margin-right: 6px;
	width: 20px;
	height: 20px;
}
.menu-title .sprite--mixer {
	width: 24px;
	height: 24px;
}
.icon-menu ul,
.menu ul {
	padding: 0;
	list-style: none;
	margin: 0;
}
.icon-menu li:not(:last-child),
.icon-menu .menu-form-row:not(:last-child),
.menu li:not(:last-child),
.menu .menu-form-row:not(:last-child) {
	margin-bottom: 10px;
}
.menu ul button,
.menu ul .button,
.menu select {
	cursor: pointer;
	font-family: monospace;
	font-weight: normal;
	font-size: 13px;
	background: white;
	color: black;
	border: 1px solid black;
	width: calc(100% - 28px);
	display: inline-block;
	line-height: 30px;
	height: 30px;
	padding: 0 10px;
	text-align: left;
	cursor: pointer;
}
.menu ul button:hover,
.menu ul button:active,
.menu ul .button:hover,
.menu ul .button:active,
.menu select:hover {
	background: black;
	color: white;
}
.menu .menu-form-row .sprite,
.menu ul .sprite {
	width: 18px;
	height: 18px;
	margin-right: 10px;
	top: -4px;
}
.menu .menu-form-row label {
	pointer-events: none;
}

.sprite {
	display: inline-block;
	line-height: 1;
	position: relative;
	vertical-align: middle;
	zoom: 1;
	font-style: normal;
	font-weight: normal;
	text-align: center;
	width: 16px;
	height: 16px;
	top: -1px;
	overflow: hidden;
	text-indent: -9999px;
	position: relative;
	display: inline-block;
	top: auto;
	background-repeat: no-repeat;
	background-size: contain;
	background-position: 50%;
	max-width: 100%;
}

.sprite:not(.img-sprite) {
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-position: 50%;
	mask-position: 50%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.sprite:before {
	content: "";
	display: block;
	width: 0;
	height: 100%;
}

a.sprite,
a.ico,
button.sprite,
button.ico,
.button.sprite,
.button.ico {
	padding: 0;
	border: none;
	background-color: transparent;
	text-indent: -9999px;
	outline: none;
}

a.sprite:focus,
a.ico:focus,
button.sprite:focus,
button.ico:focus,
.button.sprite:focus,
.button.ico:focus,
a.sprite:active,
a.ico:active,
button.sprite:active,
button.ico:active,
.button.sprite:active,
.button.ico:active {
	outline: none;
}

a.sprite:hover,
a.ico:hover,
button.sprite:hover,
button.ico:hover,
.button.sprite:hover,
.button.ico:hover {
	background-color: transparent;
}
