/* NarratiaVerse: Watch tab, creator Watch section and click-to-play embeds. */

.nv-watch {
	padding-top: 1rem;
}

.nv-video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 1.5rem 1.25rem;
	align-items: start;
}

.nv-video {
	margin: 0;
	min-width: 0;
}

.nv-video__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 10px;
	background: #141317;
}


.nv-video__play,
.nv-video__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	padding: 0;
	margin: 0;
}

.nv-video__play {
	display: block;
	cursor: pointer;
	background: #141317;
	color: #fff;
}

.nv-video__play img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0.92;
	transition: opacity 0.2s ease;
}

.nv-video__play:hover img,
.nv-video__play:focus-visible img {
	opacity: 1;
}

.nv-video__play:focus-visible {
	outline: 3px solid #f4b52a;
	outline-offset: -3px;
}

.nv-video__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 3rem;
	color: #efe9dd;
	background: radial-gradient(circle at 30% 20%, #2d2b33 0%, #141317 60%, #141317 100%);
}

.nv-video__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 50%;
	font-size: 1.4rem;
	background: rgba(20, 19, 23, 0.72);
	color: #fff;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
	padding-left: 4px;
}

.nv-video__play:hover .nv-video__icon,
.nv-video__play:focus-visible .nv-video__icon {
	background: #ff6a3d;
	color: #141317;
	box-shadow: none;
}

.nv-video__caption {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.6rem 0.1rem 0;
	font-size: 1rem;
	line-height: 1.4;
}


.nv-video__type {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--fg-700, inherit);
}

:root[data-mode="dark"] .nv-video__type {
	color: #f4b52a;
}

.nv-video__title {
	font-weight: 600;
	overflow-wrap: anywhere;
}

:root[data-mode="dark"] .nv-video__title {
	color: #fbf8f3;
}

.nv-video__read {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	font-weight: 600;
	text-decoration: none;
}

:root[data-mode="dark"] .nv-video__read {
	color: #ff6a3d;
}

.nv-tab-count {
	display: inline-block;
	min-width: 1.5em;
	margin-left: 0.3em;
	padding: 0 0.45em;
	border-radius: 999px;
	font-size: 0.85em;
	line-height: 1.5;
	text-align: center;
	background: color-mix(in srgb, currentColor 18%, transparent);
}

/* The chapter list view toggles only make sense on the Read tab. */
.story__tabs[data-current="watch"] .story__chapter-list-toggles {
	display: none;
}

/* Same-size cards; "Actual size" and "Full size" (added 4 Dec 2026). */
.nv-video__tools {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.9rem;
	margin-top: 0.35rem;
}

.nv-video__tool {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 36px;
	padding: 0 0.1rem;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.85rem;
	opacity: 0.85;
	cursor: pointer;
}

.nv-video__tool:hover,
.nv-video__tool:focus-visible,
.nv-video__tool[aria-pressed="true"] {
	opacity: 1;
	text-decoration: underline;
}

.nv-video._actual .nv-video__frame {
	aspect-ratio: var(--nv-r, 1.7778);
	width: min(100%, calc(80vh * var(--nv-r, 1.7778)));
	margin: 0 auto;
}

.nv-video__close {
	display: none;
}

.nv-video._full::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(10, 9, 12, 0.94);
}

.nv-video._full .nv-video__frame {
	position: fixed;
	inset: 0;
	z-index: 100001;
	margin: auto;
	aspect-ratio: auto;
	width: min(96vw, calc(88vh * var(--nv-r, 1.7778)));
	height: min(88vh, calc(96vw / var(--nv-r, 1.7778)));
	max-width: none;
	border-radius: 0;
}

.nv-video._full .nv-video__close:not([hidden]) {
	position: fixed;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 100002;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 1.4rem;
	cursor: pointer;
}

.nv-video._full .nv-video__close:focus-visible {
	outline: 3px solid #f4b52a;
}

html.nv-video-open,
html.nv-video-open body {
	overflow: hidden;
}

/* A video with its own page: the title links to it. */
a.nv-video__title {
	color: inherit;
	text-decoration: none;
}

a.nv-video__title:hover,
a.nv-video__title:focus-visible {
	text-decoration: underline;
}
