/* default */
:root {
	margin: 0;
	border: 0;
	padding: 0;
	box-sizing: border-box;
	color-scheme: light dark;
	background: var(--bg-color);
	color: var(--color);
	font-family: 'Noto Sans', sans-serif;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	margin: 0;
	border: 0;
	padding: 2px 4px;
}

button,
input,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
}



/* hamburg */
label[for="hamburg"] {
	position: relative;
	float: left;
	width: 2em;
	height: 2em;
}

label[for="hamburg"] span {
	display: block;
	position: absolute;
	background-color: #777;
	left: 0.25em;
	width: 1.5em;
	height: 0.25em;
	border-radius: 0.125em;
	transform-origin: center;
}

label[for="hamburg"] span:nth-child(1) {
	top: 0.375em;
}

label[for="hamburg"] span:nth-child(2) {
	top: 0.875em;
}

label[for="hamburg"] span:nth-child(3) {
	top: 1.375em;
}

#hamburg:checked+label[for="hamburg"] span:nth-child(1) {
	transform: translateY(0.5em) rotate(-45deg);
}

#hamburg:checked+label[for="hamburg"] span:nth-child(2) {
	opacity: 0;
}

#hamburg:checked+label[for="hamburg"] span:nth-child(3) {
	transform: translateY(-0.5em) rotate(45deg);
}

#hamburg+label[for="hamburg"]~menu {
	display: none;
}

#hamburg:checked+label[for="hamburg"]~menu {
	display: block;
}



/* section */
header>h1:first-of-type {
	margin: 0;
}

header>h1:first-of-type img {
	height: clamp(30px, 10vw, 60px);
	margin-right: 2px;
}

header>h1:first-of-type>span:first-of-type {
	vertical-align: top;
}

nav {
	height: 2em;
	display: flex;
	align-items: center;
}

nav>a:any-link {
	margin-left: 1em;
}

menu {
	margin: 0;
	padding: 2px;
	list-style: none;
}

menu ul {
	margin: 0;
	padding-left: 1em;
	list-style: none;
}

nav .active,
menu .active {
	text-decoration: underline;
}

main {
	padding: 4px 2px;
}

footer {
	margin-top: 4px;
}



/* class */
caption.ok,
div.ok,
h2.ok,
label.ok,
output.ok,
p.ok,
span.ok,
ul.ok {
	color: var(--ok-color);
}

caption.warn,
div.warn,
h2.warn,
label.warn,
output.warn,
p.warn,
span.warn,
ul.warn {
	color: var(--warn-color);
}

caption.error,
div.error,
h2.error,
label.error,
output.error,
p.error,
span.error,
ul.error {
	color: var(--error-color);
}



/* flow */
a {
	text-decoration: none;
	background: transparent;
}

a:any-link {
	color: var(--link-color);
}

a:hover,
a:active,
a:focus {
	text-decoration: underline;
}

table.data>thead,
table.data>tfoot {
	background-color: var(--thead-bg-color);
}

table.data>thead>tr:first-child>th {
	position: sticky;
	top: 0;
	z-index: 1;
	background-color: var(--thead-bg-color);
}

table.data>tbody>tr:nth-child(odd) {
	background-color: var(--odd-bg-color);
}

table.data>tbody>tr:nth-child(even) {
	background-color: var(--even-bg-color);
}

table.data>tbody>tr:hover {
	background-color: var(--hover-bg-color);
}

table.info>tbody>tr>th:first-child {
	text-align: right;
}

tr.right,
td.right,
th.right {
	text-align: right;
}

td.em {
	text-decoration: underline;
}



/* form */
button,
input,
label,
output,
select,
textarea {
	margin: 0;
}

button,
input,
output,
select,
textarea {
	border-radius: 3px;
	border-style: solid;
	border-width: 1px;
}

button,
input,
select,
textarea {
	border-color: var(--border-color);
}

input:read-only,
output,
textarea:read-only {
	border-color: var(--bg-color);
}

input,
output {
	padding: 1px 2px;
}

input[type=number],
input.number,
output.number {
	text-align: right;
}

output.checkbox {
	width: 2em;
}

span.msg:not(:empty),
span.unit {
	margin-left: 0.25em;
	margin-right: 0.25em;
}

form input[type=checkbox]+label,
form input[type=checkbox]+span.msg+label {
	margin-left: 0.25em;
}

