.sr-smartlink-placement-button.sr-primary-button {
	box-sizing: border-box;
	justify-content: center;
	max-width: 100%;
	margin: 0;
	text-align: center;
	overflow-wrap: anywhere;
}
.sr-drama-actions:has(> .sr-smartlink-placement-button) { flex-wrap: wrap; }
.sr-smartlink-end-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 18px auto 24px; }
.sr-smartlink-end-actions > .sr-save-drama-wrap { margin: 0; }
@media (max-width: 767px) {
	.sr-drama-hero-info .sr-drama-actions:has(> .sr-smartlink-placement-button) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
	.sr-drama-actions:has(> .sr-smartlink-placement-button) > * { min-width: 0; }
	.sr-drama-actions:has(> .sr-smartlink-placement-button) .sr-primary-button,
	.sr-drama-actions:has(> .sr-smartlink-placement-button) .sr-save-drama,
	.sr-drama-actions:has(> .sr-smartlink-placement-button) .sr-share-toggle { width: 100%; justify-content: center; padding-inline: 10px; }
	.sr-smartlink-end-actions { flex-direction: column; align-items: stretch; }
	.sr-smartlink-end-actions > .sr-save-drama-wrap { width: 100%; }
	.sr-smartlink-end-actions .sr-save-drama { width: 100%; min-height: 48px; }
	.sr-smartlink-end-actions > .sr-smartlink-placement-button { width: 100%; }
}
@media (max-width: 359px) {
	.sr-drama-hero-info .sr-drama-actions:has(> .sr-smartlink-placement-button) { grid-template-columns: minmax(0, 1fr); }
}

.storyreel-ad {
	box-sizing: border-box;
	clear: both;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	margin: clamp(20px, 4vw, 36px) auto;
	text-align: center;
}

.storyreel-ad > *,
.storyreel-ad iframe,
.storyreel-ad img,
.storyreel-ad video,
.storyreel-ad object,
.storyreel-ad embed {
	max-width: 100%;
}

.storyreel-ad > * {
	margin-inline: auto;
}

.storyreel-ad-sidebar {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: center;
}

.storyreel-ad-sidebar .storyreel-ad {
	margin-top: 0;
}

@media (max-width: 1023px) {
	.storyreel-ad-sidebar {
		display: none;
	}
}

/* Smartlink Sponsored Cards V1. The destination remains admin-configured. */
.sr-sponsored-card {
	--sr-sponsored-accent: #ff657f;
	position: relative;
	display: grid;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	grid-template-columns: minmax(150px, 34%) minmax(0, 1fr);
	min-height: 0;
	background: linear-gradient(135deg, #121621 0%, #1b1e2c 62%, #251823 100%);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 18px;
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
	color: #f8f9fc;
	text-align: left;
	text-decoration: none;
	isolation: isolate;
}

.sr-sponsored-card *,
.sr-sponsored-card *::before,
.sr-sponsored-card *::after {
	box-sizing: border-box;
}

.sr-sponsored-card::after {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(circle at 80% 15%, rgba(255, 101, 127, 0.14), transparent 36%);
	content: "";
	pointer-events: none;
}

.sr-sponsored-card__visual {
	position: relative;
	display: block;
	overflow: hidden;
	min-height: 190px;
	background: #241724;
	background-position: center;
	background-size: cover;
}

.sr-sponsored-card--drama .sr-sponsored-card__visual {
	background-image: url("../images/sponsored-drama-v1.webp");
}

.sr-sponsored-card--reel .sr-sponsored-card__visual {
	background-image: url("../images/sponsored-reel-v1.webp");
}

.sr-sponsored-card--story .sr-sponsored-card__visual {
	background-image: url("../images/sponsored-story-v1.webp");
}

.sr-sponsored-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.sr-sponsored-card__visual::before,
.sr-sponsored-card__visual::after {
	position: absolute;
	content: "";
}

.sr-sponsored-card__visual::before {
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, transparent 54%, rgba(14, 16, 25, 0.34));
}

.sr-sponsored-card__visual::after {
	inset: auto 0 0;
	height: 48%;
	background: linear-gradient(transparent, rgba(10, 12, 20, 0.72));
	z-index: 1;
}

.sr-sponsored-card__body {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	padding: clamp(20px, 4vw, 34px);
}

.sr-sponsored-card__disclosure {
	display: inline-flex;
	margin: 0 0 10px;
	padding: 4px 9px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	color: #d5d9e3;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.sr-sponsored-card__headline {
	margin: 0;
	color: #fff;
	font-size: clamp(1.25rem, 3.4vw, 2rem);
	font-weight: 800;
	line-height: 1.12;
}

.sr-sponsored-card__copy {
	margin: 10px 0 0;
	color: #c7ccd8;
	font-size: clamp(0.9rem, 1.6vw, 1rem);
	line-height: 1.55;
}

.sr-sponsored-card__cta {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	margin-top: 18px;
	padding: 10px 18px;
	background: var(--sr-sponsored-accent);
	border-radius: 999px;
	box-shadow: 0 9px 24px rgba(255, 101, 127, 0.22);
	color: #171019;
	font-size: 0.9rem;
	font-weight: 800;
	line-height: 1.2;
}

.storyreel-ad--drama-after-episodes,
.storyreel-ad--reel-mid-content,
.storyreel-ad--story-mid-content {
	margin-block: clamp(20px, 3vw, 30px);
}

