/* Standalone editorial internal links: one large keyboard-accessible target. */
.ec-article-page a.ec-internal-link-card {
	display: flex; align-items: stretch; gap: 16px; box-sizing: border-box;
	width: 100%; margin: 16px 0; padding: 14px; border: 1px solid #ccdcd5;
	border-radius: 14px; background: #f7fbf8; color: #173d33; text-decoration: none;
	box-shadow: 0 2px 8px rgba(23,61,51,.06); overflow: hidden;
}
.ec-article-page a.ec-internal-link-card:hover { border-color: #28765a; background: #edf7ef; }
.ec-article-page a.ec-internal-link-card:focus-visible { outline: 3px solid #28765a; outline-offset: 3px; }
.ec-internal-link-card__image { flex: 0 0 116px; align-self: flex-start; }
.ec-article-page .ec-internal-link-card__image img { display: block; width: 116px; height: 88px; margin: 0; object-fit: cover; border-radius: 8px; }
.ec-internal-link-card__body { display: flex; flex: 1; flex-direction: column; gap: 7px; min-width: 0; }
.ec-internal-link-card__title { font-size: 1rem; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.ec-internal-link-card__context { font-size: .85rem; line-height: 1.6; color: #4a6257; overflow-wrap: anywhere; }
.ec-internal-link-card__action { font-size: .8rem; font-weight: 700; color: #236747; }
@media (max-width: 480px) {
	.ec-article-page a.ec-internal-link-card { gap: 10px; padding: 11px; }
	.ec-internal-link-card__image { flex-basis: 76px; }
	.ec-article-page .ec-internal-link-card__image img { width: 76px; height: 76px; }
}

/* =============================================================
   Article images
   記事内の写真は最大560pxの共通枠に収め、中央に置く。
   画像は切り取らず（contain）、クリックで拡大表示する。
   ============================================================= */
.ec-article-page .ec-article-figure,
.ec-article-page .p-articleThumb {
	display: block;
	box-sizing: border-box;
	width: min(100%, 560px);
	max-width: min(100%, 560px);
	margin: 28px auto;
	padding-bottom: 52px;
	float: none;
	text-align: center;
}

.ec-article-page .ec-article-figure img.ec-article-image,
.ec-article-page .p-articleThumb img {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: auto;
	max-height: none;
	aspect-ratio: 4 / 3;
	margin: 0 auto;
	object-fit: contain;
	border: 0;
	border-radius: var(--ec-r, 18px);
	background: var(--ec-cream, #fff8ec);
	box-shadow: 0 1px 2px rgba(30, 36, 67, .05), 0 10px 26px rgba(28, 92, 160, .1);
}

.ec-article-page .ec-article-figure figcaption {
	margin: 10px 0 0;
	padding: 0 4px;
	color: var(--ec-mute, #646a85);
	font-size: .76rem;
	line-height: 1.6;
	text-align: center;
}

/* 拡大できる画像 */
.ec-zoomable {
	cursor: zoom-in;
	transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s cubic-bezier(.22, 1, .36, 1);
}

.ec-zoomable:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(30, 36, 67, .06), 0 18px 38px rgba(28, 92, 160, .18);
}

.ec-zoomable:focus-visible {
	outline: 3px solid rgba(28, 138, 209, .5);
	outline-offset: 3px;
}

.ec-article-figure,
.ec-article-page .p-articleThumb {
	position: relative;
}

.ec-article-page .ec-image-zoom {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 14px 8px 36px;
	border: 1px solid #ced8e2;
	border-radius: 24px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e2443' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E") 12px center / 16px no-repeat;
	color: #1e2443;
	font: 700 13px/1.4 sans-serif;
	box-shadow: 0 2px 8px rgba(30, 36, 67, .18);
	cursor: zoom-in;
}

.ec-article-page .ec-image-zoom:hover {
	background-color: #e9f2fa;
}

.ec-article-page .ec-image-zoom:focus-visible {
	outline: 3px solid #1767a4;
	outline-offset: 3px;
}

/* ----- Lightbox ----- */
.ec-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 100vh;
	height: 100dvh;
	padding: 70px 4vw 24px;
	overflow: hidden;
	background: rgba(16, 20, 40, .88);
	animation: ec-lightbox-in .25s ease-out;
}

.ec-lightbox[hidden] {
	display: none;
}

.ec-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 100%;
	max-width: 92vw;
	max-height: 100%;
	min-height: 0;
	margin: 0;
}

.ec-lightbox__img {
	display: block;
	max-width: 92vw;
	flex: 0 1 auto;
	min-height: 0;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
	animation: ec-lightbox-zoom .3s cubic-bezier(.22, 1, .36, 1);
}

.ec-lightbox__caption {
	flex: 0 0 auto;
	box-sizing: border-box;
	max-width: min(100%, 80ch);
	max-height: min(25vh, 180px);
	margin: 0;
	padding: 0 4px;
	overflow: auto;
	overflow-wrap: anywhere;
	overscroll-behavior: contain;
	color: rgba(255, 255, 255, .95);
	font-size: .8rem;
	line-height: 1.6;
	text-align: center;
}

.ec-lightbox__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e2443' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / 18px no-repeat;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	cursor: pointer;
}

.ec-lightbox__caption:focus-visible {
	outline: 2px solid #ffc53d;
	outline-offset: -2px;
}

.ec-lightbox__close:focus-visible {
	outline: 3px solid #ffc53d;
	outline-offset: 3px;
}

html.ec-lightbox-open {
	overflow: hidden;
}

@keyframes ec-lightbox-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes ec-lightbox-zoom {
	from { opacity: 0; transform: scale(.94); }
	to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 782px) {
	.ec-article-page .ec-article-figure,
	.ec-article-page .p-articleThumb {
		width: min(100%, 560px);
		margin: 20px auto;
	}

	.ec-lightbox {
		padding: 66px 2vw 16px;
	}

	.ec-lightbox__img {
		max-width: 96vw;
		max-height: 100%;
	}
}

/* Article footer: practical details, publisher guidance and further reading. */
.ec-article-page :is(.post_content, .entry-content) .ec-affiliate-banner:not(.ec-adsense-banner) {
	box-sizing: border-box;
	width: min(100%, 640px);
	max-width: 100%;
	margin-inline: auto;
	padding: 16px;
}

.ec-article-page :is(.post_content, .entry-content) .ec-affiliate-banner:not(.ec-adsense-banner) :is(.ec-affiliate-code, .ec-affiliate-link, .ec-affiliate-cta) {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
}

.ec-article-page :is(.post_content, .entry-content) .ec-affiliate-cta {
	white-space: normal;
	overflow-wrap: anywhere;
	text-align: center;
	line-height: 1.5;
}

.ec-article-page .ec-article-footer {
	container-type: inline-size;
	margin-top: 48px;
	padding-top: 28px;
	border-top: 2px solid #dce5ed;
	color: #243747;
}

.ec-article-page .ec-article-footer__practical {
	display: grid;
	gap: 24px;
	align-items: start;
	margin-bottom: 36px;
}

.ec-article-page .ec-article-footer__practical > *,
.ec-article-page .ec-article-footer__info {
	min-width: 0;
}

.ec-article-page .ec-article-footer .ec-event-details {
	margin: 0;
	overflow: hidden;
	border: 1px solid #cfdeeb;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(31, 61, 88, .05);
}

.ec-article-page .ec-article-footer .ec-event-details-header {
	padding: 18px 20px;
	background: #234c6b;
	color: #fff;
}

.ec-article-page .ec-article-footer .ec-event-details-header svg {
	color: #d8eafa;
}

.ec-article-page .ec-article-footer .ec-detail-grid {
	margin: 0;
	grid-template-columns: minmax(0, 1fr);
}

.ec-article-page .ec-article-footer .ec-detail-grid dt {
	color: #526677;
}

.ec-article-page .ec-article-footer .ec-detail-grid dd {
	margin: 0;
	color: #243747;
	overflow-wrap: anywhere;
}

.ec-article-page .ec-badge-upcoming {
	background: #176b9a;
	color: #fff;
}

.ec-article-page .ec-badge-ongoing {
	background: #286b49;
	color: #fff;
}

.ec-article-page .ec-badge-cancelled {
	background: #b82b21;
	color: #fff;
}

.ec-article-page .ec-article-footer .ec-action-links {
	background: #f0f5fa;
}

.ec-article-page .ec-article-footer .ec-button {
	max-width: 100%;
	white-space: normal;
	text-align: center;
	overflow-wrap: anywhere;
}

.ec-article-page .ec-article-footer .ec-spot-guide-card {
	margin: 16px 0 0;
}

.ec-article-page .ec-article-footer .ec-organizer-cta {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
	margin: 0;
	padding: 24px;
	border: 1px solid #cdded6;
	border-top: 4px solid #3e7060;
	border-radius: 14px;
	background: #f0f6f2;
}

.ec-article-page .ec-article-footer .ec-organizer-cta .ec-cta-title {
	color: #244e40;
	font-size: 1rem;
}

.ec-article-page .ec-article-footer .ec-organizer-cta p {
	margin: 8px 0 0;
	color: #40594e;
	line-height: 1.85;
}

.ec-article-page .ec-article-footer .ec-organizer-cta-actions {
	display: flex;
	flex-wrap: wrap;
}

.ec-article-page .ec-article-footer .ec-organizer-cta .ec-button {
	background: #315f4f;
	color: #fff;
	box-shadow: none;
	font-size: .82rem;
}

.ec-article-page .ec-article-footer .ec-organizer-cta .ec-button:hover {
	background: #244638;
}

.ec-article-page .ec-article-footer__reading {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-list {
	grid-template-columns: minmax(0, 1fr);
}

.ec-article-page .ec-article-footer__reading :is(.ec-event-discovery-list li, .ec-event-discovery-item, .ec-event-discovery-item-body) {
	min-width: 0;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-item {
	flex-direction: row;
	align-items: center;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-thumb {
	flex: 0 0 88px;
	width: 88px;
	height: 66px;
}

.ec-article-page .ec-article-footer__reading .ec-inline-picks__list {
	grid-template-columns: minmax(0, 1fr);
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-actions {
	grid-template-columns: minmax(0, 1fr);
}

/* Keep event previews at their natural row height inside the scrolling dialog. */
.ec-article-page .ec-discovery-modal-events {
	flex: 1 1 auto;
	min-height: 0;
	grid-auto-rows: max-content;
	align-content: start;
}

.ec-article-page :is(.ec-discovery-modal-header, .ec-discovery-modal-footer, .ec-discovery-modal-handle) {
	flex-shrink: 0;
}

.ec-article-page .ec-discovery-event-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.ec-article-page .ec-discovery-modal-close {
	width: 44px;
	height: 44px;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery--v2 {
	margin: 0;
	padding: 24px;
	border: 1px solid #e9d9c4;
	border-radius: 18px;
	background: #fbf6ee;
	box-shadow: none;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-title {
	border-left-color: #a75b24;
	color: #573b27;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-item-meta {
	color: #59616b;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-primary {
	background: #995022;
	color: #fff;
	box-shadow: none;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-primary:hover {
	background: #783d19;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-secondary {
	border-color: #a86a40;
	color: #85451e;
}

.ec-article-page .ec-article-footer__reading .ec-event-discovery-tertiary {
	color: #665342;
}

.ec-article-page .ec-article-footer__reading > :is(.ec-related-events, .ec-inline-picks) {
	margin: 0;
	padding-top: 24px;
	border: 0;
	border-top: 1px solid #dce5ed;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.ec-article-page .ec-article-footer__reading .ec-inline-picks__heading {
	color: #754422;
}

.ec-article-page .ec-article-footer__reading .ec-inline-picks__date {
	color: #59616b;
}

.ec-article-page .ec-author-box {
	max-width: 720px;
	margin: 36px auto 12px;
	padding: 20px 24px;
	border: 0;
	border-left: 3px solid #a4b3c1;
	border-radius: 0 10px 10px 0;
	background: #f3f5f7;
	color: #344655;
}

.ec-article-page .ec-author-box__description {
	font-size: .84rem;
}

@container (min-width: 800px) {
	.ec-article-page .ec-article-footer__practical.has-sidebar {
		grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
	}
	.ec-article-page .ec-article-footer__practical.has-sidebar .ec-detail-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.ec-article-page .ec-article-footer__practical.has-sidebar .ec-detail-grid > div {
		display: grid;
		grid-template-columns: 100px minmax(0, 1fr);
		gap: 12px;
		box-shadow: none;
	}
}

@container (min-width: 640px) {
	.ec-article-page .ec-article-footer .ec-detail-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ec-article-page .ec-article-footer__reading .ec-event-discovery-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.ec-article-page .ec-article-footer__reading .ec-event-discovery-item {
		flex-direction: column;
		align-items: stretch;
	}
	.ec-article-page .ec-article-footer__reading .ec-event-discovery-thumb {
		flex: none;
		width: 100%;
		height: 120px;
	}
	.ec-article-page .ec-article-footer__reading .ec-inline-picks__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ec-article-page .ec-article-footer__reading .ec-event-discovery-actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.ec-article-page .ec-article-footer {
		margin-top: 32px;
		padding-top: 24px;
	}
	.ec-article-page .ec-article-footer__reading .ec-event-discovery--v2,
	.ec-article-page .ec-article-footer .ec-organizer-cta {
		padding: 20px 16px;
	}
	.ec-article-page .ec-author-box {
		padding: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ec-zoomable,
	.ec-lightbox,
	.ec-lightbox__img {
		transition: none;
		animation: none;
	}

	.ec-zoomable:hover {
		transform: none;
	}
}

/* =============================================================
   記事内のテーブル：トップと同じ白い角丸の面、紺の見出し行、生成りの縞
   SWELL の table 装飾（--color_main の thead など）を上書きする。
   ============================================================= */
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) {
	--ec-table-line: #ece4d6;
	width: 100%;
	margin: 1.6em 0 2em;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 18px;
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--ec-table-line), 0 10px 28px rgba(28, 92, 160, .08);
	overflow: hidden;
	color: var(--ec-ink, #1e2443);
	font-size: .92em;
	line-height: 1.65;
	font-variant-numeric: tabular-nums;
}

.ec-article-page :is(.post_content > .wp-block-table, .entry-content > .wp-block-table) {
	margin: 1.6em 0 2em;
	border: 0;
}

.ec-article-page :is(.post_content > .wp-block-table > table, .entry-content > .wp-block-table > table) {
	margin: 0;
}

.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) :is(th, td) {
	padding: .75em 1em;
	border: 0;
	border-bottom: 1px solid var(--ec-table-line);
	background: transparent;
	color: inherit;
	text-align: left;
	vertical-align: top;
}

.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) :is(th, td) + :is(th, td) {
	border-left: 1px solid var(--ec-table-line);
}

.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tr:last-child > :is(th, td) {
	border-bottom: 0;
}

/* 見出し行 */
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) thead :is(th, td) {
	border-bottom: 0;
	border-left-color: rgba(255, 255, 255, .14);
	background: linear-gradient(135deg, #34407a, #1e2443);
	color: #fff;
	font-family: var(--ec-font-display, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif);
	font-weight: 700;
	letter-spacing: .03em;
	white-space: nowrap;
}

.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) thead :is(th, td)::before,
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) thead :is(th, td)::after {
	content: none;
}

/* 縞と行ホバー */
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tbody tr:nth-child(even) > :is(th, td) {
	background: #fff8ec;
}

.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tbody tr {
	transition: background-color .2s ease;
}

.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tbody tr:hover > :is(th, td) {
	background: #e3f2fc;
}

/* 1列目が th の縦見出し型 */
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tbody th {
	background: #fff8ec;
	color: var(--ec-ink, #1e2443);
	font-family: var(--ec-font-display, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif);
	font-weight: 700;
	white-space: nowrap;
}

.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tbody tr:nth-child(even) > th {
	background: #fff1d8;
}

.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) strong {
	color: #d93f1f;
}

.ec-article-page :is(.post_content > .wp-block-table, .entry-content > .wp-block-table) figcaption {
	margin-top: .6em;
	color: var(--ec-mute, #646a85);
	font-size: .8em;
	text-align: center;
}

/* SP：横長のテーブルは横スクロール。端に影を出してスクロールできることを示す */
@media (max-width: 782px) {
	.ec-article-page :is(.post_content > .wp-block-table, .entry-content > .wp-block-table) {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		background:
			linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0)) left center / 28px 100% no-repeat local,
			linear-gradient(270deg, #fff 30%, rgba(255, 255, 255, 0)) right center / 28px 100% no-repeat local,
			radial-gradient(farthest-side at 0 50%, rgba(30, 36, 67, .16), transparent) left center / 12px 100% no-repeat scroll,
			radial-gradient(farthest-side at 100% 50%, rgba(30, 36, 67, .16), transparent) right center / 12px 100% no-repeat scroll,
			#fff;
		font-size: .86em;
	}

	.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) :is(th, td) {
		min-width: 6.5em;
		padding: .65em .8em;
	}

	/* 縞の背景が端の影を隠さないよう、SPでは偶数行を半透明にする */
	.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tbody tr:nth-child(even) > :is(th, td) {
		background: rgba(255, 241, 216, .55);
	}
}

/* 角のセル背景が角丸からはみ出さないようにする */
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tr:first-child > :is(th, td):first-child { border-top-left-radius: 18px; }
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tr:first-child > :is(th, td):last-child { border-top-right-radius: 18px; }
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tr:last-child > :is(th, td):first-child { border-bottom-left-radius: 18px; }
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tr:last-child > :is(th, td):last-child { border-bottom-right-radius: 18px; }
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) thead + tbody tr:first-child > :is(th, td) { border-radius: 0; }
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) thead ~ tbody tr:last-child > :is(th, td):first-child { border-bottom-left-radius: 18px; }
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) thead ~ tbody tr:last-child > :is(th, td):last-child { border-bottom-right-radius: 18px; }
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) thead tr:last-child > :is(th, td) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) thead tr:first-child > :is(th, td):first-child { border-top-left-radius: 18px; }
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) thead tr:first-child > :is(th, td):last-child { border-top-right-radius: 18px; }

