@charset "UTF-8";
/*
 * ARMORED CORE VI 編集画面の狭い画面（スマートフォンなど）向けの調整
 * PCでの見た目は ac6.css のまま。edit-responsive.css より後に読み込むこと。
 * スキルとミッション履歴以外の表は横スクロールさせず、入力欄や文字を小さくして画面幅に収める。
 */
/* ミッション履歴の下の追加ボタンは狭い画面だけで使う（PCでは表の右上の追加ボタンを使う） */
.add-below {
	display: none;
}

@media (max-width: 840px) {
	/* ミッション履歴の追加ボタンは表の右上ではなく、表の下に出す */
	.add-below {
		display: block;
		margin: 2px 0;
	}
	#history thead th[rowspan="2"] > input[type=button] {
		display: none;
	}

	#parts, #attack, #defense, #mobility, #limit, #judge, #ap, #weapons, #weapons2 {
		display: table !important;
		float: none !important;
		width: 100% !important;
		max-width: none !important;
		overflow: visible !important;
		margin-right: 0 !important;
	}
	#div\.weapons {
		margin-right: 0 !important;
	}
	:is(#parts, #attack, #defense, #mobility, #limit, #judge, #ap, #weapons, #weapons2) :is(th, td) {
		padding: 1px;
	}
	:is(#parts, #attack, #defense, #mobility, #limit, #judge, #ap, #weapons, #weapons2) th {
		font-size: 8pt;
	}
	:is(#parts, #attack, #defense, #mobility, #limit, #judge, #ap, #weapons, #weapons2) td.input {
		font-size: 8pt;
		min-width: 0;
	}
	:is(#parts, #attack, #defense, #mobility, #limit, #judge, #ap, #weapons, #weapons2) :is(input[type=text], textarea) {
		width: 100% !important;
		min-width: 0;
		box-sizing: border-box;
	}
	:is(#parts, #attack, #defense, #mobility, #limit, #judge, #ap, #weapons, #weapons2) select {
		max-width: 100%;
	}
	/* 武装の属性・火力タイプ・種類の選択欄は列の幅に合わせる（長い選択肢でも表を広げない） */
	#div\.weapons :is(select[id$=".damagetype"], select[id$=".attacktype"], select[id$=".category"]) {
		width: 100% !important;
		min-width: 0;
	}
	/* 武装のスキル欄は表の幅に合わせる */
	#div\.weapons .skill {
		width: 100% !important;
		box-sizing: border-box;
	}

	/* パーツ：脚部の名称欄が細くなりすぎないよう、脚部タイプの選択欄は列の幅に合わせる */
	#parts td:has(> .namelegs) {
		width: 45%;
	}
	#parts select[id="parts.legs.type"] {
		width: 100%;
		min-width: 4.5em;
	}

	/* 機動力：CORE・GENERATOR などの項目名は小さくし、入りきらなければ折り返して入力欄の幅を確保する */
	#mobility td.input:not(:has(input, span)) {
		font-size: 6.5pt;
		word-break: break-all;
	}
	#mobility td.input:has(> input[type=text]) {
		width: 9%;
	}

	/*
	 * 武装：列の幅を割合で決める（長い名前や選択肢で表が広がらないようにする）。
	 * 武装名｜レンジ｜コスト｜属性｜火力タイプ｜Hit数｜威力補正｜威力
	 */
	#weapons, #weapons2 {
		table-layout: fixed;
	}
	:is(#weapons, #weapons2) > tbody > tr:first-child > th:nth-child(1) { width: 20%; }
	:is(#weapons, #weapons2) > tbody > tr:first-child > th:nth-child(2) { width: 10%; }
	:is(#weapons, #weapons2) > tbody > tr:first-child > th:nth-child(3) { width: 15%; }
	:is(#weapons, #weapons2) > tbody > tr:first-child > th:nth-child(4) { width: 10%; }
	:is(#weapons, #weapons2) > tbody > tr:first-child > th:nth-child(5) { width: 13%; }
	:is(#weapons, #weapons2) > tbody > tr:first-child > th:nth-child(6) { width: 9%; }
	:is(#weapons, #weapons2) > tbody > tr:first-child > th:nth-child(7) { width: 12%; }
	:is(#weapons, #weapons2) > tbody > tr:first-child > th:nth-child(8) { width: 11%; }
	:is(#weapons, #weapons2) td.input {
		overflow-wrap: anywhere;
	}
	:is(#weapons, #weapons2) .total {
		font-size: 12pt;
	}
	/* 弾数の◇は小さくして列の幅に収める */
	#div\.weapons .magazine {
		width: 7px;
		padding: 0 !important;
		font-size: 7pt;
	}
	:is(#weapons, #weapons2) .magazinetabletd table {
		margin-top: 0;
	}
}
