@charset "UTF-8";
/*
 * シノビガミ編集画面の狭い画面（スマートフォンなど）向けの調整（日本語版・韓国語版で共通）
 * PCでの見た目は shinobigami.css のまま。shinobigami.css より後に読み込むこと。
 */
/* 一覧の下の追加ボタンは狭い画面だけで使う（PCでは表の右上の追加ボタンを使う） */
.add-below {
	display: none;
}

@media (max-width: 840px) {
	/*
	 * 基本情報：表の行をCSSグリッドに置き換え、「項目名・入力欄」を2組ずつ並べる。
	 * 設定（メモ）と画像は下に回して画面幅いっぱいに表示する。
	 */
	#base {
		display: block;
	}
	#base > tbody {
		display: grid;
		grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
		border-top: 1px solid #000;
		border-left: 1px solid #000;
	}
	#base > tbody > tr {
		display: contents;
	}
	#base th, #base td {
		width: auto !important;
		border: 0;
		border-right: 1px solid #000;
		border-bottom: 1px solid #000;
	}
	#base th {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 2px 4px;
	}
	/* 行の先頭は必ず左端から始める */
	#base > tbody > tr > :first-child {
		grid-column-start: 1;
	}
	#base [colspan="2"] {
		grid-column-end: span 2;
	}
	#base [colspan="3"] {
		grid-column-end: span 3;
	}
	#base td:has(> [id="base.status"]) {
		grid-column-end: span 2;
	}
	#base th[colspan="3"] {
		grid-column: 1 / -1;
		order: 1;
	}
	#basememotr {
		grid-column: 1 / -1 !important;
		order: 2;
	}
	#baseimgtr {
		grid-column: 1 / -1 !important;
		order: 3;
		text-align: center;
	}
	#base input[type=text], #base select {
		width: 100% !important;
	}
	#base\.memo {
		width: 100%;
		height: 200px;
	}
	#displayImage {
		max-width: 100%;
		height: auto;
	}

	/* シナリオ情報：項目名と入力欄を1組ずつ縦に並べる */
	#scenario {
		display: block;
	}
	#scenario > tbody {
		display: grid;
		grid-template-columns: max-content minmax(0, 1fr);
		border-top: 1px solid #000;
		border-left: 1px solid #000;
	}
	#scenario > tbody > tr:not(.secret) {
		display: contents;
	}
	#scenario th, #scenario td {
		width: auto !important;
		border: 0;
		border-right: 1px solid #000;
		border-bottom: 1px solid #000;
	}
	#scenario th {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 2px 4px;
	}
	#scenario [colspan="6"], #scenario td[colspan="2"] {
		grid-column: 1 / -1;
	}
	#scenario input[type=text]:not(.color-picker), #scenario textarea {
		width: 100% !important;
	}

	/* 特技：判定の設定欄は折り返し、習得特技の表は特技表の下に置く */
	#div\.mode {
		width: auto !important;
	}
	#div\.skills, #div\.judge {
		float: none !important;
	}
	#learned {
		width: 100%;
	}
	#learned th:nth-child(2) {
		width: auto !important;
	}
	#learned input[type=text] {
		width: 100% !important;
	}

	/* 追加ボタンは表の右上ではなく、それぞれの一覧の下に出す */
	.add-below {
		display: block;
		margin: 2px 0;
	}
	/* 一覧が隠れているとき（一般人の忍法・奥義、忍者の真実など）は追加ボタンも隠す */
	[style*="display: none"] + .add-below {
		display: none;
	}
	.edit-scroll thead th[rowspan="2"] > input[type=button] {
		display: none;
	}
}
