@charset "utf-8";
/*
 * ブロックエディターのテーマ側の補正（手書き。必要なら直してよい）
 * 本文の見た目は system の acms-editor.min.css が担当する。include/head/link.html で unit_extend.css の後に読む。テーマの本文の枠は acms-entry-v31 に改名したので、.acms-entry はブロックエディターの枠だけ（kk-kojimagumi 3.2.40 更新、2026-11-17）
 */

/* 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;
}

/* テーマの .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 に指定が無い。幅はテーマのユニットグループの切り替えに合わせる。grid-auto-flow も戻さないと横に並ぶ） */
@media (max-width: 479px) {
	.acms-entry [data-type=columns] {
		grid-auto-flow: row;
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ==========================================================================
 * kk-kojimagumi のテーマ向け（2026-11-17）
 * テーマの .entry-column h2〜h4（admin-field.css の margin: 0 10px 10px。block-editor.css より後に読まれる）、
 * .entry-column p（14px・下 30px）、.entry-column .caption（上 0・下 20px）、.entry-column a:link（青）が
 * acms-editor より強く効くので、ブロックエディターの枠の中だけ acms-editor の値に戻す。
 * 文字の大きさは 3.2 の既定（段落 768px 以上 16px・未満 14px。アラタさん 2026-11-17「既定でいい」）。
 * 書体・色・行間・字間はテーマのまま。カテゴリー別の CSS（rccd_*.css）の見出しのデザインはそちらが優先される
 * ========================================================================== */
.entry-column .acms-entry :is(h2, h3, h4, h5, h6, p, ul, ol, table, blockquote, pre) {
	margin-left: 0;
	margin-right: 0;
}
.entry-column .acms-entry h2 { margin-top: calc(var(--unit-margin-top) + .923em); margin-bottom: var(--unit-margin-bottom); font-size: 22px; }
.entry-column .acms-entry h3 { margin-top: calc(var(--unit-margin-top) + .667em); margin-bottom: var(--unit-margin-bottom); font-size: 20px; }
.entry-column .acms-entry h4 { margin-top: calc(var(--unit-margin-top) + .4em); margin-bottom: var(--unit-margin-bottom); font-size: 16px; }
.entry-column .acms-entry :is(h5, h6) { margin-top: calc(var(--unit-margin-top) + .25em); margin-bottom: var(--unit-margin-bottom); font-size: 14px; }
.entry-column .acms-entry p { margin-top: var(--unit-margin-top); margin-bottom: var(--unit-margin-bottom); font-size: 14px; }
.entry-column .acms-entry li { font-size: 14px; }
@media (min-width: 768px) {
	.entry-column .acms-entry h2 { font-size: 26px; }
	.entry-column .acms-entry h3 { font-size: 24px; }
	.entry-column .acms-entry h4 { font-size: 20px; }
	.entry-column .acms-entry :is(h5, h6) { font-size: 16px; }
	.entry-column .acms-entry p,
	.entry-column .acms-entry li { font-size: 16px; }
}
.entry-column .acms-entry > :first-child { margin-top: 0; }
.entry-column .acms-entry li > p,
.entry-column .acms-entry :is(th, td, blockquote) > p { margin: 0; }
/* 画像・ファイルのキャプション */
.entry-column .acms-entry figcaption,
.entry-column .acms-entry [data-type=fileBlock] .caption {
	margin: 4px 0 0;
}
.entry-column .acms-entry figcaption { font-size: .9em; }
/* リンクボタン・ファイルのボタン型の文字は白（テーマの .entry-column a:link の青が勝つ） */
.entry-column .acms-entry [data-type="linkButton"] a:is(:link, :visited, :hover, :active, :focus),
.entry-column .acms-entry [data-type="fileBlock"][data-display-type="button"] a:is(:link, :visited, :hover, :active, :focus) {
	color: #fff;
}
/* リスト・引用・コード・表の上下の余白（テーマの下 25〜30px・上 0 が勝つので、段落と同じ間隔に） */
.entry-column .acms-entry > :is(ul, ol, blockquote, pre, table) {
	margin-top: var(--unit-margin-top);
	margin-bottom: var(--unit-margin-bottom);
}
/* ダイレクト編集の帯（ログイン中だけ出る）：3.2 の acms-admin.css はボタンを height: 42px に固定していて、
   テーマの書体・行間だと文字が帯の外にはみ出し、後ろの本文が透けることがある（eibis）。最低 42px のまま高さを中身に合わせる */
#js-edit_inplace-control {
	width: max-content;
}
#js-edit_inplace-control button {
	height: auto;
	min-height: 42px;
	padding: 4px 0;
	line-height: 1.2;
}
#js-edit_inplace-control .js-edit_inplace-control-label {
	line-height: 1.2;
}
/* テーマは本文のユニットを .acms-grid（左右 -10px）で囲み、既存のユニットは左右 10px 内側に入る（3.1 の acms.css）。
   ブロックエディターの枠も同じだけ内側に入れて、文字・画像・表の端をほかのユニットと揃える（entry-508 で 10px ずつはみ出していた。2026-11-18） */
.acms-entry-v31 .column-block-editor.acms-entry {
	padding-left: 10px;
	padding-right: 10px;
}