/* SP：列が多い表は列幅を広げ、文字が細切れに折り返さないようにする（横スクロールで読む） */
@media (max-width: 782px) {
	.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table):has(tr > :nth-child(4)) :is(th, td) {
		min-width: 9em;
	}

	.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table):has(tr > :nth-child(4)) tr > :is(th, td):first-child {
		min-width: 7.5em;
	}

	.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table):has(tr > :nth-child(4)) thead :is(th, td) {
		white-space: nowrap;
	}
}

/* thead が無く、1行目がすべて th の表は、その行を見出し行として扱う */
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tbody tr:first-child:not(:has(td)) > th,
.ec-article-page :is(.post_content > table, .post_content > .wp-block-table > table, .post_content > figure > table, .entry-content > table, .entry-content > .wp-block-table > table, .entry-content > figure > table, .post_content .ec-table-scroll > table, .entry-content .ec-table-scroll > table) tbody tr:first-child:not(:has(td)):hover > th {
	border-bottom: 0;
	border-left-color: rgba(255, 255, 255, .14);
	background: linear-gradient(135deg, #34407a, #1e2443);
	color: #fff;
	white-space: nowrap;
}

/* =============================================================
   表のスクロール枠（article.js が表を .ec-table-scroll で包む）
   ============================================================= */
.ec-article-page .ec-table-scroll {
	position: relative;
	margin: 1.6em 0;
	border-radius: 18px;
	box-shadow: inset 0 0 0 1px #ece4d6, 0 10px 28px rgba(28, 92, 160, .08);
}

.ec-article-page :is(.post_content, .entry-content) .ec-table-scroll > table {
	margin: 0;
	box-shadow: none;
}

.ec-article-page .wp-block-table > .ec-table-scroll,
.ec-article-page figure > .ec-table-scroll {
	margin: 0;
}

@media (max-width: 782px) {
	.ec-article-page .ec-table-scroll {
		overflow-x: auto;
		overscroll-behavior-x: contain;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		scrollbar-color: rgba(30, 36, 67, .3) transparent;
	}

	/* 枠で包んだ表はブロック化しない（表の幅は中身に合わせ、狭ければ全幅） */
	.ec-article-page :is(.post_content, .entry-content) .ec-table-scroll > table {
		display: table;
		width: max-content;
		min-width: 100%;
		max-width: none;
		overflow: visible;
		background: #fff;
	}

	.ec-article-page :is(.post_content, .entry-content) .ec-table-scroll > table :is(th, td) {
		min-width: 7em;
		max-width: 16em;
	}

	.ec-article-page :is(.post_content, .entry-content) .ec-table-scroll > table tr > :is(th, td):first-child {
		position: sticky;
		left: 0;
		z-index: 1;
	}

	.ec-article-page :is(.post_content, .entry-content) .ec-table-scroll > table tbody tr > :is(th, td):first-child {
		background-color: #fff8ec;
	}

	.ec-article-page :is(.post_content, .entry-content) .ec-table-scroll > table thead tr > :is(th, td):first-child {
		background: #1e2443;
	}

	/* 右側にまだ続きがあることを、端のフェードと矢印で示す */
	.ec-article-page .ec-table-scroll.is-scrollable:not(.is-end) {
		-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), rgba(0, 0, 0, .35));
		mask-image: linear-gradient(90deg, #000 calc(100% - 28px), rgba(0, 0, 0, .35));
	}

	.ec-article-page .ec-table-scroll.is-scrollable.is-start::before {
		content: "";
		position: absolute;
		top: 50%;
		right: 8px;
		z-index: 2;
		width: 26px;
		height: 26px;
		margin-top: -13px;
		border-radius: 50%;
		background: #1e2443 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 12px no-repeat;
		box-shadow: 0 4px 12px rgba(30, 36, 67, .25);
		pointer-events: none;
		animation: ec-table-nudge 1.6s ease-in-out infinite;
	}

	.ec-article-page .ec-table-scroll:focus-visible {
		outline: 3px solid rgba(28, 138, 209, .45);
		outline-offset: 2px;
	}
}

@keyframes ec-table-nudge {
	0%, 100% { transform: translateX(0); }
	50%      { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
	.ec-article-page .ec-table-scroll::before {
		animation: none !important;
	}
}

@media (max-width: 782px) {
	/* 2列以下の表は画面幅に収めて折り返す（横スクロールは3列以上） */
	.ec-article-page :is(.post_content, .entry-content) .ec-table-scroll > table:not(:has(tr > :nth-child(3))) {
		width: 100%;
	}

	.ec-article-page :is(.post_content, .entry-content) .ec-table-scroll > table:not(:has(tr > :nth-child(3))) :is(th, td) {
		min-width: 0;
		max-width: none;
		white-space: normal;
		overflow-wrap: anywhere;
	}

	.ec-article-page :is(.post_content, .entry-content) .ec-table-scroll > table:not(:has(tr > :nth-child(3))) tr > :is(th, td):first-child {
		position: static;
		width: 34%;
	}
}
