body {
	cursor: default;
	font-family: sans;
	font-size: 15px;
	margin: 0;
	user-select: none;
}

button, input[type=submit] {cursor: pointer;}

input[type=text], #font {
	border: 1px solid #444;
	border-radius: 3px;
	padding: 0.25em;
}

#content {
	margin: 2.5em auto 1em;
	min-width: 52em;
	position: relative;
	width: max-content;
}



.editbar {
	background-color: #ddd;
	border-radius: 1em;
	height: calc(2em + 2px);
	margin: 0 0 2em 0;
	padding: 0 1em;
}
.editbar span, .editbar div {
	color: #444;
	display: inline-block;
	line-height: 1.6em;
	margin: 1px 2px;
}
.editbar > span {cursor: pointer;}
.editbar > span:hover {color: #3ce;}
.editbar > div {cursor: default;}
.editbar .far, .editbar .fas {
	font-size: 120%;
	vertical-align: middle;
}
.editbar .disabled {
	opacity: 0.25;
	pointer-events: none;
}
.editbar .fa-underline {
	margin-top: 0.05em;
	margin-bottom: -0.05em;
}
.editbar .gap {
	border-left: 1px solid #444;
	cursor: default;
	height: 1em;
	margin: 0 0.5em;
	vertical-align: middle;
	width: 1px;
}
.editbar input[type=checkbox] {display: none;}
.editbar input[type=checkbox]:checked + label {color: #f00;}
/*.editbar .info {float: right;}*/
.editbar .info span {min-width: 3em;}
.editbar .info input[type=text] {vertical-align: middle;}
.editbar .info input[type=text]:disabled {
	background-color: #eee;
	border: none;
	width: 2.5em;
}



input#hex { width: 50em; }

#content .editor {
	margin-bottom: 1em;
	position: relative;
	text-align: right;
}
#content .editor > div {
	display: inline-block;
	margin: 0 1em;
	vertical-align: top;
}

#ascii {
	border: 1px solid #444;
	border-radius: 3px;
	margin-right: 0;
}
#ascii > div {min-height: 0.75em;}
#ascii input[type=radio] {display: none;}
#ascii input[type=radio]:checked + label {background-color: #9df;}
#ascii label {
	border-radius: 0.25em;
	cursor: pointer;
	display: inline-block;
	line-height: 1.25em;
	min-height: 1.25em;
	text-align: center;
	vertical-align: top;
	width: 1.25em;
}
#ascii label:hover {background-color: #ddd;}


.char > * {
	display: inline-block;
	vertical-align: top;
}

#binary {
	margin: -1.25em 0 1em 0;
	min-width: 12em;
}
#binary #charinfo {
	background-color: #444;
	color: #fff;
	display: inline-block;
	padding: 0 0.5em;
	position: relative;
	text-align: left;
	width: calc(100% - 1em);
}
#binary #charinfo span {
	bottom: calc(50% - (1.25em / 2));
	left: 0.5em;
	position: absolute;
}

#cmini {
	border: 2px solid #444;
	position: absolute;
	bottom: 0;
	right: 0;
}

#charinfo .mini {
	bottom: 4px;
	position: absolute;
}
#charinfo .mini1 {right: 0.5em;}
#charinfo .mini2 {right: 2px;}

.mini p {
	margin: 0;
	display: inline-block;
}
.mini1 p {
	height: 1px;
	width: 1px;
}
.mini2 p {
	height: 2px;
	width: 2px;
}
.mini .bit0 {background-color: #444;}
.mini .bit1 {background-color: #fff;}


#binary > div:last-child {overflow: hidden auto;}
#binary > div:last-child p {
	font-family: mono;
	font-size: 85%;
	margin: 0;
	padding: 0 0.5em;
	text-align: left;
	user-select: text;
	white-space: nowrap;
	width: 14.5em;
}
#binary > div:last-child p:hover {background-color: #8df;}
#binary > div:last-child p i {
	color: #bbb;
	font-style: normal;
}

.info {margin: 0 0 1em;}
.info > div:nth-child(1) {text-align: right;}
.info > div:nth-child(2) {text-align: right;}
#blank {vertical-align: text-bottom;}

.info label {
	display: inline-block;
	text-align: right;
	width: 5em;
}
.info input[type="text"] {
	margin: 2px 0;
	width: 4em;
}
.info input[type="text"]:disabled {
	background-color: #f6f6f6;
	color: #000;
}

.info #fontname {width: 12em;}

.char {margin-top: 2em;}

#grid {
	margin: -2em 0 0 64px;
	padding-top: 2em;
	position: relative;
	text-align: center;
}
#grid #vbar {
	border-right: 1px solid #f00;
	height: calc(100% - 4.75em - 1px);
	position: absolute;
	top: 1.25em;
	width: 1px;
}
#grid #vbar::after {
	background-color: #c00;
	border-radius: 0.5em;
	content: '←→';
	color: #fff;
	cursor: pointer;
	font-size: 75%;
	left: -1em;
	padding: 2px 4px;
	position: absolute;
	text-align: center;
	top: -0.7em;
}

