h1 {
	font-size: 120%;
	text-align: center;
}
h1 a {
	text-decoration: none;
	color: #999;
}

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

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

#content {
	cursor: default;
	font-family: sans;
	font-size: 15px;
	margin: 2em auto;
	width: max-content;
}

input#hex { width: 50em; }

form > div:first-child {
	margin-bottom: 1em;
	text-align: right;
}
form > div:first-child > div {
	display: inline-block;
	margin: 0 1em;
	vertical-align: top;
}

#ascii {
	border: 1px solid #444;
	border-radius: 3px;
}
#ascii > div {min-height: 0.75em;}
#ascii input[type=radio] {display: none;}
#ascii input[type=radio]:checked + label {background-color: #9df;}
#ascii label {
	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: #99f;}


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

#binary {
	margin-bottom: 1em;
	min-width: 11em;
}
#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;
}
#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;
	white-space: nowrap;
}

.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% - 4em + 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 > 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: 16px;
	width: 16px;
}
#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 > div:last-child {
	margin-top: 0.5em;
	text-align: center;
}
#grid > div:last-child > div {margin: 0 0.5em;}
#grid > div:last-child div {
	cursor: pointer;
	display: inline-block;
	font-weight: bold;
	vertical-align: middle;
}
#grid > div:last-child div div {display: block;}

#grid > div:last-child .box {
	border: 1px solid #444;
	height: 1em;
	line-height: 0.9em;
	width: 1em;
}
#grid .clear {background-color: #fff;}
#grid .black {background-color: #444;}


form > div:nth-child(2) {
	min-height: 2em;
	position: relative;
	text-align: center;
}
#generate {
	display: none;
	left: 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%;
}
