/* Rich cloud fallback thumbnail for posts without featured image */
.post-thumbnail-fallback {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 5 / 3;
	overflow: hidden;
	isolation: isolate;
	border-radius: 30% 70% 36% 64% / 26% 32% 68% 74%;
	background: linear-gradient(140deg, #f9fbff 0%, #f0f5ff 38%, #eef8f7 72%, #f8f3ff 100%);
	border: 1px solid rgba(53, 86, 110, 0.1);
	box-shadow: 0 10px 28px rgba(24, 45, 62, 0.1);
}

.post-thumbnail-fallback::before,
.post-thumbnail-fallback::after {
	content: "";
	position: absolute;
	pointer-events: none;
	z-index: 1;
	background: rgba(255, 255, 255, 0.54);
	border: 1px solid rgba(255, 255, 255, 0.76);
}

.post-thumbnail-fallback::before {
	left: -10%;
	top: 10%;
	width: 40%;
	height: 36%;
	border-radius: 64% 36% 58% 42% / 44% 56% 54% 46%;
}

.post-thumbnail-fallback::after {
	right: -12%;
	bottom: -8%;
	width: 48%;
	height: 40%;
	border-radius: 40% 60% 34% 66% / 58% 42% 64% 36%;
}

.post-thumbnail-fallback__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.9) 0, rgba(255, 255, 255, 0) 44%),
		radial-gradient(circle at 74% 66%, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0) 46%),
		radial-gradient(circle at 52% 44%, rgba(255, 255, 255, 0.4) 0, rgba(255, 255, 255, 0) 32%);
}

.post-thumbnail-fallback__label {
	position: absolute;
	top: 12px;
	left: 14px;
	z-index: 3;
	padding: 4px 11px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.84);
	border: 1px solid rgba(31, 91, 117, 0.22);
	color: #1f6578;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.post-thumbnail-fallback__words {
	position: absolute;
	inset: 0;
	z-index: 3;
}