#grid #highlight {
	background-color: #0cf;
	display: none;
	height: calc(8em + 7px);
	left: 0;
	margin: 2em 0 0 0;
	opacity: 0.4;
	position: absolute;
	top: 0;
	width: 1em;
}

#grid > div {
	width: max-content;
	margin: 0 auto;
}

#grid label {
	background-color: #ddd;
	border-right: 1px solid #fff;
	border-bottom: 1px solid #fff;
	display: inline-block;
	height: 1em;
	width: 1em;
}
#grid label.dim {background-color: #eee;}
#grid label.blank {background-color: #eee !important;}
#grid input[type=checkbox] {display: none;}
#grid input[type=checkbox]:checked + label {background-color: #006;}

#grid .tools {
	color: #444;
	margin-top: 0.25em;
	text-align: center;
}
#grid .tools span:active {color: #0cc !important;}
#grid .tools span:hover {color: #3ce;}
#grid .tools > div {margin: 0 0.5em;}
#grid .tools div {
	cursor: pointer;
	display: inline-block;
	font-weight: bold;
	vertical-align: middle;
}

#grid .tools .move {
	border: 1px solid #999;
	border-radius: 0.75em;
	padding: 0 0.3em;
}
#grid .tools .move > div {display: inline-block;}
#grid .move div div {
	display: block;
	margin: 0.25em 0;
}

#grid .tools .box {
	border: 2px solid #444;
	height: 1em;
	line-height: 0.9em;
	width: 1em;
}
#grid .tools .box:hover {border-color: #999;}
#grid .tools .clear {
	background-color: #fff;
	border-style: dashed;
}
#grid .tools .black {background-color: #666;}
#grid .tools .far {font-size: 140%;}

#content > div:nth-child(2) {
	min-height: 2em;
	min-width: 50em;
	position: relative;
	text-align: center;
}
#generate {
	display: none;
	right: 0;
	position: absolute;
}
#output {
	display: none;
	width: 42em;
}

#fontlist {
	position: absolute;
	right: 6em;
	top: 0;
}

input[type=submit] {
	position: absolute;
	right: 0;
}

#font {
	font-size: 85%;
	height: 50em;
	margin: 1em 0;
	resize: none;
	width: 100%;
}



#popup {
	background-color: #fff;
	border: 2px ridge #999;
	box-shadow: 0 0 1em #666;
	display: none;
	height: 15em;
	left: calc(50vw - 12em);
	position: fixed;
	top: calc(50vh - 10em);
	width: 24em;
	z-index: 9;
}
#popup .x {
	background-color: #866;
	height: 100%;
	line-height: 1.4em;
	padding: 1px 0.25em;
	position: absolute;
	right: 0;
	top: 0;
}
#popup .x:hover {color: #f00;}

#popup .head {
	background: #999 linear-gradient(#999, #bbb, #999);
	border-bottom: 2px ridge #999;
	color: #fff;
	font-weight: bold;
	left: 0;
	padding: 1px 0.5em;
	position: absolute;
	text-shadow: 1px 1px 1px #666;
	top: 0;
	width: calc(100% - 1em);
}
#popup > div:last-child {
	margin: 1.5em 0 0 0;
	padding: 0.5em;
	height: calc(100% - 2.5em);
	overflow-y: auto;
}
#popup > div:last-child > div {margin: 2px;}

#popup button {
	border: 1px solid #808080;
	border-radius: 3px;
	box-shadow: 1px 1px 2px #ccc, inset 0 0 3px #ccc;
	cursor: pointer;
	font-size: 100%;
	min-width: 5em;
	padding: 0.35em 1em;
}

#popup label {
	display: inline-block;
	margin: 0 0.5em 0;
	text-align: right;
	width: 8em;
}
#popup input[type=text] {
	border: 1px solid #808080;
	border-radius: 3px;
	box-shadow: inset 0 0 2px #ddd;
	font-size: 100%;
	padding: 0.1em 0.25em;
}
#popup .hint {
	color: #39c;
	font-size: 80%;
	font-style: italic;
	margin-left: 0.75em;
}

.font_settings input[type=text].num {width: 3em;}
.font_settings > div:last-child {padding: 2em 3em 0;}
.font_settings > div:last-child > button:last-child {float: right;}

#fontfile, #fonttext {
	background-color: #fff;
	font-family: fixed;
	overflow-x: auto;
	white-space: pre;
}
#popup #fonttext {
	border: 1px solid #999;
	height: calc(100% - 3.5em);
	margin-bottom: 0.5em;
	padding: 0.25em;
}
#pastefont {background-color: #eee;}
#pastefont button {float: right;}

.about a {
	color: #00f;
	text-decoration: none;
}
.about h1 {
	font-size: 125%;
	margin: 0.25em 0;
	text-align: center;
}
.about h2 {
	font-size: 105%;
	margin: 0.25em 0;
	text-align: center;
}
.about h6 {
	font-size: 85%;
	font-style: italic;
	margin: 1em 0 0.25em 0;
	text-align: center;
}
.about p {text-align: justify;}
