::selection {
	background: #adf;
}

:focus {
	outline: none;
}

html {
	min-height: 100%;
	background-color: #f3f3f5;
	cursor: default;
}

body {
	display: none;
	position: relative;
	max-width: 700px;
	min-height: 300px;
	margin: 0 auto;
	box-shadow: 0 0 4px #999;
	border-top: 0;
	padding: 6px 15px 15px;
	background-color: #fff;
	font: 14px "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif;
}

a {
	text-decoration: none;
	color: #1155ef;
}

a:hover {
	color: #000;
}

.fn {
	float: none;
}

/* http://nicolasgallagher.com/micro-clearfix-hack/ */
.cf::after {
	display: block;
	clear: both;
	content: "";
}

hr {
	border: 1px solid #eee;
	margin: 10px 0;
}

#right-panel {
	position: absolute;
	top: 0;
	left: 100%;
}

#right-panel > aside {
	z-index: -1;
	overflow: hidden;
	position: fixed;
	box-shadow: 2px 2px 2px #ccc;
	max-width: 145px;
	padding: 0 5px 3px 8px;
	background-color: #fff;
	text-align: center;
}

#right-panel > aside, section {
	box-sizing: border-box;
}

.logo {
	display: block;
	width: 128px;
	height: 128px;
	margin-top: 5px;
	border-radius: 10px;
	background: url("../icon.png") no-repeat center;
	transition: box-shadow 0.2s;
}

.logo:hover {
	box-shadow: 0 0 10px #bef;
}

aside > .app-info {
	font-weight: bold;
}

#app-version {
	font-size: 0.8em;
	color: gray;
}

#platform-info {
	font: normal 10px sans-serif;
	color: gray;
}

body > form > section,
.hidden,
body.opera .opera, body.firefox .firefox, body.chrome .chrome,
body.safari .safari, body.maxthon .maxthon {
	display: none;
}

#nav-menu {
	margin-bottom: 20px;
	text-align: center;
}

#nav-menu > a {
	display: inline-block;
	border-bottom: 3px solid transparent;
	margin: 0 2px;
	padding: 5px 6px;
	text-decoration: none;
	transition: border-bottom-color 0.5s;
}

#nav-menu > a:hover {
	border-bottom: 3px solid #aaf;
	color: #000;
	transition: border-bottom-color 0s;
}

#nav-menu > .active {
	border-bottom: 3px solid #000;
	color: #000;
}

.prow {
	clear: both;
	padding-bottom: 3px;
}

.prow, .tiptop {
	position: relative;
}

.tip {
	z-index: 1;
	visibility: hidden;
	overflow: hidden;
	position: absolute;
	left: -48px;
	top: -5px;
	max-width: 100%;
	width: 33px;
	height: 25px;
	border: 1px solid transparent;
	padding: 5px 7px;
	opacity: 0;
	white-space: pre-wrap;
	color: rgba(0, 0, 0, 0);
	font: 12px/150% Verdana, sans-serif;
	transition: visibility 0s 0.5s, opacity 0.5s, color 0.7s;
}

.tip:hover {
	overflow: visible;
	left: -45px;
	width: auto;
	height: auto;
	box-shadow: 0 0 8px #ccc;
	border: 1px solid #ddd;
	border-left: none;
	border-radius: 6px;
	padding: 10px;
	padding-left: 40px;
	background-color: #fff;
	color: #000;
}

.tiptop:hover > .tip:not(:empty) {
	visibility: visible;
	opacity: 1;
	transition-delay: 0s;
}

.tip::before {
	display: inline-block;
	margin-right: 20px;
	border: 3px solid #aaa;
	border-right: none;
	border-radius: 10px 6px 6px 10px;
	padding: 0 6px 2px;
	text-align: center;
	text-shadow: 0 0 3px #000, 0 0 3px #000;
	font: bold 17px Verdana, sans-serif;
	color: #fff;
	content: "?";
}

.tip:hover::before {
	position: absolute;
	top: 5px;
	left: 5px;
}

.prow > label, .prow > span:not(.clean) {
	display: inline-block;
	width: 49.6%;
	box-sizing: border-box;
}

.prow > label {
	padding-top: 8px;
}

label:not(.checkbox):hover, .prow:hover label:not(.checkbox) {
	color: #45f;
}

.prow > span:not(.clean) {
	float: right;
	max-width: 50%;
	margin-top: 4px;
	text-align: right;
}

.prow input[type="text"] {
	width: 300px;
}

.prow select {
	max-width: 308px;
}

.prow input[type="color"] + input[type="text"], .shorter-input {
	width: 242px;
	vertical-align: middle;
}

.prowone > label, .prowone > span {
	width: auto !important;
	padding: 2px 0;
}

.sub-opt {
	padding-left: 20px;
}