.post-thumbnail-fallback__word {
	position: absolute;
	display: inline-block;
	padding: 8px 16px 9px;
	border: 1px solid rgba(42, 75, 96, 0.14);
	color: #334b62;
	font-family: "Barlow Semi Condensed", sans-serif;
	font-weight: 700;
	line-height: 1.15;
	white-space: nowrap;
	box-shadow: 0 3px 10px rgba(255, 255, 255, 0.45);
	letter-spacing: 0.01em;
	max-width: min(88%, 560px);
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Bigger, more central words + colorful chips */
.post-thumbnail-fallback__word.word-1 {
	left: 50%;
	top: 38%;
	transform: translate(-50%, -50%);
	font-size: clamp(1.45rem, 3vw, 2.1rem);
	padding: 12px 22px 13px;
	background: rgba(255, 243, 206, 0.9);
	border-radius: 52% 48% 60% 40% / 44% 56% 50% 50%;
	z-index: 4;
}

.post-thumbnail-fallback__word.word-2 {
	left: 50%;
	top: 56%;
	transform: translate(-50%, -50%);
	font-size: clamp(1.12rem, 2.2vw, 1.56rem);
	background: rgba(220, 242, 255, 0.88);
	border-radius: 34% 66% 48% 52% / 58% 42% 62% 38%;
	z-index: 4;
}

.post-thumbnail-fallback__word.word-3 {
	left: 16%;
	top: 24%;
	font-size: clamp(0.94rem, 1.7vw, 1.16rem);
	background: rgba(232, 252, 236, 0.9);
	border-radius: 56% 44% 40% 60% / 38% 62% 44% 56%;
}

.post-thumbnail-fallback__word.word-4 {
	right: 12%;
	top: 22%;
	font-size: clamp(0.92rem, 1.65vw, 1.12rem);
	background: rgba(238, 229, 255, 0.88);
	border-radius: 48% 52% 66% 34% / 52% 48% 60% 40%;
}

.post-thumbnail-fallback__word.word-5 {
	left: 9%;
	top: 50%;
	font-size: clamp(0.9rem, 1.5vw, 1.05rem);
	background: rgba(255, 231, 240, 0.86);
	border-radius: 68% 32% 50% 50% / 44% 56% 42% 58%;
}

.post-thumbnail-fallback__word.word-6 {
	right: 9%;
	top: 52%;
	font-size: clamp(0.88rem, 1.45vw, 1.04rem);
	background: rgba(224, 255, 247, 0.86);
	border-radius: 42% 58% 36% 64% / 62% 38% 52% 48%;
}

.post-thumbnail-fallback__word.word-7 {
	left: 20%;
	top: 74%;
	font-size: clamp(0.86rem, 1.35vw, 1rem);
	background: rgba(255, 244, 219, 0.86);
	border-radius: 58% 42% 64% 36% / 34% 66% 40% 60%;
}

.post-thumbnail-fallback__word.word-8 {
	right: 18%;
	top: 74%;
	font-size: clamp(0.84rem, 1.3vw, 0.98rem);
	background: rgba(225, 239, 255, 0.9);
	border-radius: 40% 60% 52% 48% / 60% 40% 58% 42%;
}

.post-thumbnail-fallback__word.word-9 {
	left: 36%;
	top: 20%;
	font-size: clamp(0.82rem, 1.25vw, 0.96rem);
	background: rgba(240, 255, 232, 0.9);
	border-radius: 64% 36% 46% 54% / 48% 52% 62% 38%;
}

.post-thumbnail-fallback__word.word-10 {
	right: 33%;
	top: 80%;
	font-size: clamp(0.8rem, 1.2vw, 0.94rem);
	background: rgba(255, 236, 222, 0.9);
	border-radius: 36% 64% 68% 32% / 42% 58% 34% 66%;
}

/* 10 distinct cloud variants */
.site-main article:nth-of-type(10n + 1) .post-thumbnail-fallback {
	border-radius: 26% 74% 34% 66% / 18% 28% 72% 82%;
}

.site-main article:nth-of-type(10n + 2) .post-thumbnail-fallback {
	border-radius: 44% 56% 62% 38% / 24% 40% 60% 76%;
}

.site-main article:nth-of-type(10n + 3) .post-thumbnail-fallback {
	border-radius: 62% 38% 32% 68% / 34% 18% 82% 66%;
}

.site-main article:nth-of-type(10n + 4) .post-thumbnail-fallback {
	border-radius: 30% 70% 56% 44% / 22% 36% 64% 78%;
}

.site-main article:nth-of-type(10n + 5) .post-thumbnail-fallback {
	border-radius: 52% 48% 26% 74% / 30% 24% 76% 70%;
}

.site-main article:nth-of-type(10n + 6) .post-thumbnail-fallback {
	border-radius: 20% 80% 46% 54% / 34% 14% 86% 66%;
}

.site-main article:nth-of-type(10n + 7) .post-thumbnail-fallback {
	border-radius: 68% 32% 22% 78% / 26% 44% 56% 74%;
}

.site-main article:nth-of-type(10n + 8) .post-thumbnail-fallback {
	border-radius: 38% 62% 74% 26% / 38% 20% 80% 62%;
}

.site-main article:nth-of-type(10n + 9) .post-thumbnail-fallback {
	border-radius: 24% 76% 58% 42% / 12% 42% 58% 88%;
}

.site-main article:nth-of-type(10n + 10) .post-thumbnail-fallback {
	border-radius: 56% 44% 18% 82% / 28% 48% 52% 72%;
}

/* Side cloud variants */
.site-main article:nth-of-type(10n + 1) .post-thumbnail-fallback::before {
	top: 6%;
	left: -12%;
	width: 36%;
	height: 30%;
	border-radius: 38% 62% 70% 30% / 50% 50% 60% 40%;
}

.site-main article:nth-of-type(10n + 1) .post-thumbnail-fallback::after {
	top: 44%;
	right: -10%;
	width: 30%;
	height: 26%;
	border-radius: 72% 28% 44% 56% / 36% 64% 34% 66%;
}

.site-main article:nth-of-type(10n + 2) .post-thumbnail-fallback::before {
	top: 30%;
	left: -12%;
	width: 26%;
	height: 24%;
	border-radius: 64% 36% 42% 58% / 66% 34% 50% 50%;
}

.site-main article:nth-of-type(10n + 2) .post-thumbnail-fallback::after {
	top: 10%;
	right: -8%;
	width: 24%;
	height: 20%;
	border-radius: 30% 70% 60% 40% / 44% 56% 66% 34%;
}

.site-main article:nth-of-type(10n + 3) .post-thumbnail-fallback::before {
	top: 12%;
	left: -8%;
	width: 18%;
	height: 16%;
	border-radius: 78% 22% 52% 48% / 40% 60% 34% 66%;
}

.site-main article:nth-of-type(10n + 3) .post-thumbnail-fallback::after {
	top: 36%;
	right: -14%;
	width: 34%;
	height: 30%;
	border-radius: 48% 52% 24% 76% / 62% 38% 68% 32%;
}

.site-main article:nth-of-type(10n + 4) .post-thumbnail-fallback::before {
	top: 40%;
	left: -10%;
	width: 24%;
	height: 20%;
	border-radius: 34% 66% 74% 26% / 58% 42% 46% 54%;
}

.site-main article:nth-of-type(10n + 4) .post-thumbnail-fallback::after {
	top: 12%;
	right: -12%;
	width: 26%;
	height: 22%;
	border-radius: 70% 30% 46% 54% / 30% 70% 52% 48%;
}

.site-main article:nth-of-type(10n + 5) .post-thumbnail-fallback::before {
	top: 8%;
	left: -14%;
	width: 30%;
	height: 26%;
	border-radius: 58% 42% 30% 70% / 70% 30% 56% 44%;
}

.site-main article:nth-of-type(10n + 5) .post-thumbnail-fallback::after {
	top: 46%;
	right: -8%;
	width: 20%;
	height: 16%;
	border-radius: 26% 74% 66% 34% / 42% 58% 78% 22%;
}

.site-main article:nth-of-type(10n + 6) .post-thumbnail-fallback::before {
	top: 22%;
	left: -13%;
	width: 28%;
	height: 24%;
	border-radius: 66% 34% 38% 62% / 74% 26% 52% 48%;
}

.site-main article:nth-of-type(10n + 6) .post-thumbnail-fallback::after {
	top: 8%;
	right: -6%;
	width: 18%;
	height: 15%;
	border-radius: 32% 68% 58% 42% / 46% 54% 72% 28%;
}

.site-main article:nth-of-type(10n + 7) .post-thumbnail-fallback::before {
	top: 6%;
	left: -9%;
	width: 16%;
	height: 14%;
	border-radius: 82% 18% 54% 46% / 36% 64% 30% 70%;
}

.site-main article:nth-of-type(10n + 7) .post-thumbnail-fallback::after {
	top: 38%;
	right: -15%;
	width: 36%;
	height: 31%;
	border-radius: 54% 46% 22% 78% / 64% 36% 70% 30%;
}

.site-main article:nth-of-type(10n + 8) .post-thumbnail-fallback::before {
	top: 30%;
	left: -9%;
	width: 23%;
	height: 19%;
	border-radius: 28% 72% 76% 24% / 60% 40% 46% 54%;
}

.site-main article:nth-of-type(10n + 8) .post-thumbnail-fallback::after {
	top: 12%;
	right: -13%;
	width: 28%;
	height: 24%;
	border-radius: 76% 24% 42% 58% / 28% 72% 58% 42%;
}

.site-main article:nth-of-type(10n + 9) .post-thumbnail-fallback::before {
	top: 14%;
	left: -12%;
	width: 27%;
	height: 23%;
	border-radius: 50% 50% 20% 80% / 70% 30% 62% 38%;
}

.site-main article:nth-of-type(10n + 9) .post-thumbnail-fallback::after {
	top: 44%;
	right: -7%;
	width: 18%;
	height: 15%;
	border-radius: 24% 76% 68% 32% / 44% 56% 80% 20%;
}

.site-main article:nth-of-type(10n + 10) .post-thumbnail-fallback::before {
	top: 5%;
	left: -7%;
	width: 15%;
	height: 13%;
	border-radius: 72% 28% 56% 44% / 44% 56% 22% 78%;
}

.site-main article:nth-of-type(10n + 10) .post-thumbnail-fallback::after {
	top: 24%;
	right: -14%;
	width: 35%;
	height: 30%;
	border-radius: 62% 38% 32% 68% / 26% 74% 64% 36%;
}

@media (max-width: 768px) {
	.post-thumbnail-fallback {
		aspect-ratio: 16 / 10;
	}

	.post-thumbnail-fallback__word {
		max-width: 90%;
		padding: 6px 12px 7px;
	}

	.post-thumbnail-fallback__word.word-1 {
		font-size: clamp(1.08rem, 4.6vw, 1.35rem);
		left: 50%;
		top: 42%;
	}

	.post-thumbnail-fallback__word.word-2 {
		font-size: clamp(0.92rem, 3.4vw, 1.1rem);
		left: 50%;
		top: 59%;
	}

	.post-thumbnail-fallback__word.word-3 { top: 22%; left: 8%; }
	.post-thumbnail-fallback__word.word-4 { top: 20%; right: 6%; }
	.post-thumbnail-fallback__word.word-5 { top: 52%; left: 4%; }
	.post-thumbnail-fallback__word.word-6 { top: 54%; right: 4%; }
	.post-thumbnail-fallback__word.word-7 { top: 74%; left: 12%; }
	.post-thumbnail-fallback__word.word-8 { top: 75%; right: 10%; }
	.post-thumbnail-fallback__word.word-9 { display: none; }
	.post-thumbnail-fallback__word.word-10 { display: none; }
}

/* Random fallback cards in archive navigation (when no wp_pagenavi). */
.mb-random-posts-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
	margin: 0.8rem 0 1.2rem;
}

