:root {
	--background-color: #21272B;
	--theme-color: #080;
}

html {
	background-color: var(--background-color);
	height: 100vh;
}

html.offline {
	--background-color: #2B2127;
	--theme-color: #C00;
}

html.amoled {
	--background-color: #000;
}

body {
	color: #FFF;
	background-color: inherit;
	font-family: sans-serif;
	font-size: 12pt;
	margin: 0;
	padding: 0;
	height: 100vh;
	cursor: default;

/* Turn off pan-to-refresh */
	overscroll-behavior-y: contain;

	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	-o-user-select: none;
	user-select: none;
}

body * {
	color: inherit;
	font-family: inherit;
	text-decoration: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

h1 {
	text-align: center;
}
/*
h1 > .logo {
	width: 100%;
	max-width: 15em;
}
*/
.container {
	background-color: inherit;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	flex: 0 1 0;
	max-height: 100%;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

.container header {
	color: #FFF;
	background-color: rgba(255,255,255,.15);
	display: flex;
	align-items: center;
	position: relative;
	box-shadow: 0 0 0 1px var(--background-color);
}

.container header > .icon {
	padding: .75em .75em .75em 1.5em;
	display: flex;
	justify-content: center;
	width: 1.5em;
	height: 1.5em;
	box-sizing: content-box;
}

.container header > .control {
	display: inline-flex;
	align-items: center;
}

.container header > .control > button {
	color: #062E6F;
	background: #A8C7FA;
	border: none;
	border-radius: 2em;
	font-family: inherit;
	font-size: 90%;
	padding: .5em 1em;
}

html.offline .container header > .control > button {
	display: none;
}

.container header > .control > label {
	padding: 1em 1em 1em 1.25em;
	display: inline-flex;
	justify-content: center;
	width: 1.25em;
	height: 1.25em;
	box-sizing: content-box;
}

.container header > .control > ul {
	background: #666;
	border-radius: .25em;
	white-space: nowrap;
	list-style: none;
	padding: .5em 0;
	display: none;
	position: absolute;
	top: 1em;
	right: 1em;
}

html.amoled .container header > .control > ul {
	background: #444;
}

.container header > .control > input[type="checkbox"] {
	width: 0;
	height: 0;
	position: fixed;
	opacity: 0;
}

.container header > .control > input[type="checkbox"]:checked + label:after {
	content: '';
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1;
}

.container header > .control > input[type="checkbox"]:checked + label + ul {
	display: block;
	z-index: 1;
}

.container header > .control > ul > li > a {
	padding: .5em 1.25em;
	display: block;
}

html.offline .container header > .control > ul > li > a.edit {
	display: none;
}

.container header > .control > ul > li > a:active {
	background-color: rgba(255,255,255,.1);
	transition: background-color 450ms 50ms;
}

.container header > * svg {
	width: 100%;
	fill: currentColor;
}

.container header > h1 {
	font-size: 130%;
	font-weight: 400;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: .5em;
	flex: 1 1 0;
}

.container main {
	background-color: inherit;
	overflow: auto;
	flex: 1 1 0;
}

.container > input[type="checkbox"] {
	display: none;
}

.container > aside {
	color: #FFF;
	background-color: inherit;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: 100%;
	position: fixed;
	top: 0;
	left: 100%;
	bottom: 0;
	z-index: 1;
	box-shadow: -100vw 0 0 0 transparent;
	transition: left 300ms, box-shadow 300ms ease-out;
	pointer-events: none;
}

.container > input[type="checkbox"]:checked + aside {
	box-shadow: -100vw 0 0 0 var(--background-color);
	left: 0;
	pointer-events: auto;
}

.container > aside ~ aside {
	opacity: 0;
	box-shadow: none;
	transform: scale(.9);
	transition: none;
	pointer-events: none;
}

.container > aside ~ aside:before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	box-shadow: 0 0 0 100vmax #000;
}

.container > aside ~ input[type="checkbox"]:checked + aside {
	left: 0;
	opacity: 1;
	box-shadow: none;
	transform: scale(1);
	transition: opacity 300ms ease-in-out, transform 300ms ease-in-out;
	pointer-events: auto;
}
/*
.login {
	background: #33A945;
	text-align: center;
	padding: 1em 0;
	border-radius: 1em;
}

.login > * {
	margin: 2em 1em;
}

.login input {
	color: #FFF;
	background-color: transparent;
	border: 1px rgba(255,255,255,.25) solid;
	border-radius: .25em;
	outline: none;
	padding: .5em 1em;
	box-shadow: none;
	width: 100%;
}

.login button {
	color: #000;
	background-color: #FFF;
	border: none;
	border-radius: .25em;
	outline: none;
	padding: .5em 1em;
	box-shadow: none;
}
*/
.menu {
	color: #FFF;
	background-color: inherit;
}

@property --item-bg-pos {
	syntax: '<percentage>';
	initial-value: 30%;
	inherits: false;
}

@property --item-bg-color {
	syntax: "<color>";
	initial-value: transparent;
	inherits: false;
}

.menu > .item {
	background-color: inherit;
	background-image: linear-gradient(90deg, transparent var(--item-bg-pos), var(--item-bg-color) var(--item-bg-pos), var(--item-bg-color) calc(100% - var(--item-bg-pos)), transparent calc(100% - var(--item-bg-pos)));
	display: flex;
	transition: --item-bg-pos 220ms ease-in-out, --item-bg-color 200ms ease-in-out;
	pointer-events: none;
}

.menu > .item:active {
	--item-bg-pos: 0%;
	--item-bg-color: rgba(255,255,255,.1);
}

.menu > .item > * {
	padding: 1em;
	align-content: center;
}

.menu > .item > span {
	pointer-events: auto;
}

.menu > .item > *:not(span) {
	background-color: inherit;
}

.menu > .item > .icon {
	color: #000;
	text-align: center;
}

.menu > .item > .icon > .shape {
	background-color: var(--theme-color);
	border-radius: 1.25em;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5em;
	height: 2.5em;
}

.menu > .item > .icon > .shape > * {
	font-size: 150%;
	font-weight: 500;
	display: flex;
	justify-content: center;
}

.menu > .item > .icon > .shape > img {
	width: 60%;
}

.menu > .item > .icon + .title {
	padding-left: 0;
}

.menu > .item > .title {
	flex: 1 1 0;
}

.menu > .item > .title > * {
	display: block;
}

.menu > .item > .title > strong {
	font-size: 105%;
	font-weight: 400;
}

.menu > .item > .title > span {
	font-size: 90%;
	opacity: .6;
}

.menu > .item > .control {
	position: relative;
}

.menu > a.item > label.control {
	padding-left: 1.25em;
}

.menu > a.item > label.control:after {
	content: '';
	border-left: 1px rgba(255,255,255,.5) solid;
	position: absolute;
	top: .75em;
	left: 0;
	bottom: .75em;
}

.menu > .item > .control > input[type="checkbox"] {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	opacity: 0;
	pointer-events: auto;
}

.menu > .item > .control > input[type="checkbox"] + i {
	background-color: rgba(255,255,255,.25);
	border-radius: .5em;
	margin: .125em;
	display: block;
	width: 2em;
	height: 1em;
	position: relative;
	transition: all 200ms;
}

.menu > .item > .control > input[type="checkbox"] + i:after {
	content: '';
	background-color: rgb(192,192,192);
	border-radius: .75em;
	display: block;
	width: 1.25em;
	height: 1.25em;
	position: absolute;
	top: -.125em;
	left: -.125em;
	transition: all 200ms;
}

.menu > .item > .control > input[type="checkbox"]:checked + i {
	background-color: rgba(0,255,255,.25);
}

.menu > .item > .control > input[type="checkbox"]:checked + i:after {
	background-color: rgb(0,192,192);
	left: 1em;
}

.menu > hr {
	border: none;
	border-top: 1px rgba(255,255,255,.25) solid;
}

.form {
	padding: 0 1.5em;
	position: relative;
	z-index: 0;
}

.input {
	background-color: inherit;
	margin: 2em 0;
}

.input.text > div {
	padding-top: .5em;
	position: relative;
}

.input.text input,
.input.text textarea {
	background-color: transparent;
	border: none;
	outline: none;
	font: inherit;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: .5em 1em 1em 1em;
	width: calc(100% - 2px);
	position: relative;
	left: 1px;
	box-shadow: none;
}

.input.text textarea {
	resize: vertical;
}

.input.text textarea.autoresize {
	height: 2.59427em;
	resize: none;
}

.input.text input + div,
.input.text textarea + div {
	border: 1px rgba(255,255,255,.6) solid;
	border-radius: .25em;
	display: inline-block;
	max-width: 100%;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: -1;
	transition: all 200ms ease-in-out;
}

.input.text input + div:before,
.input.text textarea + div:before {
	content: attr(data-placeholder);
	color: rgba(255,255,255,.6);
	background-color: transparent;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 0 .25em;
	position: absolute;
	top: 1em;
	left: .75em;
	transform-origin: left center;
	transition: all 200ms ease-in-out;
}

.input.text input:focus + div,
.input.text textarea:focus + div {
	border-color: #A8C7FA;
	box-shadow: 0 0 0 1px #A8C7FA inset;
}

.input.text input:not(:placeholder-shown) + [data-placeholder]:before,
.input.text textarea:not(:placeholder-shown) + [data-placeholder]:before,
.input.text input:focus + [data-placeholder]:before,
.input.text textarea:focus + [data-placeholder]:before {
	background-color: var(--background-color);
	font-size: 90%;
	top: -2px;
	left: .875em;
	z-index: 0;
	transform: translateY(-50%);
}

.input.text input:focus + [data-placeholder]:before,
.input.text textarea:focus + [data-placeholder]:before {
	color: #A8C7FA;
}

.input.text input:focus:invalid + div,
.input.text textarea:focus:invalid + div {
	border-color: #F88;
	box-shadow: 0 0 0 1px #F88 inset;
}

.input.text input:focus:invalid + [data-placeholder]:before,
.input.text textarea:focus:invalid + [data-placeholder]:before {
	color: #F88;
}

.input.image > .image {
	margin: 0 auto;
	padding-top: 0;
	width: 12.5em;
	height: 12.5em;
	position: relative;
}

.input.image > .image > input {
	border-radius: 12.5em;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	opacity: 0;
}

.input.image > .image > input + div {
	border: 1px rgba(255,255,255,.6) solid;
	border-radius: 12.5em;
	overflow: hidden;
	display: inline-block;
	max-width: 100%;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: -1;
	transition: all 200ms ease-in-out;
}

.input.image > .image > input + div:before {
	content: attr(data-placeholder);
	color: rgba(255,255,255,.6);
	font-size: 400%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 1em;
	position: absolute;
	top: 50%;
	left: 50%;
	transform-origin: left top;
	transform: translate(-50%,-50%);
	transition: all 200ms ease-in-out;
}

.input.image > .image > input:focus + div {
	border-color: #A8C7FA;
	box-shadow: 0 0 0 1px #A8C7FA inset;
}

.input.image > .image > input:focus + [data-placeholder]:before {
	color: #A8C7FA;
}

.input.image > input:not(:checked) + .image > input + [data-placeholder]:before {
	display: none;
}

.input.image > .image > input + div > img {
	border-radius: 12.5em;
	padding: 2px;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.input.image > input {
	position: absolute;
	opacity: 0;
}

.input.image > input:checked + .image > div > img {
	display: none;
}

.input.image > input:not(:checked) + .image + .control > .assign > span {
	display: none;
}

.input.image > input:not(:checked) + .image + .control > .assign:after {
	content: attr(data-alt);
	display: inline-block;
}

.input.image > input:checked + .image + .control > .remove {
	display: none;
}

.input.image > .control {
	text-align: center;
}

.input > .control > * {
	color: #A8C7FA;
	font-size: 90%;
	margin: .25em .5em 0 .5em;
	display: inline-block;
}

.input.image > .control > * {
	margin-top: 1em;
}

.form > .control {
	text-align: center;
}

.form > .control.after {
	text-align: left;
	margin-top: -1.75em;
}

.form > .control.after a {
	color: #A8C7FA;
	font-size: 90%;
	margin: .25em 1em 0 .75em;
	display: inline-block;
}

.form > .control button {
	color: #C2E7FF;
	background: #004A77;
	border: none;
	border-radius: 2em;
	font: inherit;
	margin: 0 2em 2em 2em;
	padding: 1em 2em;
}
