/* 二藍 デザインパーツ:見出し
   色・太さは変数で調整できます。 */
:root {
	--fd-heading-color: #422006;
	--fd-accent: #854d0e;
	--fd-accent-soft: rgba(133, 77, 14, 0.12);
	--fd-heading-font: inherit;
	--fd-h1-size: 1.75rem;
	--fd-h2-size: 1.5rem;
	--fd-h3-size: 1.1875rem;
	--fd-h4-size: 1.0625rem;
	--fd-h5-size: 0.9375rem;
}

/* h1:中央寄せ + 下に枠いっぱいの、両端が透けるグラデーション線 */
.fd-h1 {
	text-align: center;
	font-family: var(--fd-heading-font);
	font-size: var(--fd-h1-size);
	font-weight: 700;
	letter-spacing: 0.15em;
	line-height: 1.5;
	color: var(--fd-heading-color);
	margin: 0 0 3rem;
}
.fd-h1::after {
	content: "";
	display: block;
	width: 100%;
	height: 1px;
	margin: 0.625rem auto 0;
	background: linear-gradient(to right, transparent, var(--fd-accent), transparent);
}

/* h2:左に細い枠 + 薄いグラデーション背景 + 右端にうっすら格子柄 */
.entry-content h2 {
	font-family: var(--fd-heading-font);
	font-size: var(--fd-h2-size);
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.6;
	color: var(--fd-heading-color);
	margin: 3.5rem 0 1.5rem;
	padding: 0.3rem 1rem;
	border-left: 3px solid var(--fd-accent);
	background: linear-gradient(to right, var(--fd-accent-soft), transparent);
	position: relative;
}
/* 下の影:右に行くほど薄くなる(box-shadow はグラデーションで切れないので帯で作る) */
.entry-content h2::before {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 8px;
	pointer-events: none;
	background: linear-gradient(to bottom, color-mix(in srgb, var(--fd-heading-color) 10%, transparent), transparent);
	-webkit-mask-image: linear-gradient(to right, #000, transparent);
	mask-image: linear-gradient(to right, #000, transparent);
}
.entry-content h2::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 40%;
	pointer-events: none;
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, 0.7) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.7) 1px, transparent 1px);
	background-color: color-mix(in srgb, var(--fd-accent) 2%, transparent);
	background-size: 10px 10px;
	-webkit-mask-image: linear-gradient(to left, #000, transparent);
	mask-image: linear-gradient(to left, #000, transparent);
}

/* h3:下に左から消えていくグラデーション線 */
.entry-content h3 {
	font-family: var(--fd-heading-font);
	font-size: var(--fd-h3-size);
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.6;
	color: var(--fd-heading-color);
	margin: 2.5rem 0 1.25rem;
	padding: 0 0 0.5rem;
	background: linear-gradient(to right, var(--fd-accent), transparent) left bottom / 100% 1px no-repeat;
}

/* h4:小さなひし形のあしらい */
.entry-content h4 {
	font-family: var(--fd-heading-font);
	font-size: var(--fd-h4-size);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.6;
	color: var(--fd-heading-color);
	margin: 2rem 0 1rem;
}
.entry-content h4::before {
	content: "";
	display: inline-block;
	width: 0.45em;
	height: 0.45em;
	margin-right: 0.6em;
	vertical-align: 0.1em;
	background: linear-gradient(135deg, var(--fd-accent), var(--fd-accent-soft));
	transform: rotate(45deg);
}

/* h5:先頭に短いグラデーション線 */
.entry-content h5 {
	font-family: var(--fd-heading-font);
	font-size: var(--fd-h5-size);
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.6;
	color: var(--fd-accent);
	margin: 1.5rem 0 0.75rem;
}
.entry-content h5::before {
	content: "";
	display: inline-block;
	width: 1.5em;
	height: 1px;
	margin-right: 0.6em;
	vertical-align: 0.3em;
	background: linear-gradient(to right, var(--fd-accent), transparent);
}

/* 段落どうしの間隔(ブロックエディタと同じ見た目にする) */
.entry-content p {
	margin: 0 0 1.75em;
}

/* 空の段落もブロックエディタと同じように1行分の高さで表示する */
.entry-content p:empty::before {
	content: "\00a0";
}

/* リンク:下線なし + リンクアイコン。ホバー時だけ色を変え、訪問済みでも色は変えない */
.entry-content a:where(:not(.wp-block-button__link)),
.entry-content a:where(:not(.wp-block-button__link)):visited {
	color: var(--fd-accent);
	text-decoration: none;
}
.entry-content a:where(:not(.wp-block-button__link)):hover {
	color: color-mix(in srgb, var(--fd-accent) 55%, #fff);
}
.entry-content a[href]:not([href^="#"]):not(.wp-block-button__link):not(:has(img))::after {
	content: "";
	display: inline-block;
	width: 0.85em;
	height: 0.85em;
	margin-left: 0.25em;
	vertical-align: -0.1em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14L21 3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14L21 3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* リンク先が instagram.com のリンクは、フッターの「公式Instagram」ボタンと同じ見た目にする(文字はリンクの文字) */
.entry-content a[href*="instagram.com"],
.entry-content a[href*="instagram.com"]:visited {
	display: inline-block;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	background: linear-gradient(to right, #f58529, #dd2a7b, #8134af);
	border-radius: 2px;
	padding: 0.5rem 1rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	text-decoration: none;
	transition: opacity 0.15s;
}
.entry-content a[href*="instagram.com"]:hover {
	color: #fff;
	opacity: 0.8;
}

/* リンク先が x.com / twitter.com のリンクは、Instagramと同じ形で黒地のボタンにする(「box.com」などに反応しないようドメインの先頭で判定) */
.entry-content a:is([href^="https://x.com"], [href^="https://www.x.com"], [href^="https://twitter.com"], [href^="https://www.twitter.com"], [href^="https://mobile.twitter.com"], [href^="http://x.com"], [href^="http://twitter.com"]),
.entry-content a:is([href^="https://x.com"], [href^="https://www.x.com"], [href^="https://twitter.com"], [href^="https://www.twitter.com"], [href^="https://mobile.twitter.com"], [href^="http://x.com"], [href^="http://twitter.com"]):visited {
	display: inline-block;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	background: #000;
	border-radius: 2px;
	padding: 0.5rem 1rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	text-decoration: none;
	transition: opacity 0.15s;
}
.entry-content a:is([href^="https://x.com"], [href^="https://www.x.com"], [href^="https://twitter.com"], [href^="https://www.twitter.com"], [href^="https://mobile.twitter.com"], [href^="http://x.com"], [href^="http://twitter.com"]):hover {
	color: #fff;
	opacity: 0.8;
}

/* 文字用ボタン(editor-formats.js)の見た目 */
.fd-bold {
	font-weight: 700;
}

/* ===== 画像ブロックの装飾(影・枠)。image-style.js で切り替える ===== */
/* 枠:記事トップ画像と同じ(3px の茶色の線 + 白い余白) */
.fd-img-frame img {
	box-sizing: border-box;
	border: 3px solid rgba(133, 77, 14, 0.4);
	background: #fff;
	padding: 0.75rem;
}
/* 影:強さは --fd-shadow-alpha(初期は記事トップ画像と同じ 0.12) */
.fd-img-shadow img {
	box-shadow: 0 4px 14px rgba(66, 32, 6, var(--fd-shadow-alpha, 0.12));
}

/* 画像ブロック:幅・高さを両方指定しても引き伸ばさず、縦横比を保つ(トリミングを選んだときはその指定が優先) */
.wp-block-image img {
	object-fit: contain;
}

/* リスト:Tailwind のリセットで消える記号(●・数字など)を戻す。種類はリストブロックの「スタイル」で選ぶ */
.entry-content ul,
.editor-styles-wrapper ul.wp-block-list {
	list-style: disc;
}
.entry-content ol,
.editor-styles-wrapper ol.wp-block-list {
	list-style: decimal;
}
.entry-content ul,
.entry-content ol,
.editor-styles-wrapper .wp-block-list {
	padding-left: 1.6em;
	/* 左右のmarginは指定しない(エディタが本文幅で中央寄せする margin: auto を上書きしてしまうため) */
	margin-top: 1em;
	margin-bottom: 1em;
}
.entry-content li {
	margin: 0.3em 0;
}
.entry-content .wp-block-list.is-style-fd-circle { list-style-type: circle; }
.entry-content .wp-block-list.is-style-fd-square { list-style-type: square; }
.entry-content .wp-block-list.is-style-fd-decimal-zero { list-style-type: decimal-leading-zero; }
.entry-content .wp-block-list.is-style-fd-lower-alpha { list-style-type: lower-alpha; }
.entry-content .wp-block-list.is-style-fd-upper-alpha { list-style-type: upper-alpha; }
.entry-content .wp-block-list.is-style-fd-lower-roman { list-style-type: lower-roman; }
.entry-content .wp-block-list.is-style-fd-upper-roman { list-style-type: upper-roman; }
.entry-content .wp-block-list.is-style-fd-kanji { list-style-type: japanese-informal; }
.entry-content .wp-block-list.is-style-fd-kanji-formal { list-style-type: japanese-formal; }
.entry-content .wp-block-list.is-style-fd-none { list-style-type: none; padding-left: 0; }
/* エディタ内も同じ見た目に */
.editor-styles-wrapper .wp-block-list.is-style-fd-circle { list-style-type: circle; }
.editor-styles-wrapper .wp-block-list.is-style-fd-square { list-style-type: square; }
.editor-styles-wrapper .wp-block-list.is-style-fd-decimal-zero { list-style-type: decimal-leading-zero; }
.editor-styles-wrapper .wp-block-list.is-style-fd-lower-alpha { list-style-type: lower-alpha; }
.editor-styles-wrapper .wp-block-list.is-style-fd-upper-alpha { list-style-type: upper-alpha; }
.editor-styles-wrapper .wp-block-list.is-style-fd-lower-roman { list-style-type: lower-roman; }
.editor-styles-wrapper .wp-block-list.is-style-fd-upper-roman { list-style-type: upper-roman; }
.editor-styles-wrapper .wp-block-list.is-style-fd-kanji { list-style-type: japanese-informal; }
.editor-styles-wrapper .wp-block-list.is-style-fd-kanji-formal { list-style-type: japanese-formal; }
.editor-styles-wrapper .wp-block-list.is-style-fd-none { list-style-type: none; padding-left: 0; }
