@charset "UTF-8";

/*****************************************************************************
 *  文書全体
 *****************************************************************************/
* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	background-color: gray;
}

article {
	width: 800px;
	margin: 0 auto;
}

/*****************************************************************************
 *  表紙
 *****************************************************************************/
header {
	position: relative;
	height: 100vh;
	margin-bottom: 1em;
	background-color: white;
	page-break-after: always;
}

#TitleArea {
	padding-top: 3em;
	border-bottom: solid black 2px;
}

header h1 {
	margin: 0;
	font-size: 1em;
	font-weight: normal;
	text-align: center;
}

#Lunatic {
	display: block;
	font-size: 7em;
	color: red;
	background-color: black;
	font-family: serif;
}

.subtitle {
	display: block;
	font-size: 3em;
	font-weight: bold;
}

#Version {
	font-size: 1em;
	text-align: center;
}

#Version::before {
	content: "Version ";
}

#Copy {
	position: absolute;
	bottom: 1em;
	width:100%;
	padding: 0 1em;
	text-align: right;
	border-top: solid black 1px;
}

#Copy::before {
	content: "\0a9";
	margin-right: 0.5em;
}

#Copy::after {
	content: "All rights rserved";
	margin-left: 0.5em;
}

#Copy > time {
	margin-right: 0.5em;
}

/* 表紙裏の白紙（印刷用） */
.endpaper {
	display: none;
}

/*****************************************************************************
 *  目次
 *****************************************************************************/
nav {
	display: none;	/* print以外は表示しない */
	background-color: white;
	padding: 0 0.5em;
	margin-bottom: 1em;
	page-break-after: always;
}

nav > div:first-child {
	border-bottom: solid black 1px;
	padding: 0.5em 0;
	text-align: center;
}

#Index {
	columns: 2;
}

/* サイドバー目次 */
aside {
	width: 200px;
	display: none;
	background-color: rgba(255, 255, 255, 0.9);
	overflow-y: auto;
	white-space: nowrap;
	z-index: 0;
}

div#IndexButton {
	display: none;
	position: fixed;
	right: 2px;
	bottom: 2px;
	background-color: white;
	padding: 0.25em 0.5em;
	border: solid black 2px;
	cursor: pointer;
}

/*****************************************************************************
 *  ページの一番下に置くトップページへのリンク集
 *	<article>の外に置く
 *****************************************************************************/
address {
	width: 800px;
	margin-left: auto;
	margin-right: auto;
	background-color: white;
}

address > div {
	padding: 0.5em;
	text-align: right;
}

/*****************************************************************************
 *  セクション
 *****************************************************************************/
/* 章と節に相当する */
section {
	background-color: white;
	padding: 0 0.5em;
}

/* 各章 */
section.top {
	padding: 0 0 1em 0;
	margin-bottom: 1em;
	page-break-after: always;
}

p {
	margin:0;
	text-indent: 1em;
}

/* section.top（各章）直下のパラグラフに左右の隙間を与える */
section.top > p {
	padding: 0 0.5em;
}

/* section.top（各章）直下のdivに左右の隙間を与える */
section.top > div {
	margin-left: 0.5em;
	margin-right: 0.5em;
}

/* セクションの後で印刷時に改ページを入れる */
section.page {
	page-break-after: always;
}

/* pタグなどで行間のスペースを撮りたい時 */
.top-margin {
	margin-top: 1em;
}

/* 画像はデフォルトで画面幅の80% */
img {
	max-width: 80%;
}

/* 地図など大きな画像 */
figure.large-fig > img {
	max-width: 100%;
}

/* 用語定義 */
dfn {
	font-style: normal;
}

/*****************************************************************************
 *  ヘッディング
 *****************************************************************************/
h2 {
	font-size: 3em;
	text-align: center;
	background-color: lightgray;
	border-bottom: solid darkgray 2px;
	margin: 0 0 0.5em 0;
	page-break-after: avoid;
	break-after: avoid;
}

h3 {
	font-size: 2em;
	border-left: solid darkgray 1em;
	border-top: solid darkgray 1px;
	border-bottom: solid darkgray 1px;
	padding-left: 0.5em;
	margin: 1em 0 0.5em 0;
	page-break-after: avoid;
	break-after: avoid;
}

h4 {
	font-size: 1.75em;
	border-left: solid lightgray 0.5em;
	border-bottom: dotted lightgray 1px;
	padding-left: 0.5em;
	margin: 1em 0 0.5em 0;
	page-break-after: avoid;
	break-after: avoid;
}

h5 {
	font-size: 1.5em;
	border-left: solid lightgray 0.25em;
	padding-left: 0.5em;
	margin: 1em 0 0.5em 0;
	page-break-after: avoid;
	break-after: avoid;
}

h6 {
	font-size: 1.25em;
	margin: 1em 0 0.5em 0;
	text-decoration: underline;
	page-break-after: avoid;
	break-after: avoid;
}

/* ヘッディングではないが目立たせたい項目 */
.strong {
	display: block;
	font-size: 1.125em;
	font-weight: bold;
	margin: 1em 0 0.25em 0;
}