form select+input[type=checkbox] {
	margin-left: 0.25em;
}

form ul {
	margin: 0;
	border: 0;
	padding: 0;
	list-style: none;
}

form>button {
	margin-top: 1em;
	margin-right: 2em;
	margin-bottom: 1em;
}

form details.tip {
	position: absolute;
	margin-left: 0.25em;
	padding: 0.2em;
	background: var(--bg-color);
	border: 1px solid var(--bg-color);
	border-radius: 2px;
}

form details.tip[open] {
	border: 1px solid var(--border-color);
	z-index: 1;
}

form details.tip>summary {
	cursor: help;
	list-style: none;
}

form>div {
	margin-bottom: 0.5em;
}

form>div>label:first-child {
	display: block;
}

form>div details,
form>div div,
form>div input,
form>div output,
form>div table,
form>div ul {
	display: inline-block;
}

main>form input[type=text],
main>form input[type=email],
main>form input.text,
main>form output.text {
	min-width: 10em;
	max-width: 30em;
}

main>form input[type=number],
main>form input.number,
main>form output.number {
	width: 10em;
}

main>form textarea {
	min-width: 15em;
	max-width: 30em;
	min-height: 10em;
}

main>form input:required,
main>form select:required,
main>form textarea:required {
	border-width: 2px;
}

main>form input.warn,
main>form select.warn,
main>form textarea.warn {
	background-color: var(--warn-bg-color);
	border-color: var(--warn-color);
}

main>form input.error,
main>form select.error,
main>form textarea.error {
	background-color: var(--error-bg-color);
	border-color: var(--error-color);
}

main>form input:invalid,
main>form select:invalid,
main>form textarea:invalid {
	background-color: var(--error-bg-color);
	border-color: var(--error-color);
}



/* screen */
@media screen and (max-width: 1024px) {
	h1 {
		font-size: 1.8rem;
	}

	menu {
		line-height: 2;
	}

	main>form input[type=text],
	main>form input[type=email],
	main>form input.text,
	main>form output.text {
		width: 90%;
	}

	main>form textarea {
		width: 99%;
	}
}

@media screen and (min-width: 1025px) {
	menu {
		float: left;
		width: 20%;
	}

	#hamburg:checked+label[for="hamburg"]~main {
		margin-left: 20%;
	}

	main>form input[type=text],
	main>form input[type=email],
	main>form input.text,
	main>form output.text,
	main>form textarea {
		width: 50%;
	}

	main>form>div>label:first-child {
		display: inline-block;
		padding-top: 2px;
		padding-right: 0.25em;
		width: 35%;
		text-align: right;
		vertical-align: top;
	}

	main>form>div div {
		max-width: 65%;
	}

	main>form>button:first-of-type,
	main>form>h2 {
		margin-left: 35%;
	}
}



/* color */
@media (prefers-color-scheme: light) {
	:root {
		--bg-color: #fff;
		--color: #000;
		--link-color: #3773aa;
		--ok-color: #00aa00;
		--warn-color: #aaaa00;
		--warn-bg-color: #fffff0;
		--error-color: #aa0000;
		--error-bg-color: #fff0f0;
		/* Form */
		--border-color: #8f8f9d;
		/* Table */
		--thead-bg-color: #ccc;
		--odd-bg-color: #eee;
		--even-bg-color: #ddd;
		--hover-bg-color: #ffffe1;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg-color: #000;
		--color: #fff;
		--link-color: #4b9ee6;
		--ok-color: #00e600;
		--warn-color: #e6e600;
		--warn-bg-color: #333300;
		--error-color: #e60000;
		--error-bg-color: #330000;
		/* Form */
		--border-color: #8f8f9d;
		/* Table */
		--odd-bg-color: #222;
		--even-bg-color: #333;
		--thead-bg-color: #444;
		--hover-bg-color: #505046;
	}
}



/* font */
@font-face {
	font-family: 'Noto Sans';
	font-style: normal;
	font-weight: 400;
	src: local('Noto Sans'), local('NotoSans'),
		url('/static/noto-sans-v9-latin-regular.woff2') format('woff2');
}

@font-face {
	font-family: 'Noto Sans';
	font-style: italic;
	font-weight: 400;
	src: local('Noto Sans Italic'), local('NotoSans-Italic'),
		url('/static/noto-sans-v9-latin-italic.woff2') format('woff2');
}