input, textarea, select, code, .checkbox {
	box-sizing: border-box;
	margin: 2px;
	border: 1px solid #ddd;
	border-radius: 3px;
	padding: 3px;
	background-color: rgba(242, 242, 242, 0);
	background-image: linear-gradient(to bottom, #fff, #f5f5f5);
	font: 14px Verdana, sans-serif;
	color: #000;
	transition: color 0.2s, border-color 0.2s;
}

pre, code, textarea {
	font: 14px Consolas, Monaco, monospace;
	transition: none;
}

code {
	display: inline-block;
	border: 1px solid silver;
	padding: 3px 5px;
	background-image: linear-gradient(to bottom, #fff, #f5f5f5);
}

select {
	max-width: 100%;
}

textarea {
	overflow-x: hidden;
	box-sizing: border-box;
	width: 100%;
	resize: none;
	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;
}

select:focus, textarea:focus,
input[type="text"]:focus,
input:hover, select:hover, textarea:hover,
.prow:hover input, .prow:hover select,
label:hover input,
.prow:hover .checkbox, label:hover > .checkbox, .checkbox:hover,
.sub-shortcuts > li:hover > input:first-child {
	border: 1px solid #888;
}

input[type="checkbox"] {
	display: none;
}

.checkbox {
	position: relative;
	display: inline-block;
	width: 20px;
	height: 20px;
	padding: 0;
	color: transparent;
	vertical-align: middle;
	user-select: none;
}

.checkbox::after {
	position: absolute;
	left: 3px;
	top: 0;
	font-weight: bold;
	font-family: "Segoe UI Symbol", sans-serif;
	content: "✔";
}

input[type="checkbox"]:checked + .checkbox {
	color: #616161;
}

input[type="number"], input[type="color"] {
	width: 50px;
	text-align: center;
}

input[type="color"] {
	box-sizing: border-box;
	padding: 2px;
	background: none;
	vertical-align: middle;
}

input[type="number"] {
	width: 60px;
	/* Firefox marks "invalid" inputs */
	box-shadow: none;
}

input[type="range"] {
	height: 24px;
	vertical-align: middle;
}

output {
	display: inline-block;
	min-width: 24px;
}

h3 {
	clear: left;
	margin-bottom: 0.5em;
}

.color-helper {
	float: right;
	opacity: 0.3;
	transition: opacity 0.3s;
}

.color-helper:hover {
	opacity: 1;
}

.color-helper > input[type="text"] {
	width: 80px !important;
}

.shortcuts > label {
	display: block;
}

.shortcuts > label:hover input {
	border: 1px solid #aaa;
}

.shortcuts input, .sub-shortcuts input {
	margin: 5px;
	width: 35px;
	text-align: center;
}

.sub-shortcuts input {
	margin: 0 5px 0 0;
}

.sub-shortcuts li {
	line-height: 200%;
}

.op-buttons > button, .action-buttons > span {
	position: relative;
	border: 1px solid #ddd;
	border-radius: 3px;
	background-color: #fff;
	background-image: linear-gradient(to bottom, #fff, #f5f5f5);
	font-weight: bold;
	font-size: 14px;
	cursor: pointer;
	color: #000;
}

.op-buttons > button {
	width: 95%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
	margin-bottom: 10px;
	padding: 10px 0;
	font: bold 14px Arial, serif;
	transition: border-color 0.3s, color 0.3s;
}

.op-buttons > button:hover {
	border: 1px solid #999;
}

.container-info {
	text-align: center;
}

#info-sec > pre {
	white-space: pre-line;
}

#locales-table {
	border-collapse: separate;
	font-family: Consolas, Monaco, monospace;
}

#locales-table > div > span:not(:empty)::before {
	margin: 0 10px;
	content: "\2014";
}

#eximport {
	text-align: center;
}

#eximport > textarea {
	height: 100px;
	resize: vertical;
}

#eximport > button {
	margin: 5px 10px;
	padding: 10px;
	width: auto;
}

.overlay-dim {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding-top: 100px;
	background: rgba(228, 228, 228, 0.7);
	text-align: center;
}

.overlay-dim > div {
	box-shadow: 0 0 50px silver;
	padding: 20px;
	background: #fff;
	white-space: pre-line;
}

.overlay-dim > div > button {
	margin: 0 10%;
	padding: 10px;
	min-width: 50px;
	font-size: 1.5em;
	cursor: pointer;
}

.overlay-dim button.accept {
	color: #0f0;
}

.overlay-dim button.reject {
	color: firebrick;
}

@media (prefers-color-scheme: dark) {
	::selection {
		background: #b49000;
		color: #000;
	}

	html {
		background-color: #262626;
		color: #e5e5e5;
	}

	body {
		background-color: #31302d;
	}

	a {
		color: orange;
	}

	a:hover {
		color: yellow;
	}

	hr {
		border: 1px solid #666;
	}

	#right-panel > aside {
		background-color: #31302d;
	}

	a.logo {
		opacity: 0.8;
	}

	#nav-menu > a:hover {
		color: #fff;
	}

	#nav-menu > .active {
		border-bottom: 3px solid #909;
		color: yellow;
	}

	.tip:hover {
		background-color: #31302d;
		color: #e5e5e5;
		box-shadow: 0 0 10px;
	}

	.tip::before {
		color: #fff;
	}

	label:not(.checkbox):hover, .prow:hover label:not(.checkbox) {
		color: yellow;
	}

	input, textarea, select, code, .checkbox {
		background: #3a3a3a;
		background-image: linear-gradient(to bottom, #404040, #3a3a3a);
		color: #e5e5e5;
	}

	.checkbox {
		color: transparent;
	}

	input[type="checkbox"]:checked + .checkbox {
		color: white;
	}

	.op-buttons > button, .action-buttons > span {
		background-image: linear-gradient(to bottom, silver, silver);
		color: #000;
	}

	.overlay-dim {
		background: rgba(50, 50, 50, 0.7);
	}

	.overlay-dim > div {
		background: #31302d;
	}

	.overlay-dim > div > button {
		background-color: silver;
	}
}
