@charset "utf-8";
/*
 * ブロックエディターのテーマ側の補正（手書き。必要なら直してよい）
 * 本文の見た目は system の acms-editor.min.css が担当する。include/head/link.html で読み込む
 */

/* 3.2 の acms.css が :root で定義している変数。このテーマは 3.1 の acms.css なので、ブロックエディターの中にだけ足す */
.acms-entry {
	--unit-gap-x: 1.25rem;
	--unit-margin-top: 1rem;
	--unit-margin-bottom: 0;
}

/* acms-editor の .column-image-left { display: flex } などが配置 v1 の既存ユニットに効くので戻す */
[class*="column-"]:is([class*="-left"], [class*="-right"], [class*="-center"]) {
	display: block;
}

/* テーマの .caption { font-size: 88% !important } が先に効き、親の font-size: 0 から計算されて 0 になる */
.acms-entry [data-type=fileBlock][data-display-type=icon] .caption {
	font-size: 12px !important;
}

/* テーマの .caption { margin-top: 0 } が acms-editor の余白より先に効くので、画像・ファイルとの間を戻す */
.acms-entry figcaption,
.acms-entry [data-type=fileBlock][data-display-type=icon] .caption {
	margin-top: 4px;
}

/* 3.1 の acms.css の .acms-entry p などの左右 10px を消して、文字を画像の左端に揃える */
.acms-entry h2,
.acms-entry h3,
.acms-entry h4,
.acms-entry h5,
.acms-entry h6,
.acms-entry p {
	margin-right: 0;
	margin-left: 0;
}

/* テーマの .entry ul { list-style-position: inside } だと、<li><p> の印の下に文章が落ちる */
.acms-entry ul,
.acms-entry ol {
	padding-left: 1.5rem;
	list-style-position: outside;
}
.acms-entry ul li,
.acms-entry ol li {
	padding: 0;
}

/* テーマの .entry ul などの上の余白 0 が acms-editor より先に効き、引用と表がくっつくので戻す */
.acms-entry ul,
.acms-entry ol,
.acms-entry table {
	margin-top: var(--unit-margin-top);
}
.acms-entry h5 {
	margin-top: calc(var(--unit-margin-top) + 0.25em);
}

/* リスト・表の中の段落はテーマの段落の余白を受けない */
.acms-entry li > p,
.acms-entry th > p,
.acms-entry td > p,
.acms-entry blockquote > p {
	margin: 0;
	padding: 0;
}

/* 既存のユニットは 3.1 の acms.css で左右 10px 内側に入るので、ブロックエディターの枠も同じ幅に揃える */
.column-block-editor.acms-entry {
	padding-right: 10px;
	padding-left: 10px;
}
.column-block-editor.acms-entry h2,
.column-block-editor.acms-entry h3,
.column-block-editor.acms-entry h4,
.column-block-editor.acms-entry h5,
.column-block-editor.acms-entry h6 {
	margin-right: 0;
	margin-left: 0;
}

/* テーマの .entry-column p（上 0・下 30px）が acms-editor より先に効き、画像の直後の段落がくっつくので、ブロックエディターの余白に戻す */
.acms-entry p {
	margin-top: var(--unit-margin-top);
	margin-bottom: var(--unit-margin-bottom);
}
.acms-entry > p:first-child,
.acms-entry [data-type=column] > p:first-child {
	margin-top: 0;
}

/* スマホではカラムを縦に並べる（本体の CSS に指定が無い。切り替えの幅は既存のユニットグループの .acms-col-sm-* と同じ） */
@media (max-width: 479px) {
	.acms-entry [data-type=columns] {
		grid-auto-flow: row;
		grid-template-columns: minmax(0, 1fr);
	}
}
