/**
 * Single post entry content typography & blocks.
 */

.entry-content {
	--hottoke-teal: #00a19a;
	--hottoke-teal-dark: #007f79;
	--hottoke-teal-light: #f1f9f8;
	--hottoke-text: #334155;
	--hottoke-heading: #0f172a;
	color: var(--hottoke-text);
	line-height: 1.9;
	word-break: break-word;
}

.entry-content > *:first-child {
	margin-top: 0 !important;
}

/* --- Headings --- */

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: var(--hottoke-heading);
	font-weight: 900;
	line-height: 1.45;
	letter-spacing: -0.02em;
}

/* H1（本文内・稀） */
.entry-content h1 {
	font-size: clamp(1.35rem, 4vw, 1.75rem);
	margin: 2.5rem 0 1.25rem;
	padding: 1rem 1.25rem 1rem 1.35rem;
	border-radius: 14px;
	border: 2px solid var(--hottoke-teal);
	background: linear-gradient(135deg, #ffffff 0%, var(--hottoke-teal-light) 100%);
	box-shadow: 0 4px 14px rgba(0, 161, 154, 0.12);
	position: relative;
}

.entry-content h1::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 6px;
	border-radius: 14px 0 0 14px;
	background: linear-gradient(180deg, #5ed4cd 0%, var(--hottoke-teal) 55%, var(--hottoke-teal-dark) 100%);
}

/* H2：下線のみ */
.entry-content h2 {
	font-size: clamp(1.25rem, 3.5vw, 1.55rem);
	margin: 2.75rem 0 1.15rem;
	padding: 0 0 0.65rem;
	border: none;
	border-bottom: 3px solid var(--hottoke-teal);
	background: none;
	box-shadow: none;
}

/* H3：下線のみ（やや細め） */
.entry-content h3 {
	font-size: clamp(1.1rem, 3vw, 1.28rem);
	font-weight: 800;
	margin: 2rem 0 0.85rem;
	padding: 0 0 0.5rem;
	border: none;
	border-bottom: 2px solid rgba(0, 161, 154, 0.45);
	background: none;
}

/* H4：下線のみ（さらに細め・短め） */
.entry-content h4 {
	font-size: 1.05rem;
	font-weight: 800;
	margin: 1.6rem 0 0.65rem;
	padding: 0 0 0.4rem;
	border: none;
	border-bottom: 1px solid rgba(0, 161, 154, 0.3);
	color: #1e293b;
	background: none;
}

/* --- Paragraphs & inline --- */

.entry-content p {
	margin: 1.05rem 0;
	line-height: 1.95;
}

.entry-content strong,
.entry-content b {
	font-weight: 900;
	color: #0f172a;
	background: linear-gradient(transparent 62%, rgba(0, 161, 154, 0.18) 62%);
	padding: 0 0.1em;
}

.entry-content em,
.entry-content i {
	font-style: italic;
	color: #475569;
}

.entry-content mark {
	background: rgba(0, 161, 154, 0.15);
	color: var(--hottoke-heading);
	padding: 0.1em 0.35em;
	border-radius: 4px;
}

/* --- Lists --- */

.entry-content ul,
.entry-content ol {
	margin: 1.15rem 0 1.35rem;
	padding: 0;
	list-style: none;
}

.entry-content ul li,
.entry-content ol li {
	position: relative;
	margin: 0.55rem 0;
	padding-left: 1.65rem;
	line-height: 1.85;
}

.entry-content ul > li::before {
	content: '';
	position: absolute;
	left: 0.35rem;
	top: 0.72em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--hottoke-teal);
	box-shadow: 0 0 0 3px rgba(0, 161, 154, 0.15);
}

.entry-content ul ul > li::before {
	width: 6px;
	height: 6px;
	background: transparent;
	border: 2px solid var(--hottoke-teal);
	box-shadow: none;
	top: 0.75em;
}

.entry-content ol {
	counter-reset: hottoke-ol;
}

.entry-content ol > li {
	counter-increment: hottoke-ol;
}

.entry-content ol > li::before {
	content: counter(hottoke-ol);
	position: absolute;
	left: 0;
	top: 0.15em;
	min-width: 1.35rem;
	height: 1.35rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.72rem;
	font-weight: 900;
	color: #fff;
	background: linear-gradient(145deg, #5ed4cd, var(--hottoke-teal));
	border-radius: 6px;
	line-height: 1;
}

.entry-content li > ul,
.entry-content li > ol {
	margin: 0.5rem 0 0.25rem;
}

/* --- Horizontal rule --- */

.entry-content hr {
	border: 0;
	height: 2px;
	margin: 2.25rem 0;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(0, 161, 154, 0.15) 15%,
		rgba(0, 161, 154, 0.4) 50%,
		rgba(0, 161, 154, 0.15) 85%,
		transparent 100%
	);
}

/* --- Blockquote --- */

