/* 記事内目次と右カラムの共通表示。 */

body {
	--journal-toc-sticky-top: 100px;
	--journal-ui-accent: #05749b;
	--journal-ui-accent-soft: #eaf3fc;
	--journal-ui-border: #d8dddf;
	--journal-ui-muted: #6f7b7e;
	--journal-ui-surface: #f7fafb;
	--journal-ui-text: #313b3e;
	--journal-sidebar-divider-space: 28px;
}

body.admin-bar {
	--journal-toc-sticky-top: 132px;
}

.journal-single-columns {
	display: flow-root;
}

body.single-post .entry-content #ez-toc-container.journal-inline-toc {
	display: block;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	padding: 0;
	margin: 40px 0 72px;
	overflow: hidden;
	border: 1px solid var(--journal-ui-border);
	border-radius: 10px;
	background: #fff;
	box-shadow: none;
}

body.single-post .entry-content #ez-toc-container.journal-inline-toc .ez-toc-title-container {
	display: flex;
	box-sizing: border-box;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 64px;
	padding: 12px 20px;
	margin: 0;
	background: var(--journal-ui-surface);
}

body.single-post .entry-content #ez-toc-container.journal-inline-toc p.ez-toc-title {
	display: flex !important;
	align-items: center;
	min-width: 0;
	margin: 0 !important;
	color: var(--journal-ui-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	text-align: left;
}

body.single-post .entry-content #ez-toc-container.journal-inline-toc p.ez-toc-title::before {
	flex: 0 0 auto;
	width: 4px;
	height: 20px;
	margin-right: 10px;
	border-radius: 2px;
	background: #4690c2;
	content: "";
}

body.single-post .entry-content #ez-toc-container.journal-inline-toc .ez-toc-title-toggle,
body.single-post .entry-content #ez-toc-container.journal-inline-toc .ez-toc-toggle {
	display: none !important;
}

body.single-post .entry-content #ez-toc-container.journal-inline-toc > nav {
	display: block !important;
	box-sizing: border-box;
	padding: 0 20px;
	overflow: hidden;
	background: #fff;
	transition: max-height 0.28s ease;
}

body.single-post .entry-content #ez-toc-container.journal-inline-toc.is-expanded > nav {
	border-top: 1px solid #e4e8ea;
}

body.single-post .entry-content #ez-toc-container.journal-inline-toc > nav > .ez-toc-list {
	padding: 18px 0 14px !important;
	margin: 0 !important;
}

body.single-post .entry-content #ez-toc-container.journal-inline-toc.is-collapsed > nav {
	pointer-events: none;
	user-select: none;
}

.journal-inline-toc__toggle {
	position: relative;
	z-index: 1;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 128px;
	height: 40px;
	padding: 0 16px;
	margin: 0;
	transform: none;
	border: 1px solid #b9c7cc;
	border-radius: 20px;
	background: var(--journal-ui-accent-soft);
	color: var(--journal-ui-accent);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.journal-inline-toc__toggle::after {
	box-sizing: border-box;
	width: 7px;
	height: 7px;
	transform: translateY(-2px) rotate(45deg);
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	content: "";
	transition: transform 0.18s ease;
}

.journal-inline-toc__toggle[aria-expanded="true"]::after {
	transform: translateY(2px) rotate(225deg);
}

.journal-inline-toc__toggle:hover {
	border-color: var(--journal-ui-accent);
	background: #dcecf8;
	color: var(--journal-ui-accent);
}

.journal-inline-toc__toggle:focus-visible {
	outline: 2px solid var(--journal-ui-accent);
	outline-offset: 2px;
}

.entry-content .journal-related-navigation,
.editor-styles-wrapper .journal-related-navigation {
	padding: 20px;
	margin: 35px 0;
	border: 1px solid #0056b3;
	border-radius: 8px;
	background: #f0f7ff;
}

.entry-content .journal-related-navigation .branch-nav-header,
.editor-styles-wrapper .journal-related-navigation .branch-nav-header {
	margin-bottom: 15px;
	color: #0056b3;
	font-size: 1em;
	font-weight: 700;
	text-align: left;
}

.entry-content .journal-related-navigation .branch-nav-list,
.editor-styles-wrapper .journal-related-navigation .branch-nav-list {
	padding: 0;
	margin: 0;
	list-style: none;
}

.entry-content .journal-related-navigation .branch-nav-item,
.editor-styles-wrapper .journal-related-navigation .branch-nav-item {
	display: block;
	padding: 12px 15px;
	margin-bottom: 10px;
	overflow: hidden;
	border: 1px solid #d0e3f7;
	border-radius: 4px;
	background: #fff;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.entry-content .journal-related-navigation .branch-nav-item:last-child,
.editor-styles-wrapper .journal-related-navigation .branch-nav-item:last-child {
	margin-bottom: 0;
}

.entry-content .journal-related-navigation .branch-nav-item:hover,
.entry-content .journal-related-navigation .branch-nav-item:focus-visible,
.editor-styles-wrapper .journal-related-navigation .branch-nav-item:hover,
.editor-styles-wrapper .journal-related-navigation .branch-nav-item:focus-visible {
	border-color: #0056b3;
	background: #f9fcff;
	text-decoration: none;
}

.entry-content .journal-related-navigation .branch-nav-item:focus-visible,
.editor-styles-wrapper .journal-related-navigation .branch-nav-item:focus-visible {
	outline: 2px solid #0056b3;
	outline-offset: 2px;
}

.entry-content .journal-related-navigation .nav-target,
.editor-styles-wrapper .journal-related-navigation .nav-target {
	color: #0056b3;
	font-size: 0.85em;
	font-weight: 700;
}

.entry-content .journal-related-navigation .nav-sep,
.editor-styles-wrapper .journal-related-navigation .nav-sep {
	margin: 0 8px;
	color: #ff8c00;
	font-weight: 700;
}

.entry-content .journal-related-navigation .nav-title,
.editor-styles-wrapper .journal-related-navigation .nav-title {
	color: #333;
	font-size: 0.9em;
	text-decoration: none;
}

.editor-styles-wrapper .journal-related-navigation-placeholder {
	padding: 16px;
	border: 1px dashed #0056b3;
	background: #f0f7ff;
	color: #0056b3;
	font-size: 14px;
	text-align: center;
}

.journal-mobile-related,
.journal-mobile-keywords {
	display: none;
}

.journal-post-related-column {
	display: flow-root;
	box-sizing: border-box;
	width: 100%;
}

.journal-sidebar-module {
	box-sizing: border-box;
	margin: 0 0 var(--journal-sidebar-divider-space);
}

body.single-post #secondary > .journal-sidebar-module + .journal-sidebar-module {
	position: relative;
	padding-top: var(--journal-sidebar-divider-space);
}

body.single-post #secondary > .journal-sidebar-module + .journal-sidebar-module::before {
	position: absolute;
	top: 0;
	left: 50%;
	width: 34px;
	height: 1px;
	transform: translateX(-50%);
	background: var(--journal-ui-border);
	content: "";
}