@media (min-width: 601px) {
	.storyreel-ad--drama-after-episodes .sr-sponsored-card,
	.storyreel-ad--reel-mid-content .sr-sponsored-card,
	.storyreel-ad--story-mid-content .sr-sponsored-card {
		grid-template-columns: minmax(150px, 32%) minmax(0, 1fr);
	}

	.storyreel-ad--drama-after-episodes .sr-sponsored-card__visual,
	.storyreel-ad--reel-mid-content .sr-sponsored-card__visual,
	.storyreel-ad--story-mid-content .sr-sponsored-card__visual {
		min-height: 220px;
	}

	.storyreel-ad--drama-after-episodes .sr-sponsored-card__body,
	.storyreel-ad--reel-mid-content .sr-sponsored-card__body,
	.storyreel-ad--story-mid-content .sr-sponsored-card__body {
		padding: clamp(18px, 2.2vw, 22px);
	}

	.storyreel-ad--drama-after-episodes .sr-sponsored-card__disclosure,
	.storyreel-ad--reel-mid-content .sr-sponsored-card__disclosure,
	.storyreel-ad--story-mid-content .sr-sponsored-card__disclosure {
		margin-bottom: 8px;
		padding: 3px 8px;
	}

	.storyreel-ad--drama-after-episodes .sr-sponsored-card__headline,
	.storyreel-ad--reel-mid-content .sr-sponsored-card__headline,
	.storyreel-ad--story-mid-content .sr-sponsored-card__headline {
		font-size: clamp(1.25rem, 2.4vw, 1.625rem);
	}

	.storyreel-ad--drama-after-episodes .sr-sponsored-card__copy,
	.storyreel-ad--reel-mid-content .sr-sponsored-card__copy,
	.storyreel-ad--story-mid-content .sr-sponsored-card__copy {
		margin-top: 8px;
		font-size: 0.95rem;
		line-height: 1.45;
	}

	.storyreel-ad--drama-after-episodes .sr-sponsored-card__cta,
	.storyreel-ad--reel-mid-content .sr-sponsored-card__cta,
	.storyreel-ad--story-mid-content .sr-sponsored-card__cta {
		min-height: 40px;
		margin-top: 14px;
		padding: 8px 16px;
	}
}

.sr-sponsored-card:hover {
	border-color: rgba(255, 101, 127, 0.48);
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
	color: #fff;
	transform: translateY(-2px);
}

.sr-sponsored-card:focus-visible {
	outline: 3px solid #ffd45c;
	outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
	.sr-sponsored-card {
		transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
	}
}

@media (max-width: 600px) {
	.sr-sponsored-card {
		grid-template-columns: minmax(0, 1fr);
		border-radius: 15px;
	}

	.sr-sponsored-card__visual {
		min-height: 0;
		aspect-ratio: 16 / 7;
	}

	.sr-sponsored-card__body {
		padding: 18px;
	}

	.sr-sponsored-card__headline {
		font-size: clamp(1.2rem, 6vw, 1.55rem);
	}

	.sr-sponsored-card__cta {
		width: 100%;
		justify-content: center;
	}
}
/* Phase 6: StoryReel-owned desktop single-post discovery sidebar. */
.sr-single-layout,
.sr-single-main {
	min-width: 0;
}

.sr-consumption-lead {
	max-width: 860px;
	margin-inline: auto;
}

.sr-single-sidebar {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 24px;
	align-items: stretch;
}

.sr-single-sidebar .storyreel-ad {
	margin: 0;
}


.sr-discovery-widget {
	min-width: 0;
	padding: 16px;
	background: #171b25;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	color: #f5f7fb;
}

.sr-single-sidebar .widget_storyreel-more-dramas.sr-discovery-widget {
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
}

.sr-sidebar-title {
	margin: 0 0 14px;
	color: #f5f7fb;
	line-height: 1.25;
}

.sr-sidebar-drama-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 12px;
}

.sr-sidebar-card,
.sr-sidebar-card-link {
	min-width: 0;
}

.sr-sidebar-card-link {
	display: block;
	color: #f5f7fb;
	text-decoration: none;
}

.sr-sidebar-card-poster {
	display: block;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 2 / 3;
	background: linear-gradient(145deg, #202634, #343b4b);
	border-radius: 9px;
}

.sr-sidebar-card-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sr-sidebar-card-fallback {
	display: grid;
	width: 100%;
	height: 100%;
	place-items: center;
	color: rgba(255, 255, 255, 0.72);
	font-size: 1.7rem;
	font-weight: 800;
}

.sr-sidebar-card-title {
	display: -webkit-box;
	overflow: hidden;
	margin-top: 8px;
	font-size: var(--sr-type-sidebar-card);
	font-weight: 750;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.sr-sidebar-card-genre {
	display: block;
	overflow: hidden;
	margin-top: 4px;
	color: #aeb6c7;
	font-size: 0.75rem;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sr-sidebar-card-link:hover .sr-sidebar-card-title {
	color: #ff7890;
}

.sr-sidebar-card-link:focus-visible {
	outline: 3px solid #ffd45c;
	outline-offset: 3px;
}

@media (min-width: 1024px) {
	.sr-single-layout.has-sidebar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(300px, 320px);
		gap: clamp(28px, 3vw, 32px);
		align-items: start;
	}

	.sr-consumption-page.has-single-sidebar {
		width: min(100% - 32px, 1240px);
	}

	.sr-reel-page .sr-single-layout.has-sidebar > .sr-single-main > .sr-reel-reading-transition,
	.sr-story-page .sr-single-layout.has-sidebar > .sr-single-main > .sr-episode-nav {
		margin-top: 0;
	}
}

@media (max-width: 1023px) {
	.sr-single-layout.has-sidebar {
		display: block;
	}

	.sr-single-sidebar {
		display: none;
	}
}
