:root {
	--white: 1 1 1;
	--light-gray: 0.75 0.75 0.75;
	--gray: 0.5 0.5 0.5;
	--dark-gray: 0.25 0.25 0.25;
	--black: 0 0 0;

	--red: 0.75 0.13 0;
	--yellow: 1 0.74 0;
	--teal: 0 0.5 0.5;
	--purple: 0.35 0 0.5;

	--bg: var(--light-gray);
	--inventory-bg: var(--black);
	--text: var(--black);

	--link: var(--teal);
	--visited: var(--purple);
	--active: var(--red);

	--script: "ab-doudoukaisyo";
	--serif: "ivyjournal";
	--mincho: "ten-mincho";
}
html {
	background: url("/files/texture.gif"), color(display-p3 var(--bg) / 1);
	background-position: center;
	font-synthesis: none;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
	margin: auto;
	display: flex;
	min-height: 100vh;
	scroll-behavior: smooth;
	scroll-padding-top: 1em;
}
body {
	font-family: var(--serif), var(--mincho);
	color: color(display-p3 var(--text) / 1);
	padding: 2em;
	margin: auto;
}
header, footer {
	text-align: center;
}
header {
	margin-bottom: 1.5em;
}
nav {
	color: color(display-p3 var(--gray) / 1);
}
footer {
	font-size: 0.875em;
	margin-top: 1.5em;
}
img {
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-o-user-select: none;
	user-select: none;
}
h1, h2, h3 {
	margin: 0.25em 0;
}
header h1 {
	font-family: var(--serif), var(--script);
	font-size: 4em;
	color: color(display-p3 var(--white) / 1);
	background: color(display-p3 var(--purple) / 1);
	border: 2px solid color(display-p3 var(--black) / 1);
	border-radius: 0.5rem;
	text-shadow:
		2px 2px 0 color(display-p3 var(--purple) / 1),
		6px 6px 6px color(display-p3 var(--yellow) / 1);
	box-shadow:
		4px 4px 4px color(display-p3 var(--gray) / 1),
		2px 2px 2px inset color(display-p3 var(--white) / 0.25),
		-2px -2px 2px inset color(display-p3 var(--black) / 0.25);
}
header h1 span:nth-child(1) { vertical-align: baseline; }
header h1 span:nth-child(2) { vertical-align: -12px; }
header h1 span:nth-child(3) { vertical-align: -24px; }
header h1 span:nth-child(4) { vertical-align: -36px; }
h2 span.purple {
	color: color(display-p3 var(--purple) / 1);
}
header h3 {
	color: color(display-p3 var(--teal) / 1);
}
header h3 em {
	font-size: 2em;
	margin-left: 2px;
	vertical-align: -4px;
	color: color(display-p3 var(--red) / 1);
}
header h3 strong {
	vertical-align: -4px;
	font-size: 1.5em;
}
h4 {
	color: color(display-p3 var(--gray) / 1);
	margin: 0;
}
blockquote {
	border-left: 1.5px solid color(display-p3 var(--teal) / 1);
	padding: 0 1.5em;
}
p, blockquote {
	margin: 1em 0;
}
p, ul, ol {
	line-height: 1.5em;
}
code {
	font-family: ui-monospace;
	color: color(display-p3 var(--teal) / 1);
}
a {
	color: color(display-p3 var(--link) / 1);
	text-decoration-color: color(display-p3 var(--link) / 1);
	text-decoration-color: inherit;
}
a:visited {
	color: color(display-p3 var(--visited) / 1);
}
a:active {
	color: color(display-p3 var(--active) / 1);
}
table {
	width: 100%;
	border: 1px outset color(display-p3 var(--light-gray) / 1);
	border-collapse: separate;
	margin: 1.5em auto;
}
td, th {
	height: 2em;
	min-width: 1.5em;
	padding: 0.25em;
	border: 1px inset color(display-p3 var(--light-gray) / 1);
}
section {
	min-width: 256px;
	max-width: 512px;
	margin: auto;
}
section.inventory {
	min-width: 256px;
	max-width: 384px;
	margin: auto;
}
section.inventory ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-gap: 0;
	align-items: start;
	line-height: 1em;
}
section.inventory h2, section.inventory ul li, a.button, span.version {
	background: color(display-p3 var(--light-gray) / 1);
	border: 1px outset color(display-p3 var(--light-gray) / 1);
	box-shadow:
		4px 4px 4px color(display-p3 var(--gray) / 1);
}
section.inventory ul li:active, hr, a.button:active {
	border: 1.5px solid;
	border: 1px inset color(display-p3 var(--light-gray) / 1);
	box-shadow: none;
}
a.button {
	font-weight: bold;
	color: color(display-p3 var(--black) / 1);
	text-decoration: none;
	display: inline-block;
	border-radius: 0.5rem;
	padding: 0.25em 0.75em 0.375em 0.75em;
}
h1 a, h1 a:visited, h2 a, h2 a:visited, h3 a, h3 a:visited {
	color: inherit;
}
h1 a:active, h2 a:active, h3 a:active {
	color: color(display-p3 var(--red) / 1);
}
hr {
	margin: 2em auto;
}
section.inventory ul a {
	color: color(display-p3 var(--black) / 1);
	text-decoration: none;
	width: 100%;
	height: 100%;
}
section.inventory ul li {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
}
section.inventory ul li a {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}
section.inventory h2 {
	border-radius: 0.5rem 0.5rem 0 0;
	font-size: 1em;
	color: color(display-p3 var(--white) / 1);
	background: linear-gradient(to right, color(display-p3 var(--purple) / 1), color(display-p3 var(--red) / 1));
	padding: 0.375em 0.5em 0.25em 0.25em;
	margin: 0;
}
section.inventory ul li.bottom-left {
	border-radius: 0 0 0 0.5rem;
}
section.inventory ul li.bottom-right {
	border-radius: 0 0 0.5rem 0;
}
span.version {
	color: color(display-p3 var(--white) / 1);
	background: color(display-p3 var(--black) / 1);
	border-radius: 0.5rem;
	padding: 0 0.25em 0.125em 0.25em;
}
img.app {
	margin: auto;
	width: 64px;
	height: 64px;
	image-rendering: pixelated;
	filter: drop-shadow(4px 4px 2px color(display-p3 var(--gray) / 1));
}
section.inventory h2 img {
	width: 16px;
	height: 16px;
	margin: 0.25em;
	display: inline-block;
	image-rendering: pixelated;
	vertical-align: -6px;
}
footer img {
	margin: 0.25em;
	display: inline-block;
	image-rendering: pixelated;
}