div.strong {
	page-break-after: avoid;
	break-after: avoid;
}

/* ヘッディングではないが目立たせたい、strongより弱い項目 */
.emp {
	display: block;
	font-weight: bold;
	margin: 1em 0 0.25em 0;
}

/*****************************************************************************
 *  備考欄(note), パラメータ例（ex）
 *****************************************************************************/
div.note, div.ex {
	border: solid black 1px;
	margin: 0.5em 1em;
	page-break-inside: avoid;
}

div.note > div:first-child {
	background-color: whitesmoke;
	border-bottom: solid gray 1px;
}

div.ex p {
	text-indent: 0;
	padding-left: 0.5em;
	padding-right: 0.5em;
}

/*****************************************************************************
 *  計算式
 *****************************************************************************/
.formula {
	border: solid gray 1px;
	padding: 0.25em 0.5em;
}

div.formula {
	display: inline-block;
	margin-left: 1em;
}

div.formula > p {
	text-indent: 0;
}

/*****************************************************************************
 *  リスト
 *****************************************************************************/
li p {
	text-indent: 0;
}

li p:last-child {
	margin-bottom: 0.5em;
}

/*****************************************************************************
 *  テーブル
 *****************************************************************************/
table {
	border-collapse: collapse;
	border: solid black 1px;
	margin: 0 1em;
	margin-bottom: 1em;
	page-break-inside: avoid;
}

th {
	box-sizing: content-box;
	background-color: whitesmoke;
	border: solid black 1px;
	padding-left: 0.5em;
	padding-right: 0.5em
}

td {
	box-sizing: content-box;
	border: solid black 1px;
	padding-left: 0.5em;
	padding-right: 0.5em
}

table p {
	text-indent: 0;
}

table.val-list td{
	min-width: 2em;
	text-align: center;
}

/* モバイルでテーブルがはみ出す場合の対応。原則すべてのテーブルはこれで囲む。 */
div.table-wrap {
	overflow-x: auto;
}

/* コメント付きのテーブルを囲むdiv */
div.comment-tbl {
	margin-bottom: 1em;
}

div.comment-tbl > table {
	margin-bottom: 0;
}

div.comment-tbl > p {
	text-indent: 0;
	margin-left: 1em;
}

/* クラスで使用可能な武器 */
table.wepon td.atk-num {
	text-align: center;
}

/* リプレイ風 */
table.replay{
	page-break-inside: auto;
}

table.replay td {
	border: dotted black 1px;
}

/*****************************************************************************
 *  定義リスト
 *****************************************************************************/
dt {
	font-weight: bold;
}

/*****************************************************************************
 *  作業パラメータテーブル
 *****************************************************************************/
table.work-tbl tr:first-child > th:nth-child(1) {
	width: 4em;
}

table.work-tbl tr:first-child > th:nth-child(2) {
	width: 7em;
}

/*****************************************************************************
 *  画面ちょうどの画像
 *****************************************************************************/
div.fullimg {
	page-break-before: always;
}

div.fullimg img {
	max-width: 100%;
	width: 100%;
}

/*****************************************************************************
 *  フローティング画像
 *****************************************************************************/
div.floatimg {
	overflow: hidden;
}

div.floatimg figure {
	display: inline;
	margin: 0;
}

div.floatimg figure img, div.floatimg figure img.right{
	float:right;
	width: 25%;
	margin-left: 0.5em;
}

div.floatimg figure img.left{
	float:left;
	width: 25%;
	margin-right: 0.5em;
}

/*****************************************************************************
 *****************************************************************************
 *  レスポンシブ
 *****************************************************************************
 *****************************************************************************/
@page {
	size: A4;
}

@media screen and (min-width: 1000px){
	/* サイドバーに目次を表示する */
	aside {
		display: block;
		position: fixed;
		height: 100vh;
	}

	/* 目次ボタン */
	div#IndexButton {
		display: none;
	}
}
@media screen and (max-width: 999px){
	/* サイドバーを表示しない */
	aside {
		display: none;
		position: static;
		top:0;
		height: 100vh;
	}

	/* 目次ボタン */
	div#IndexButton {
		display: block;
	}
}
@media screen and (max-width:800px) {
	article {
		width: 100%;
	}

	address {
		width: 100%;
	}

	table {
		overflow: scroll;
	}
}
@media print {
	body {
		background-color: white;
	}

	header {
		height: 297mm;
	}

	/* 表紙裏の白紙 */
	.endpaper {
		display: block;
		height: 297mm;
		page-break-after: always;
	}

	#Copy {
		bottom: 0;
	}

	/* 章区切りの隙間を消す */
	header, nav, section.top {
		margin-bottom: 0;
	}

	/* 目次を表示する */
	nav {
		display: block;
	}

	/* サイドバーを表示しない */
	aside {
		display: none;
		position: static;
		height: auto;
	}

	/* 目次ボタン */
	div#IndexButton {
		display: none;
	}
}