body.single-post #secondary > .journal-sidebar-module:last-child {
	margin-bottom: 0;
}

.journal-keywords {
	padding: 20px 18px;
	border: 1px solid var(--journal-ui-border);
	border-radius: 10px;
	background: var(--journal-ui-surface);
}

.journal-keywords .widget-title,
.journal-related .widget-title,
.journal-editor-pickup .widget-title,
.journal-ranking .widget-title {
	margin-bottom: 16px;
}

#secondary .journal-sidebar-module .widget-title {
	margin-top: 0;
	color: #445156;
	font-size: 16px;
	line-height: 1.4;
}

#secondary .journal-sidebar-module .widget-title span {
	margin-top: 2px;
	color: var(--journal-ui-muted);
	font-size: 11px;
	line-height: 1.35;
}

.journal-related__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.journal-related__item + .journal-related__item {
	margin-top: 14px;
}

.journal-related__link {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	color: #313b3e;
	text-decoration: none;
}

.journal-related__link:hover,
.journal-related__link:focus-visible {
	color: #05749b;
	text-decoration: none;
}

.journal-related__link:focus-visible {
	outline: 2px solid #05749b;
	outline-offset: 3px;
}

.journal-related__image {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #eef2f3;
}

.journal-related__image--placeholder::after {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #8b9598;
	content: "JOURNAL";
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.journal-related__thumbnail {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.journal-related__title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	font-size: 13px;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.journal-sidebar-card__body {
	min-width: 0;
}

.journal-keywords__group + .journal-keywords__group {
	margin-top: 16px;
}

.journal-keywords__category {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.45;
}

.journal-keywords__category a {
	color: #05749b;
	text-decoration: none;
}

.journal-keywords__category a:hover,
.journal-keywords__category a:focus-visible {
	text-decoration: underline;
}

.journal-keywords__tags {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.journal-keywords__tags a {
	display: block;
	min-height: 32px;
	padding: 7px 5px;
	overflow: hidden;
	border: 1px solid #b9c7cc;
	border-radius: 15px;
	background: #fff;
	color: #5f6d70;
	font-size: 10px;
	line-height: 16px;
	text-align: center;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.journal-keywords__tags a:hover,
.journal-keywords__tags a:focus-visible {
	border-color: #05749b;
	background: #eaf3fc;
	color: #05749b;
}

.journal-keywords__tags a:focus-visible {
	outline: 2px solid #05749b;
	outline-offset: 2px;
}

.journal-editor-pickup__image {
	margin: 0 0 12px;
	text-align: center;
}

.journal-editor-pickup__image img {
	display: block;
	width: 152px;
	height: auto;
	margin: 0 auto;
}

.journal-editor-pickup__list,
.journal-ranking ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.journal-editor-pickup .dl-ranking__title,
.journal-ranking .tptn_title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.journal-editor-pickup .dl-ranking li a::before {
	content: none;
}

#secondary .journal-sidebar-card {
	margin: 0;
}

#secondary .journal-sidebar-card + .journal-sidebar-card {
	margin-top: 20px;
}

#secondary .journal-sidebar-card__link {
	position: relative;
	display: grid;
	box-sizing: border-box;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 11px;
	align-items: start;
	width: 100%;
	color: #313b3e;
	text-decoration: none;
}

#secondary .journal-sidebar-card__link:hover,
#secondary .journal-sidebar-card__link:focus-visible {
	color: #05749b;
	text-decoration: none;
}