.entry-content blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.15rem 1rem 1.25rem;
	border: none;
	border-left: 5px solid var(--hottoke-teal);
	border-radius: 0 12px 12px 0;
	background: linear-gradient(90deg, var(--hottoke-teal-light) 0%, #f8fafc 100%);
	color: #475569;
	font-size: 0.95em;
}

.entry-content blockquote p {
	margin: 0.5rem 0;
}

.entry-content blockquote p:first-child {
	margin-top: 0;
}

.entry-content blockquote cite {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.85em;
	font-style: normal;
	font-weight: 700;
	color: var(--hottoke-teal-dark);
}

/* --- Links & media --- */

.entry-content a {
	color: var(--hottoke-teal);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(0, 161, 154, 0.45);
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.entry-content a:hover {
	color: var(--hottoke-teal-dark);
	text-decoration-color: var(--hottoke-teal);
}

.entry-content img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 1.35rem auto;
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.entry-content figure {
	margin: 1.5rem 0;
}

.entry-content figcaption {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	color: #64748b;
	text-align: center;
	font-weight: 600;
}

/* --- Table --- */

.entry-content table {
	width: 100%;
	margin: 1.5rem 0;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 12px;
	overflow: hidden;
	font-size: 0.92em;
	border: 1px solid #e2e8f0;
}

.entry-content th,
.entry-content td {
	padding: 0.65rem 0.85rem;
	border-bottom: 1px solid #e2e8f0;
	text-align: left;
}

.entry-content th {
	background: var(--hottoke-teal);
	color: #fff;
	font-weight: 800;
}

.entry-content tr:last-child td {
	border-bottom: none;
}

.entry-content tr:nth-child(even) td {
	background: #f8fafc;
}

/* --- Code --- */

.entry-content code {
	font-size: 0.88em;
	padding: 0.15em 0.45em;
	border-radius: 6px;
	background: #f1f5f9;
	color: #0f766e;
	font-weight: 600;
}

.entry-content pre {
	margin: 1.25rem 0;
	padding: 1rem 1.15rem;
	border-radius: 12px;
	background: #1e293b;
	color: #e2e8f0;
	overflow-x: auto;
	font-size: 0.88em;
	line-height: 1.65;
}

.entry-content pre code {
	background: transparent;
	color: inherit;
	padding: 0;
	font-weight: 400;
}

/* --- WordPress blocks --- */

.entry-content .wp-block-separator,
.entry-content .wp-block-separator.is-style-wide,
.entry-content .wp-block-separator.is-style-dots {
	border: none;
	max-width: none;
}

.entry-content .wp-block-quote {
	border-left: 5px solid var(--hottoke-teal);
	padding-left: 1.25rem;
}

.entry-content .wp-block-button__link {
	text-decoration: none;
	border-radius: 9999px;
}

/* --- Table of contents（本文リスト用スタイルの影響を受けないようリセット） --- */

.entry-content .hottoke-toc {
	margin: 1.25rem 0 1.5rem;
	padding: 0.65rem 0.85rem;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #f8fafc;
}

.entry-content .hottoke-toc__label {
	margin: 0 0 0.55rem;
	font-size: 1.6rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-align: center;
	color: var(--hottoke-teal);
}

.entry-content .hottoke-toc__list,
.entry-content .hottoke-toc__sublist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.entry-content .hottoke-toc ul > li,
.entry-content .hottoke-toc ol > li {
	margin: 0;
	padding-left: 0;
}

.entry-content .hottoke-toc ul > li::before,
.entry-content .hottoke-toc ol > li::before {
	content: none;
	display: none;
}

.entry-content .hottoke-toc__list {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.entry-content .hottoke-toc__sublist {
	margin: 0.2rem 0 0.15rem 0.85rem;
	padding-left: 0;
	border-left: none;
	display: flex;
	flex-direction: column;
	gap: 0.12rem;
}

.entry-content .hottoke-toc__link {
	display: block;
	padding: 0.15rem 0;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.5;
	color: #475569;
	text-decoration: none;
	transition: color 0.15s ease;
}

.entry-content .hottoke-toc__item--h1 > .hottoke-toc__link {
	font-size: 0.9rem;
	font-weight: 700;
	color: #334155;
}

.entry-content .hottoke-toc__item--h2 > .hottoke-toc__link {
	font-size: 0.82rem;
	font-weight: 500;
	color: #64748b;
}

.entry-content .hottoke-toc__link:hover {
	color: var(--hottoke-teal);
}

.entry-content h1[id],
.entry-content h2[id] {
	scroll-margin-top: 6.5rem;
}

/* --- CTA banner (large) shortcode --- */

.entry-content .hottoke-cta-banner-lg p {
	margin: 0;
}

/* --- Sidebar related posts --- */

.hottoke-related-posts__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	line-height: 1.45;
	max-height: calc(1.45em * 3);
	word-break: break-word;
	overflow-wrap: anywhere;
	text-overflow: ellipsis;
}
