/**
 * Portadas de novelas con título superpuesto.
 *
 * Esta capa se carga al final para impedir que estilos del tema, Elementor o
 * reglas genéricas para imágenes devuelvan la portada a su altura intrínseca.
 * Cada componente conserva su propia relación de aspecto y dimensiones.
 */
.tokki-hero-cover,
.tokki-update-cover,
.tokki-genre-novel-cover,
.tokki-selection-cover,
.tokki-related-novel-cover,
.tkn-profile-library-cover,
.tokki-profile-public-novels .tokki-staff-novel-card,
.tokki-reading-history-cover {
	position: relative !important;
	isolation: isolate;
	overflow: hidden !important;
	box-sizing: border-box;
}

.tokki-hero-cover img,
.tokki-update-cover img,
.tokki-genre-novel-cover img,
.tokki-selection-cover img,
.tokki-related-novel-cover img,
.tkn-profile-library-cover img,
.tokki-profile-public-novels .tokki-staff-novel-card img,
.tokki-reading-history-cover img {
	position: absolute !important;
	inset: 0 !important;
	z-index: 0 !important;
	display: block !important;
	width: 100% !important;
	min-width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	min-height: 100% !important;
	max-height: none !important;
	margin: 0 !important;
	object-fit: cover !important;
	object-position: center !important;
	border-radius: inherit;
}

/*
 * Estos carruseles calculan su altura a partir de la portada. La imagen debe
 * permanecer en el flujo para que la siguiente sección no pueda superponerse,
 * manteniendo igualmente el recorte total dentro de su relación de aspecto.
 */
.tokki-hero-cover img,
.tokki-update-cover img,
.tokki-genre-novel-cover img,
.tokki-selection-cover img,
.tokki-related-novel-cover img {
	position: relative !important;
	inset: auto !important;
	min-height: 0 !important;
}

/* Los degradados cubren siempre toda la imagen, sin alterar su visibilidad. */
.tokki-selection-gradient,
.tokki-related-novel-gradient,
.tkn-profile-library-gradient,
.tokki-profile-public-novels .tokki-staff-novel-gradient,
.tokki-reading-history-gradient {
	position: absolute !important;
	inset: 0 !important;
	z-index: 1 !important;
	width: 100% !important;
	height: 100% !important;
	pointer-events: none !important;
}

/* Los módulos que integran el degradado en su bloque de contenido. */
.tokki-hero-card-content,
.tokki-update-content,
.tokki-genre-novel-content {
	z-index: 1 !important;
}

.tokki-selection-title,
.tokki-related-novel-title,
.tkn-profile-library-title,
.tokki-profile-public-novels .tokki-staff-novel-title,
.tokki-reading-history-title {
	z-index: 2 !important;
}

/*
 * El carrusel móvil de listas conserva su flujo original. Aquí la imagen debe
 * participar en el cálculo de altura: si se vuelve absoluta, algunos móviles
 * colapsan la pista y la siguiente sección sube sobre las portadas.
 */
@media (max-width: 767px) {
	.tokki-home-selections .tokki-selection-card {
		aspect-ratio: auto !important;
		align-self: flex-start;
	}

	.tokki-home-selections .tokki-selection-cover {
		height: auto !important;
		min-height: 0 !important;
		aspect-ratio: 2 / 3 !important;
	}

	.tokki-home-selections .tokki-selection-cover img {
		position: relative !important;
		inset: auto !important;
		z-index: 0 !important;
		width: 100% !important;
		height: 100% !important;
		min-height: 0 !important;
		object-fit: cover !important;
	}
}
