* {
	box-sizing: border-box;
}

@font-face {
    font-family: 'Noto Sans JP';
    src: url('/static/data/NotoSansJP-Regular.otf');
}

body {
	background-color: #000;
	color: #aaa;
	font: 18px 'Noto Sans JP',sans-serif;
}

a:link, a:visited, a:active {
	color: #58a;
	text-decoration: none;
}
a:hover {
	color: #5ad;
}

a.back {
	font-size: 36px;
}

input, button {
	background-color: #222;
	color: inherit;
	border: 1px solid #444;
	font: inherit;
}

main, header {
	width: 90%;
	max-width: 1200px;
	margin: 10px auto;
	background-color: #111;
}
main {
	padding: 25px;
}
main section {
	margin: 15px 10px;
	padding: 5px;
	border: 1px solid #222;
}
header {
	display: flex;
	justify-content: space-between;
	padding: 10px 20px;
}
header #langs {
	display: flex;
	align-items: center;
	gap: 1ch;
	flex-wrap: wrap;
}
header #langs div {
	line-height: 36px;
	cursor: pointer;
	border: 1px solid #333;
	padding: 0 10px;
	transition: border-color 0.2s, background-color 0.2s;
}
header #langs div:hover, header #langs div.selected {
	border-color: #555;
	background-color: #222;
}

main.root {
	display: flex;
	justify-content: space-evenly;
	margin-top: 50px;
}

main input#search {
	display: block;
	margin: 0 auto;
	max-width: 100%;
}

.spells, .buffs {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.spells section, .buffs section {
	grid-column: 1;
}
.spells section.evolved, .spells section.mutated, .buffs section.enemy {
	margin-left: 20px;
	grid-column: 2;
}
.spells section {
	display: flex;
	flex-direction: column;
}
.spells section .spell_base {
	display: flex;
	justify-content: space-between;
}
.spells section .spell_base .spell_base_left {
	padding-right: 10px;
}
.spells section .spell_base h3, .buffs .buff_left h3 {
	display: inline;
	margin: 0;
	color: #fc0;
}
.spells section .spell_base img.spell_icon, .buffs section .buff_left img.buff_icon {
	display: block;
	height: 96px;
}
.spells section .spell_base .stats {
	max-width: 300px;
	padding-right: 10px;
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
}
.spells section button.level_toggle {
	width: 75px;
	margin: 1em auto;
}
.spells section .levels {
	display: none;
	flex-direction: column;
	align-items: center;
}
.spells section .levels.visible {
	display: flex;
}
.spells section .levels .level_up_desc, .buffs section .buff_right .buff_desc {
	color: #0cf;
}
.spells section .levels table {
	margin: 1em 0;
	border-collapse: collapse;
	color: #aaa;
}
.spells section .levels table td {
	padding: 0 5px;
	text-align: right;
	border: 1px solid #333;
}

.buffs section {
	display: grid;
	grid-template-columns: 1fr 1fr;
}
.buffs section .buff_right .buff_desc {
	margin-bottom: 1em;
}

footer {
	margin-top: 100px;
	text-align: center;
	font-family: monospace;
	font-size: 14px;
}

@media (max-width: 960px) {
	.spells, .buffs {
		grid-template-columns: 1fr;
	}
	.spells section.evolved, .buffs section.enemy {
		grid-column: 1;
	}
	.spells section .spell_base {
		flex-direction: column;
	}
	.spells section .spell_base .spell_base_left {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}
	.spells section .levels table td, .buffs section .buff_right div {
		overflow-wrap: anywhere;
	}
	.buffs section {
		grid-template-columns: 1fr;
		grid-template-rows: 1fr 1fr;
	}
}