.mb-random-post-card {
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.mb-random-post-card .post-thumbnail {
	display: block;
	margin: 0 0 0.45rem;
	overflow: hidden;
	border-radius: 12px;
}

.mb-random-post-card .post-thumbnail-fallback {
	aspect-ratio: 16 / 9;
	overflow: visible;
	border-radius: 0;
}

.mb-random-post-card .post-thumbnail:not(.post-thumbnail-fallback) img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.mb-random-post-card__title {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.35;
}

.mb-random-post-card__title a {
	color: #173b50;
	text-decoration: none;
}

.mb-random-post-card__title a:hover {
	color: #0f637f;
}

/* Archive/category thumbnails: always fit card width and crop gracefully. */
body.archive .site-main article .post-thumbnail img,
body.blog .site-main article .post-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

body.archive .site-main article .post-thumbnail,
body.blog .site-main article .post-thumbnail {
	width: 100%;
	aspect-ratio: 16 / 9;
}

/* Category/archive fallback cards: remove outer frame and keep cloud-only style. */
body.archive .post-thumbnail-fallback,
body.blog .post-thumbnail-fallback {
	border: 0;
	box-shadow: none;
}

body.archive .post-thumbnail:not(.post-thumbnail-fallback),
body.blog .post-thumbnail:not(.post-thumbnail-fallback) {
	border-radius: 12px;
	overflow: hidden;
}

/* Stronger shape diversity for random cards in category/archive sections. */
.mb-random-post-card:nth-child(5n + 1) .post-thumbnail-fallback {
	border-radius: 26% 74% 34% 66% / 22% 38% 62% 78%;
}

.mb-random-post-card:nth-child(5n + 2) .post-thumbnail-fallback {
	border-radius: 64% 36% 58% 42% / 34% 24% 76% 66%;
}

.mb-random-post-card:nth-child(5n + 3) .post-thumbnail-fallback {
	border-radius: 38% 62% 74% 26% / 48% 20% 80% 52%;
}

.mb-random-post-card:nth-child(5n + 4) .post-thumbnail-fallback {
	border-radius: 56% 44% 26% 74% / 26% 56% 44% 74%;
}

.mb-random-post-card:nth-child(5n + 5) .post-thumbnail-fallback {
	border-radius: 30% 70% 62% 38% / 16% 42% 58% 84%;
}

@media (max-width: 640px) {
	.mb-random-posts-grid {
		grid-template-columns: 1fr;
	}
}

/* Mini cloud fallback for broken standalone inline images in post content. */
.entry-content .mb-inline-image-fallback {
	position: relative;
	display: block;
	width: min(100%, 480px);
	min-height: 150px;
	margin: 0.6rem auto 1rem;
	padding: 1rem 1rem 0.9rem;
	border-radius: 58% 42% 48% 52% / 38% 52% 48% 62%;
	background: linear-gradient(145deg, #f8fcff 0%, #eef6ff 45%, #f6fcf8 100%);
	border: 1px solid rgba(40, 72, 93, 0.16);
	box-shadow: 0 8px 20px rgba(24, 46, 62, 0.08);
}

.entry-content .mb-inline-image-fallback__cloud {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background:
		radial-gradient(circle at 20% 28%, rgba(255, 255, 255, 0.78) 0, rgba(255, 255, 255, 0) 44%),
		radial-gradient(circle at 78% 66%, rgba(255, 255, 255, 0.68) 0, rgba(255, 255, 255, 0) 42%);
}

.entry-content .mb-inline-image-fallback__words {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
}

.entry-content .mb-inline-image-fallback__word {
	display: inline-block;
	padding: 0.32rem 0.7rem 0.36rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.86);
	border: 1px solid rgba(30, 72, 94, 0.18);
	color: #1f4f67;
	font-family: "Barlow Semi Condensed", sans-serif;
	font-size: clamp(0.86rem, 1.35vw, 1.02rem);
	font-weight: 700;
	line-height: 1.15;
}
