:root {
	color-scheme: light dark;
}

html {
	font-family: unset;
}

body {
	width: min(calc(100%-1em), 80rem);
	display: flex;
	min-height: 100vh;
	flex-direction: column;
	flex: 1;
	padding: 0 0.5rem;
	overflow-x: hidden;
	word-break: break-word;
	overflow-wrap: break-word;
}

header {
	margin: 0;
	padding: 0 0 2vh;
}

main {
	padding-bottom: 2vh;
	border-bottom: 0.1rem CanvasText solid;
}

footer {
	padding-bottom: 2vh;
}

/* ヘッダ・フッタ内要素 */
header * {
	font-style: none;
	text-decoration: none;
	color: CanvasText;
}

.breadcrumb {
	margin-bottom: 0.2rem;
}

.description {
	border-top: 0;
	margin-top: 0;
	margin-bottom: auto;
	text-align: right;
}

.lastupdate {
	margin: 1vh;
	text-align: right;
	font-size: small;
	font-style: italic;
	text-wrap: nowrap;
	overflow: hidden;

	&::before {
		font-style: normal;
		content: "lastupdate:";
	}
}

address {
	padding-bottom: 1vh;
}

/* 画像要素 */
.avatar {
	width: 5rem;
	height: auto;
}

.custom_emoji img {
	border: none;
	width: min(5rem, 50%);
}

/* 見出し */
h1,
h2,
h3,
h4,
h5,
h6 {
	clear: both;
	list-style: none;
	font-size: 100%;
	margin: 0.5rem 0;
}

h1 {
	font-size: 200%;
	border-bottom: 0.1rem CanvasText solid;
}

h2 {
	font-size: 120%;
}

h2::before {
	content: "■";
}

h3::before {
	content: "□";
}

/* 本文内の諸表現 */
p {
	margin: 0;
	padding: 0;
}

b {
	font-size: 110%;
}

code {
	font-size: unset;
	background-color: lightgray;
	color: black;
	display: inline-block;
	padding: 0.4rem;
}

pre>code {
	display: block;
	padding: 1em;
	overflow-x: scroll;
}

hr {
	border-bottom: 0.1rem CanvasText solid;
}

/* 入れ子要素 */
ul li,
ol li {
	list-style-type: square;
	white-space: nowrap;

	>ul,
	>ol {
		margin-left: 0;
		padding-left: 0.5rem;
	}
}

dl {
	padding: 0;
	margin-left: 1rem;

	dt {
		font-weight: bold;
	}

	dd {
		margin-left: 1rem;

		>p {
			display: inline;
		}

		dl {
			margin: 0;
		}
	}
}

table {
	border: 0.1rem CanvasText solid;
	border-collapse: collapse;

	tr,
	th,
	td {
		font-size: small;
		padding: 0;
	}
}