#secondary .journal-sidebar-card__link:focus-visible {
	outline: 2px solid #05749b;
	outline-offset: 3px;
}

#secondary .journal-sidebar-card__image {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #eef2f3;
}

#secondary .journal-sidebar-card__image--placeholder::after {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #8b9598;
	content: "JOURNAL";
	font-size: 8px;
	font-weight: 700;
	letter-spacing: 0.05em;
}

#secondary .journal-sidebar-card__thumbnail {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

#secondary .journal-sidebar-card__body {
	min-width: 0;
}

#secondary .journal-sidebar-card__title {
	display: -webkit-box;
	width: auto;
	padding: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	color: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.45;
	text-align: left;
	overflow-wrap: anywhere;
}

#secondary .journal-sidebar-card__meta {
	display: block;
	margin-top: 5px;
	overflow: hidden;
	color: var(--journal-ui-muted);
	font-size: 11px;
	line-height: 1.45;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#secondary .journal-ranking .widget-ranking ul li > .journal-sidebar-card__link::before {
	z-index: 1;
	width: 22px;
	height: 22px;
	font-size: 14px;
	line-height: 22px;
}

@media screen and (min-width: 768px) {
	body.single-post .site-content {
		overflow: visible;
	}

	body.single-post .journal-single-columns {
		display: flex;
		align-items: stretch;
		justify-content: space-between;
	}

	body.single-post .journal-single-columns > .content-area {
		float: none;
		min-width: 0;
		width: 72%;
	}

	body.single-post .journal-single-columns > .widget-area {
		float: none;
		align-self: stretch;
		width: 23%;
	}

	body.single-post .journal-post-related-column {
		width: 72%;
	}

	body.single-post #secondary > .journal-sidebar-module.journal-related,
	body:not(.single-post):not(.category) #secondary.widget-area {
		position: sticky;
		top: var(--journal-toc-sticky-top);
		z-index: 2;
	}

	body.single-post #secondary > .journal-sidebar-module.journal-related {
		background: #fff;
	}

	body:not(.single-post):not(.category) #secondary.widget-area {
		height: fit-content;
	}
}

@media screen and (min-width: 768px) and (max-width: 782px) {
	body.admin-bar {
		--journal-toc-sticky-top: 146px;
	}
}

@media screen and (max-width: 767px) {
	body.single-post .entry-content #ez-toc-container.journal-inline-toc {
		margin: 32px 0 56px;
		border-radius: 8px;
	}

	body.single-post .entry-content #ez-toc-container.journal-inline-toc .ez-toc-title-container {
		gap: 10px;
		min-height: 60px;
		padding: 10px 14px;
	}

	body.single-post .entry-content #ez-toc-container.journal-inline-toc p.ez-toc-title {
		font-size: 17px;
	}

	body.single-post .entry-content #ez-toc-container.journal-inline-toc > nav {
		padding: 0 14px;
	}

	body.single-post .entry-content #ez-toc-container.journal-inline-toc > nav > .ez-toc-list {
		padding: 16px 0 12px !important;
	}

	.journal-inline-toc__toggle {
		min-width: 116px;
		height: 40px;
		padding: 0 12px;
		font-size: 12px;
	}

	.entry-content .journal-related-navigation .branch-nav-item,
	.editor-styles-wrapper .journal-related-navigation .branch-nav-item {
		padding: 10px;
		white-space: normal;
	}

	body.single-post .journal-single-columns > .widget-area {
		display: none;
	}

	.journal-mobile-related,
	.journal-mobile-keywords {
		display: block;
		margin: 32px 0;
		text-align: left;
	}

	.journal-mobile-related .journal-sidebar-module,
	.journal-mobile-keywords .journal-sidebar-module {
		margin-bottom: 0;
	}

	.journal-mobile-related .journal-related__link {
		grid-template-columns: 120px minmax(0, 1fr);
		gap: 14px;
	}

	.journal-mobile-related .journal-related__title {
		font-size: 14px;
	}

	.journal-mobile-related .journal-sidebar-card__meta {
		display: none;
	}

	.journal-mobile-keywords .journal-keywords__tags a {
		min-height: 34px;
		padding: 8px 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.single-post .entry-content #ez-toc-container.journal-inline-toc > nav {
		transition: none;
	}
}
