body.sr-consumption,
body.sr-consumption .site {
	background: #0d1017;
}

/* Contents wrappers preserve the original mobile player's box relationships. */
.sr-reel-viewing-grid,
.sr-reel-player-column { display: contents; }
.sr-reel-context-panel { display: none; }

@media (min-width: 1024px) {
	:is(.sr-reel-page, .sr-story-page).sr-consumption-page { width: min(100% - 32px, 1240px); }
	.sr-reel-page .sr-consumption-lead { max-width: none; }
	:is(.sr-reel-page, .sr-story-page) .sr-consumption-header { max-width: none; }
	.sr-reel-page .sr-consumption-header h1 { overflow-wrap: anywhere; }
	.sr-story-page:not(.has-single-sidebar) > .sr-single-layout {
		max-width: 860px;
		margin-inline: auto;
	}
	.sr-reel-viewing-grid.has-drama-context {
		--sr-reel-column-gap: 24px;
		--sr-reel-sidebar-width: min(280px, calc((100% - var(--sr-reel-player-width, 420px) - 48px) / 2));
		display: grid;
		container-type: inline-size;
		width: 100%;
		max-width: 1028px;
		margin-inline: auto;
		grid-template-columns: minmax(0, var(--sr-reel-sidebar-width)) minmax(0, var(--sr-reel-player-width, 420px)) minmax(0, var(--sr-reel-sidebar-width));
		/* Sidebar content sets row 1; only the spanning player can need row 2. */
		grid-template-rows: var(--sr-reel-sidebar-height, max-content) minmax(0, 1fr) auto auto;
		justify-content: center;
		gap: var(--sr-reel-column-gap);
		row-gap: 0;
		align-items: start;
	}
	.has-drama-context > .sr-reel-player-column { display: block; min-width: 0; grid-column: 2; grid-row: 1 / span 2; }
	.has-drama-context > .sr-reel-context-panel { display: flex; flex-direction: column; align-self: stretch; }
	.has-drama-context > .sr-reel-context-panel > a:last-child { margin-top: auto; }
	.sr-reel-viewing-grid.has-drama-context.is-player-only { display: block; }
	.sr-reel-viewing-grid.is-player-only > .sr-reel-context-panel { display: none; }
	/* The layout helper measures space below the actual header and title. */
	.sr-reel-page .sr-video-player,
	.sr-reel-page .sr-video-unavailable { width: min(100%, var(--sr-reel-player-width, 420px)); min-height: 0; }
	.has-drama-context > .sr-reel-drama-panel { grid-column: 1; grid-row: 1; }
	.has-drama-context > .sr-reel-episode-panel { grid-column: 3; grid-row: 1; }
	.sr-reel-viewing-grid.has-drama-context > .storyreel-ad--reel-after-video {
		grid-column: 1 / -1;
		grid-row: 3;
		/* Centered tracks can be narrower than the outer viewing grid. */
		justify-self: center;
		width: 100cqw;
		max-width: none;
		margin-inline: 0;
	}
	.sr-reel-viewing-grid.has-drama-context > .sr-episode-nav {
		grid-column: 1 / -1;
		grid-row: 4;
		margin-block-start: 28px;
	}
	.sr-reel-context-panel {
		display: block;
		min-width: 0;
		padding: 20px;
		background: #171b25;
		border: 1px solid rgba(255, 255, 255, 0.1);
		border-radius: 14px;
		font-size: 0.9375rem;
		line-height: 1.6;
		overflow-wrap: anywhere;
	}
	.sr-reel-context-panel > h2 {
		--sr-type-h2: 20px;
		margin: 0 0 14px;
		line-height: 1.3;
	}
	.sr-reel-context-panel a { color: #f5f7fb; text-decoration: none; }
	.sr-reel-context-panel a:hover { color: #ff7890; }
	.sr-reel-context-panel a:focus-visible,
	.sr-reel-compact-episodes:focus-visible { outline: 3px solid #ffd45c; outline-offset: 3px; }
	.sr-reel-context-genres { margin: 0 0 14px; color: #aeb6c7; }
	.sr-reel-context-status { color: #ff7890; font-weight: 750; }
	.sr-reel-context-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }
	/* The legacy clamp above supplies only the unchanged V1.6 height baseline. */
	.sr-reel-drama-panel.has-dynamic-excerpt { min-height: 0; }
	.sr-reel-drama-panel.has-dynamic-excerpt > :not(.sr-reel-context-excerpt) { flex: 0 0 auto; }
	.sr-reel-drama-panel.has-dynamic-excerpt > .sr-reel-context-excerpt {
		display: block;
		flex: 1 1 0;
		min-height: 0;
		-webkit-line-clamp: unset;
	}
	.sr-reel-drama-panel.has-dynamic-excerpt .sr-reel-context-excerpt-text {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: var(--sr-reel-excerpt-lines, none);
		overflow: hidden;
	}
	.sr-reel-compact-episodes { list-style: none; margin: 0 0 16px; padding: 3px; max-height: 480px; overflow-y: auto; scrollbar-width: thin; }
	.sr-reel-compact-episodes li + li { margin-top: 8px; }
	.sr-reel-compact-episodes a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: #202634; }
	.sr-reel-compact-episodes a[aria-current="page"] { border-color: #ff385c; color: #ff7890; font-weight: 800; }
	.sr-reel-episode-panel { padding-inline: 14px; }
	.sr-reel-compact-episodes a { flex-wrap: wrap; align-items: center; gap: 4px 6px; padding-inline: 8px; }
	.sr-reel-compact-episodes a > span { min-width: 0; max-width: 100%; }
}

@media (min-width: 1024px) and (max-width: 1150px) {
	.sr-reel-drama-panel { padding: 16px; }
	.sr-reel-drama-panel h2 { margin-bottom: 10px; }
	.sr-reel-drama-panel .sr-reel-context-genres { margin-bottom: 10px; line-height: 1.5; }
	.sr-reel-drama-panel .sr-reel-context-status { margin-bottom: 10px; }
	.sr-reel-drama-panel .sr-reel-context-excerpt { -webkit-line-clamp: 6; margin-bottom: 12px; }
}

body.sr-consumption .site-content {
	display: block;
}

.sr-consumption-page {
	box-sizing: border-box;
	width: min(100% - 32px, 860px);
	min-height: 60vh;
	margin-inline: auto;
	padding-block: clamp(24px, 5vw, 56px);
	color: #f5f7fb;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sr-consumption-page *,
.sr-consumption-page *::before,
.sr-consumption-page *::after {
	box-sizing: border-box;
}

.sr-consumption-header {
	max-width: 74ch;
	margin: 0 auto clamp(22px, 4vw, 36px);
	text-align: center;
}

.sr-consumption-parent {
	display: inline-block;
	margin-bottom: 8px;
	color: #ff7890;
	font-size: 0.88rem;
	font-weight: 750;
	text-decoration: none;
}

.sr-consumption-header h1 {
	margin: 0;
	color: #f5f7fb;
	line-height: 1.15;
}

.sr-player-section {
	display: flex;
	justify-content: center;
}

.sr-video-player,
.sr-video-unavailable {
	width: min(100%, 420px);
	aspect-ratio: 9 / 16;
	margin-inline: auto;
	background: #05070b;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	overflow: hidden;
}

.sr-video-player iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.sr-video-unavailable {
	display: grid;
	place-items: center;
	min-height: 320px;
	padding: 24px;
	color: #aeb6c7;
	text-align: center;
}

.sr-episode-nav,
.sr-chapter-nav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	max-width: 740px;
	margin: clamp(22px, 4vw, 36px) auto;
}

.sr-episode-nav a,
.sr-chapter-nav a,
.sr-terminal-state {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 11px 16px;
	background: #202634;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	color: #f5f7fb;
	font-weight: 750;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
}

.sr-episode-nav a:hover,
.sr-chapter-nav a:hover {
	border-color: rgba(255, 56, 92, 0.75);
	color: #ff8da1;
}

.sr-episode-nav a:focus-visible,
.sr-chapter-nav a:focus-visible,
.sr-consumption-parent:focus-visible {
	outline: 3px solid #ffd45c;
	outline-offset: 3px;
}

.sr-reel-viewing-grid > .storyreel-ad--reel-after-video {
	margin-block-end: 0;
}

.sr-reel-viewing-grid > .sr-episode-nav {
	width: min(100%, 420px);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-block-start: 24px;
}

.sr-reel-viewing-grid > .sr-episode-nav > a {
	white-space: nowrap;
}

.sr-reel-viewing-grid > .sr-episode-nav:not(:has(> a)) {
	display: none;
}

.sr-terminal-state {
	color: #7ce7ac;
}

.sr-chapter-nav > :only-child {
	grid-column: 1 / -1;
}

.sr-reel-reading-transition {
	max-width: 72ch;
	margin: clamp(28px, 5vw, 48px) auto 0;
	color: #aeb6c7;
	font-size: clamp(1rem, 1.4vw, 1.08rem);
	line-height: 1.6;
}

.sr-reel-reading-transition-title {
	margin: 0;
	color: #f5f7fb;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
}

.sr-reel-reading-transition p + p {
	margin: 8px 0 0;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
}

.sr-reel-reading-transition + .sr-novel-content {
	margin-top: 24px;
}

.sr-novel-content {
	max-width: 700px;
	margin: clamp(24px, 5vw, 48px) auto;
	color: #e2e5ea;
	font-size: 17px;
	line-height: 1.75;
}

.sr-novel-content p {
	margin: 0 0 1.2em;
}

.sr-episode-plot,
.sr-drama-synopsis {
	overflow-wrap: anywhere;
}

.sr-episode-plot > h2:first-child,
.sr-drama-synopsis > h2:first-child {
	margin-top: 0;
}

.sr-novel-content h2,
.sr-novel-content h3,
.sr-novel-content h4 {
	margin: 1.7em 0 0.65em;
	color: #f5f7fb;
	line-height: 1.25;
}

.sr-novel-content h3 {
	font-size: 1.25em;
}

.sr-novel-content h4 {
	font-size: 1.1em;
}

.sr-novel-content .storyreel-ad {
	font-size: 16px;
	line-height: normal;
}

.sr-novel-content .storyreel-ad p {
	margin: revert;
}

.sr-novel-content img,
.sr-novel-content video {
	max-width: 100%;
	height: auto;
}

.sr-novel-content iframe {
	max-width: 100%;
}

.sr-novel-content table {
	display: block;
	overflow-x: auto;
	max-width: 100%;
}

@media (max-width: 767px) {
	.sr-reel-viewing-grid > .sr-episode-nav {
		gap: 10px;
		margin-block-start: 20px;
	}

	.sr-reel-viewing-grid > .sr-episode-nav > a {
		padding-inline: 4px;
		font-size: clamp(0.6875rem, 3.5vw, 0.9rem);
	}

	.sr-reel-reading-transition-title {
		font-size: 1.25rem;
	}

	.sr-consumption-page {
		width: min(100% - 20px, 720px);
		padding-block: 22px 40px;
	}

	.sr-consumption-page .sr-single-main,
	.sr-reel-page .sr-consumption-lead {
		width: calc(100% - var(--sr-shell-gutter));
		margin-inline: var(--sr-shell-gutter) 0;
	}

	.sr-video-player,
	.sr-video-unavailable {
		width: min(100%, 430px);
		border-radius: 12px;
	}

	.sr-episode-nav,
	.sr-chapter-nav {
		gap: 9px;
	}

	.sr-episode-nav a,
	.sr-chapter-nav a,
	.sr-terminal-state {
		min-height: 50px;
		padding-inline: 10px;
		font-size: 0.9rem;
	}

	.sr-novel-content {
		font-size: 17px;
		line-height: 1.72;
	}
}

@media (max-width: 359px) {
	.sr-episode-nav,
	.sr-chapter-nav {
		grid-template-columns: 1fr;
	}

	.sr-episode-nav > span:empty {
		display: none;
	}

	.sr-reel-viewing-grid > .sr-episode-nav > a {
		padding-inline: 2px;
		font-size: 0.625rem;
	}

	.sr-reel-viewing-grid > .sr-episode-nav > a:only-of-type {
		grid-column: 1 / -1;
	}
}
